Weird “Check failed: site_instance->HasSite()” errors

469 views
Skip to first unread message

Avi Drissman

unread,
Aug 13, 2024, 7:20:29 PM8/13/24
to navigation-dev
I'm doing some fixing of the drop handler on the tab strip, and as part of the test I'm hammering loads of "about:blank" URLs.

This seemed to work great when the new browsertest was half as long as it currently is. about:blank URLs have to load synchronously, so this was fine.

As soon as I doubled the length of the browsertest, it started consistently failing on my local machine:

[88775:259:0813/190720.993288:FATAL:navigation_request.cc(2796)] Check failed: site_instance->HasSite().
0   libbase.dylib                       0x0000000177f337c4 base::debug::CollectStackTrace(base::span<void const*, 18446744073709551615ul, void const**>) + 84
1   libbase.dylib                       0x0000000177ed91f0 base::debug::StackTrace::StackTrace(unsigned long) + 156
2   libbase.dylib                       0x0000000177ed9298 base::debug::StackTrace::StackTrace(unsigned long) + 36
3   libbase.dylib                       0x0000000177ed9264 base::debug::StackTrace::StackTrace() + 40
4   libbase.dylib                       0x0000000177b6ece0 logging::LogMessage::Flush() + 196
5   libbase.dylib                       0x0000000177b6ec00 logging::LogMessage::~LogMessage() + 44
6   libbase.dylib                       0x0000000177b0436c logging::(anonymous namespace)::DCheckLogMessage::~DCheckLogMessage() + 152
7   libbase.dylib                       0x0000000177b04294 logging::(anonymous namespace)::DCheckLogMessage::~DCheckLogMessage() + 28
8   libbase.dylib                       0x0000000177b042c0 logging::(anonymous namespace)::DCheckLogMessage::~DCheckLogMessage() + 28
9   libbase.dylib                       0x0000000177b048b4 std::__Cr::default_delete<logging::LogMessage>::operator()(logging::LogMessage*) const + 52
10  libbase.dylib                       0x0000000177b02bdc std::__Cr::unique_ptr<logging::LogMessage, std::__Cr::default_delete<logging::LogMessage>>::reset(logging::LogMessage*) + 96
11  libbase.dylib                       0x0000000177b02b34 logging::CheckError::~CheckError() + 60
12  libbase.dylib                       0x0000000177b02c34 logging::CheckError::~CheckError() + 28
13  libcontent.dylib                    0x00000003596bf4d4 content::NavigationRequest::BeginNavigationImpl() + 1420
14  libcontent.dylib                    0x00000003596be4b8 content::NavigationRequest::BeginNavigation() + 1540
15  libcontent.dylib                    0x000000035975ec60 content::Navigator::Navigate(std::__Cr::unique_ptr<content::NavigationRequest, std::__Cr::default_delete<content::NavigationRequest>>, content::ReloadType) + 840
16  libcontent.dylib                    0x0000000359666dd0 content::NavigationControllerImpl::NavigateWithoutEntry(content::NavigationController::LoadURLParams const&) + 2296
17  libcontent.dylib                    0x0000000359666334 content::NavigationControllerImpl::LoadURLWithParams(content::NavigationController::LoadURLParams const&) + 572
18  browser_tests                       0x000000011815d80c (anonymous namespace)::LoadURLInContents(content::WebContents*, GURL const&, NavigateParams*) + 780
19  browser_tests                       0x000000011815b9f0 Navigate(NavigateParams*) + 2712
20  browser_tests                       0x0000000118c93928 BrowserRootView::NavigateToDroppedUrls(std::__Cr::unique_ptr<BrowserRootView::DropInfo, std::__Cr::default_delete<BrowserRootView::DropInfo>>, ui::DropTargetEvent const&, ui::mojom::DragOperation&, std::__Cr::unique_ptr<ui::LayerTreeOwner, std::__Cr::default_delete<ui::LayerTreeOwner>>) + 744
21  browser_tests                       0x000000010865c310 BrowserRootViewBrowserTest_DropOrderingCorrect_Test::RunTestOnMainThread() + 2168
22  browser_tests                       0x000000011473a44c content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() + 1224
23  browser_tests                       0x000000011473d8b8 void base::internal::DecayedFunctorTraits<void (content::BrowserTestBase::*)(), content::BrowserTestBase*>::Invoke<void (content::BrowserTestBase::*)(), content::BrowserTestBase*>(void (content::BrowserTestBase::*)(), content::BrowserTestBase*&&) + 140
24  browser_tests                       0x000000011473d800 void base::internal::InvokeHelper<false, base::internal::FunctorTraits<void (content::BrowserTestBase::*&&)(), content::BrowserTestBase*>, void, 0ul>::MakeItSo<void (content::BrowserTestBase::*)(), std::__Cr::tuple<base::internal::UnretainedWrapper<content::BrowserTestBase, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>>(void (content::BrowserTestBase::*&&)(), std::__Cr::tuple<base::internal::UnretainedWrapper<content::BrowserTestBase, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>&&) + 108
25  browser_tests                       0x000000011473d788 void base::internal::Invoker<base::internal::FunctorTraits<void (content::BrowserTestBase::*&&)(), content::BrowserTestBase*>, base::internal::BindState<true, true, false, void (content::BrowserTestBase::*)(), base::internal::UnretainedWrapper<content::BrowserTestBase, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void ()>::RunImpl<void (content::BrowserTestBase::*)(), std::__Cr::tuple<base::internal::UnretainedWrapper<content::BrowserTestBase, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, 0ul>(void (content::BrowserTestBase::*&&)(), std::__Cr::tuple<base::internal::UnretainedWrapper<content::BrowserTestBase, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>&&, std::__Cr::integer_sequence<unsigned long, 0ul>) + 32
26  browser_tests                       0x000000011473d710 base::internal::Invoker<base::internal::FunctorTraits<void (content::BrowserTestBase::*&&)(), content::BrowserTestBase*>, base::internal::BindState<true, true, false, void (content::BrowserTestBase::*)(), base::internal::UnretainedWrapper<content::BrowserTestBase, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void ()>::RunOnce(base::internal::BindStateBase*) + 44
27  libcontent.dylib                    0x0000000356255950 base::OnceCallback<void ()>::Run() && + 220
28  libcontent.dylib                    0x00000003581af1f8 content::BrowserMainLoop::InterceptMainMessageLoopRun() + 140
29  libcontent.dylib                    0x00000003581af2bc content::BrowserMainLoop::RunMainMessageLoop() + 44
30  libcontent.dylib                    0x00000003581c8f2c content::BrowserMainRunnerImpl::Run() + 264
31  libcontent.dylib                    0x00000003581a9280 content::BrowserMain(content::MainFunctionParams) + 236
32  libcontent.dylib                    0x000000035b6be43c content::RunBrowserProcessMain(content::MainFunctionParams, content::ContentMainDelegate*) + 348
33  libcontent.dylib                    0x000000035b6c08c0 content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams, bool) + 1616
34  libcontent.dylib                    0x000000035b6c0110 content::ContentMainRunnerImpl::Run() + 964
35  libcontent.dylib                    0x000000035b6bc7f4 content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) + 616
36  libcontent.dylib                    0x000000035b6bce5c content::ContentMain(content::ContentMainParams) + 84
37  browser_tests                       0x0000000114739734 content::BrowserTestBase::SetUp() + 2860
38  browser_tests                       0x0000000111aa2edc InProcessBrowserTest::SetUp() + 1304
39  browser_tests                       0x000000010b973244 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) + 140
40  browser_tests                       0x000000010b946f74 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) + 96
41  browser_tests                       0x000000010b946e70 testing::Test::Run() + 108
42  browser_tests                       0x000000010b947930 testing::TestInfo::Run() + 312
43  browser_tests                       0x000000010b9488ac testing::TestSuite::Run() + 416
44  browser_tests                       0x000000010b954204 testing::internal::UnitTestImpl::RunAllTests() + 1036
45  browser_tests                       0x000000010b978edc bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) + 140
46  browser_tests                       0x000000010b953d7c bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) + 96
47  browser_tests                       0x000000010b953c7c testing::UnitTest::Run() + 228
48  browser_tests                       0x0000000111b59438 RUN_ALL_TESTS() + 16
49  browser_tests                       0x0000000111b5941c base::TestSuite::RunAllTests() + 20
50  browser_tests                       0x0000000111b58088 base::TestSuite::Run() + 220
51  browser_tests                       0x0000000114c5923c ChromeTestSuiteRunner::RunTestSuiteInternal(ChromeTestSuite*) + 72
52  browser_tests                       0x0000000114c592f8 ChromeTestSuiteRunner::RunTestSuite(int, char**) + 84
53  browser_tests                       0x0000000114c594e8 ChromeTestLauncherDelegate::RunTestSuite(int, char**) + 56
54  browser_tests                       0x00000001148844a0 content::LaunchTestsInternal(content::TestLauncherDelegate*, unsigned long, int, char**) + 1084
55  browser_tests                       0x0000000114884994 content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) + 284
56  browser_tests                       0x0000000114c59b88 LaunchChromeTests(unsigned long, content::TestLauncherDelegate*, int, char**) + 360
57  browser_tests                       0x0000000111901040 main + 240
58  dyld                                0x0000000188bd7154 start + 2476
Crash keys:
  "navigation_request_is_same_document" = "same-doc"
  "navigation_request_url" = "about:blank#A"
  "navigation_request_initiator" = "nullptr"
  "num-extensions" = "0"
  "amfi-status" = "rv=0 status=0x0 allow_everything=0"
  "reentry_guard_tls_slot" = "395"
  "switch-25" = "about:blank"
  "switch-24" = "--disable-gpu-process-for-dx12-info-collection"
  "switch-23" = "--force-color-profile=srgb"
  "switch-22" = "--disable-backgrounding-occluded-windows"
  "switch-21" = "--log-gpu-control-list-decisions"
  "switch-20" = "--dom-automation"
  "switch-19" = "--log-missing-unload-ack"
  "switch-18" = "--ipc-connection-timeout=60"
  "switch-17" = "--browser-test"
  "switch-16" = "--use-fake-device-for-media-stream"
  "switch-15" = "--disable-zero-browsers-open-for-tests"
  "switch-14" = "--test-type=browser"
  "switch-13" = "--disable-component-update"
  "switch-12" = "--use-mock-keychain"
  "switch-11" = "--disable-default-apps"
  "switch-10" = "--no-default-browser-check"
  "switch-9" = "--no-first-run"
  "switch-8" = "--disable-auto-reload"
  "switch-7" = "--user-data-dir=/var/folders/rn/dqnlqxk5183__77rr875tjq8000mw2/T"
  "switch-6" = "--test-launcher-retries-left=0"
  "switch-5" = "--test-launcher-output=/var/folders/rn/dqnlqxk5183__77rr875tjq80"
  "switch-4" = "--single-process-tests"
  "switch-3" = "--gtest_filter=BrowserRootViewBrowserTest.DropOrderingCorrect"
  "switch-2" = "--gtest_also_run_disabled_tests"
  "switch-1" = "--disable-gpu-process-for-dx12-info-collection"
  "num-switches" = "30"
  "commandline-disabled-feature-3" = "TestFeatureForBrowserTest2"
  "commandline-disabled-feature-2" = "RestartNetworkServiceUnsandboxedForFailedLaunch"
  "commandline-disabled-feature-1" = "PreconnectToSearch"
  "commandline-enabled-feature-2" = "TestFeatureForBrowserTest1"
  "commandline-enabled-feature-1" = "*TestBlinkFeatureDefault"
  "osarch" = "arm64"
  "pid" = "88775"
  "ptype" = "browser"

I added in a WaitForLoadStop but it didn't help. Ideas? Thanks.

Avi

Avi Drissman

unread,
Aug 14, 2024, 11:03:09 AM8/14/24
to navigation-dev
What seems to cause the failure is trying to take a tab that's navigated to "about:blank#1" and navigate it to "about:blank#A".

This seems to repro in normal Chrome; filed https://crbug.com/359807735.
Reply all
Reply to author
Forward
0 new messages