brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.84k stars 2.33k forks source link

DCHECK crash in restricted_cookie_manager.cc #32528

Open mkarolin opened 1 year ago

mkarolin commented 1 year ago

STR:

  1. Build a debug build on Windows (master 1.59.46)
  2. Start Brave with a NTP
  3. Click into the URL and type a search term (e.g. peaches)
  4. Observe Fatal error dialog popup with stack trace:
    [81432:77052:0825/122833.786:FATAL:restricted_cookie_manager.cc(879)] Check failed: site_for_cookies_ok. site_for_cookies from renderer='SiteForCookies: {site=null; schemefully_same=false}' from browser='SiteForCookies: {site=https://brave.com; schemefully_same=true}';
        base::debug::CollectStackTrace [0x00007FFB12B160F7+39] (C:\bb3\brave-browser\src\base\debug\stack_trace_win.cc:329)
        base::debug::StackTrace::StackTrace [0x00007FFB12AD717D+77] (C:\bb3\brave-browser\src\base\debug\stack_trace.cc:221)
        base::debug::StackTrace::StackTrace [0x00007FFB12AD7115+37] (C:\bb3\brave-browser\src\base\debug\stack_trace.cc:218)
        logging::LogMessage::~LogMessage [0x00007FFB127CB94A+202] (C:\bb3\brave-browser\src\base\logging.cc:729)
        logging::`anonymous namespace'::DCheckLogMessage::~DCheckLogMessage [0x00007FFB12760779+73] (C:\bb3\brave-browser\src\base\check.cc:91)
        logging::`anonymous namespace'::DCheckLogMessage::~DCheckLogMessage [0x00007FFB12760709+41] (C:\bb3\brave-browser\src\base\check.cc:87)
        logging::CheckError::~CheckError [0x00007FFB12760285+85] (C:\bb3\brave-browser\src\base\check.cc:273)
        network::RestrictedCookieManager::ValidateAccessToCookiesAt [0x00007FFAA8B83D0C+476] (C:\bb3\brave-browser\src\services\network\restricted_cookie_manager.cc:883)
        network::RestrictedCookieManager::GetAllForUrl [0x00007FFAA8B83912+194] (C:\bb3\brave-browser\src\services\network\restricted_cookie_manager.cc:433)
    ...
    

cc: @iefremov @goodov

goodov commented 1 year ago

It's Service Worker-related, so not that scary. Looks like an upstream bug after this change https://chromium-review.googlesource.com/c/chromium/src/+/4420046

investigating currently.