extensions_browsertests WebViewAPITest.CloseOnLoadcommit failing on ToTMac, Mac ASan 64 Tests (1) |
||||||
Issue descriptionStarted here, has failed twice so far: https://ci.chromium.org/buildbot/chromium.clang/ToTMac/1759 https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.clang%2FToTMac%2F1760%2F%2B%2Frecipes%2Fsteps%2Fextensions_browsertests%2F0%2Flogs%2FWebViewAPITest.CloseOnLoadcommit%2F0 Sadly no symbols: [ RUN ] WebViewAPITest.CloseOnLoadcommit DevTools listening on ws://127.0.0.1:63481/devtools/browser/85016c04-b9c8-40b2-aa8c-2530324bf31a objc[37954]: Class MockCrApp is implemented in both /b/s/w/ir/out/Release/libtest_runner.dylib (0x11b0ac7a0) and /b/s/w/ir/out/Release/App Shell.app/Contents/Frameworks/App Shell Framework.framework/Versions/A/App Shell Framework (0x1092da868). One of the two will be used. Which one is undefined. objc[37955]: Class MockCrApp is implemented in both /b/s/w/ir/out/Release/libtest_runner.dylib (0x1223797a0) and /b/s/w/ir/out/Release/App Shell.app/Contents/Frameworks/App Shell Framework.framework/Versions/A/App Shell Framework (0x1105ea868). One of the two will be used. Which one is undefined. 2018-06-14 23:08:24.838 extensions_browsertests[37952:552129] -[NSApplication isHandlingSendEvent]: unrecognized selector sent to instance 0x7f8b3c702bd0 Received signal 4 <unknown> 7fff2f1c8794 [0x000111d10d4c] [0x000111d10be1] [0x7fff5950af5a] [0x000008000100] [0x7fff2f1c867c] [0x7fff2f2b2de0] [0x7fff319da992] [0x7fff5869ea41] [0x7fff5732f7c9] [0x7fff5732f26d] [0x7fff5869ca71] [0x7fff319e15e4] [0x7fff318c1f03] (filed issue 853171 for the selector thing, but that's probably not the cause.) The test is also disabled on Windows, but the test is several years old and has generally worked fine, so maybe it's a compiler thing.
,
Jun 17 2018
It also fails on the mac asan memory bot if I add extensions_browsertests there (it's an accident that it's not already running): https://ci.chromium.org/buildbot/tryserver.chromium.mac/mac_chromium_asan_rel_ng/5029 There's even a real stack there: [ RUN ] WebViewAPITest.CloseOnLoadcommit DevTools listening on ws://127.0.0.1:61553/devtools/browser/738bd345-4cce-4209-b02a-7aa421da0aa4 [36518:775:0615/091202.882677:32314534150010:WARNING:vt_video_decode_accelerator_mac.cc(193)] Failed to create VTDecompressionSession: Error Domain=NSOSStatusErrorDomain Code=-8973 "codecOpenErr" (-8973) [36518:775:0615/091202.883655:32314535103673:WARNING:vt_video_decode_accelerator_mac.cc(215)] Hardware decoding with VideoToolbox is not supported [36518:775:0615/091203.024246:32314675710002:ERROR:vt_video_encode_accelerator_mac.cc(516)] VTCompressionSessionCreate failed: -12908 [36517:775:0615/091204.385921:32316037457022:FATAL:message_pump_mac.mm(907)] Check failed: [NSApp conformsToProtocol:@protocol(CrAppProtocol)]. 0 extensions_browsertests 0x0000000110db7edc base::debug::StackTrace::StackTrace(unsigned long) + 28 1 extensions_browsertests 0x0000000110bc29a7 logging::LogMessage::~LogMessage() + 695 2 extensions_browsertests 0x0000000110c0d573 base::MessagePumpMac::IsHandlingSendEvent() + 339 3 extensions_browsertests 0x000000010d34bd8b non-virtual thunk to content::WebContentsImpl::Close(content::RenderViewHost*) + 107 4 extensions_browsertests 0x000000010ceefbea bool IPC::MessageT<ViewHostMsg_Close_Meta, std::__1::tuple<>, void>::Dispatch<content::RenderViewHostImpl, content::RenderViewHostImpl, void, void (content::RenderViewHostImpl::*)()>(IPC::Message const*, content::RenderViewHostImpl*, content::RenderViewHostImpl*, void*, void (content::RenderViewHostImpl::*)()) + 378 5 extensions_browsertests 0x000000010ceeddb8 content::RenderViewHostImpl::OnMessageReceived(IPC::Message const&) + 1832 6 extensions_browsertests 0x000000010cf01f10 content::RenderWidgetHostImpl::OnMessageReceived(IPC::Message const&) + 320 7 extensions_browsertests 0x000000010ce9372e content::RenderProcessHostImpl::OnMessageReceived(IPC::Message const&) + 1390 8 extensions_browsertests 0x00000001120a74f1 IPC::ChannelProxy::Context::OnDispatchMessage(IPC::Message const&) + 385 9 extensions_browsertests 0x00000001120ae9ac base::internal::Invoker<base::internal::BindState<void (IPC::ChannelProxy::Context::*)(IPC::Message const&), scoped_refptr<IPC::ChannelProxy::Context>, IPC::Message>, void ()>::Run(base::internal::BindStateBase*) + 460 10 extensions_browsertests 0x0000000110b816f9 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 825 11 extensions_browsertests 0x0000000110bf4c80 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) + 288 12 extensions_browsertests 0x0000000110bffb2f base::MessageLoop::RunTask(base::PendingTask*) + 1391 13 extensions_browsertests 0x0000000110c00621 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 497 14 extensions_browsertests 0x0000000110c00ce4 base::MessageLoop::DoWork() + 1444 15 extensions_browsertests 0x0000000110c0a69d base::MessagePumpCFRunLoopBase::RunWork() + 333 16 extensions_browsertests 0x0000000110bc83fa base::mac::CallWithEHFrame(void () block_pointer) + 10 17 extensions_browsertests 0x0000000110c08c66 base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 374 18 CoreFoundation 0x00007fff543ebd81 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 19 CoreFoundation 0x00007fff544a365c __CFRunLoopDoSource0 + 108 20 CoreFoundation 0x00007fff543ced30 __CFRunLoopDoSources0 + 208 21 CoreFoundation 0x00007fff543ce1ad __CFRunLoopRun + 1293 22 CoreFoundation 0x00007fff543cda07 CFRunLoopRunSpecific + 487 23 Foundation 0x00007fff564e4f26 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277 24 extensions_browsertests 0x000000011460103c ___ZN2ui24CATransactionCoordinator15SynchronizeImplEv_block_invoke + 1420 25 QuartzCore 0x00007fff5f74d897 CA::Transaction::run_commit_handlers(CATransactionPhase) + 49 26 QuartzCore 0x00007fff5f74cd5f CA::Context::commit_transaction(CA::Transaction*) + 1449 27 QuartzCore 0x00007fff5f74c495 CA::Transaction::commit() + 487 28 AppKit 0x00007fff52252a72 __65+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayRefresh]_block_invoke + 283 29 CoreFoundation 0x00007fff543eb787 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 30 CoreFoundation 0x00007fff543eb6af __CFRunLoopDoObservers + 511 31 CoreFoundation 0x00007fff543ce178 __CFRunLoopRun + 1240 32 CoreFoundation 0x00007fff543cda07 CFRunLoopRunSpecific + 487 33 HIToolbox 0x00007fff536a9d96 RunCurrentEventLoopInMode + 286 34 HIToolbox 0x00007fff536a9b06 ReceiveNextEventCommon + 613 35 HIToolbox 0x00007fff536a9884 _BlockUntilNextEventMatchingListInModeWithFilter + 64 36 AppKit 0x00007fff5195ba73 _DPSNextEvent + 2085 37 AppKit 0x00007fff520f1e34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044 38 AppKit 0x00007fff51950885 -[NSApplication run] + 764 39 extensions_browsertests 0x0000000110c0ce93 base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) + 1011 40 extensions_browsertests 0x0000000110c07c91 base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 401 41 extensions_browsertests 0x0000000110bfe9d6 base::MessageLoop::Run(bool) + 422 42 extensions_browsertests 0x0000000110c7d19d base::RunLoop::Run() + 685 43 extensions_browsertests 0x000000011d6c7d32 ExtensionTestMessageListener::WaitUntilSatisfied() + 322 44 extensions_browsertests 0x0000000109742582 extensions::WebViewAPITest_CloseOnLoadcommit_Test::RunTestOnMainThread() + 674 45 extensions_browsertests 0x00000001168986db content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() + 1499 46 extensions_browsertests 0x000000011092df8a extensions::ShellBrowserMainParts::PreMainMessageLoopRun() + 2938 47 extensions_browsertests 0x000000010c217463 content::BrowserMainLoop::PreMainMessageLoopRun() + 355 48 extensions_browsertests 0x000000010d29769f content::StartupTaskRunner::RunAllTasksNow() + 415 49 extensions_browsertests 0x000000010c212c3a content::BrowserMainLoop::CreateStartupTasks() + 1850 50 extensions_browsertests 0x000000010c21f755 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&, std::__1::unique_ptr<content::BrowserProcessSubThread, std::__1::default_delete<content::BrowserProcessSubThread> >) + 469 51 extensions_browsertests 0x000000010c20bdef content::BrowserMain(content::MainFunctionParams const&, std::__1::unique_ptr<content::BrowserProcessSubThread, std::__1::default_delete<content::BrowserProcessSubThread> >) + 655 52 extensions_browsertests 0x000000011083ad5b content::RunBrowserProcessMain(content::MainFunctionParams const&, content::ContentMainDelegate*, std::__1::unique_ptr<content::BrowserProcessSubThread, std::__1::default_delete<content::BrowserProcessSubThread> >) + 587 53 extensions_browsertests 0x000000011083d8bd content::ContentMainRunnerImpl::Run() + 1965 54 extensions_browsertests 0x00000001150ce51d service_manager::Main(service_manager::MainParams const&) + 5501 55 extensions_browsertests 0x000000010df94b01 content::ContentMain(content::ContentMainParams const&) + 353 56 extensions_browsertests 0x0000000116897306 content::BrowserTestBase::SetUp() + 6054 57 extensions_browsertests 0x000000010977a46d extensions::AppShellTest::SetUp() + 797 58 extensions_browsertests 0x000000010df5ae35 testing::Test::Run() + 293 59 extensions_browsertests 0x000000010df5c816 testing::TestInfo::Run() + 950 60 extensions_browsertests 0x000000010df5dc87 testing::TestCase::Run() + 999 61 extensions_browsertests 0x000000010df83227 testing::internal::UnitTestImpl::RunAllTests() + 2775 If you think this is due to your change and it's not an easy fix, maybe revert for now so that we can add extensions_browsertests to the mac memory bot.
,
Jun 17 2018
,
Jun 18 2018
The asan crash seems a different one, which might caused by not setting NsApplication properly. But I checked again, and I can't find in which BrowserMainParts subclasses that I missed to move the setting of NsApplication earlier. Any thought? +rsesek. If we can find a fix quickly, I would hope not reverting that CL. Multiple CLs follow it...
,
Jun 18 2018
I'd probably run the tests under a debugger and break on +[NSApplication sharedApplication] to see what's initializing NSApp first.
,
Jun 18 2018
,
Jun 18 2018
NSApp is getting initialized here:
Note: Google Test filter = WebViewAPITest.CloseOnLoadcommit
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from WebViewAPITest, where TypeParam =
[ RUN ] WebViewAPITest.CloseOnLoadcommit
Process 82178 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x00007fff42efc15c AppKit`+[NSApplication sharedApplication]
AppKit`+[NSApplication sharedApplication]:
-> 0x7fff42efc15c <+0>: push rbp
0x7fff42efc15d <+1>: mov rbp, rsp
0x7fff42efc160 <+4>: push r15
0x7fff42efc162 <+6>: push r14
Target 0: (extensions_browsertests) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x00007fff42efc15c AppKit`+[NSApplication sharedApplication]
frame #1: 0x00000001177eeac1 libbase.dylib`base::MessagePumpMac::Create() at message_pump_mac.mm:926
frame #2: 0x00000001177dba99 libbase.dylib`base::MessageLoop::CreateMessagePumpForType(type=TYPE_UI) at message_loop.cc:127
frame #3: 0x00000001177d9d76 libbase.dylib`base::MessageLoop::BindToCurrentThread(this=0x000000014b405d90) at message_loop.cc:217
frame #4: 0x00000001177d9324 libbase.dylib`base::MessageLoop::MessageLoop(this=0x000000014b405d90, type=TYPE_UI) at message_loop.cc:43
frame #5: 0x000000010a71a624 libcontent.dylib`base::MessageLoopForUI::MessageLoopForUI(this=0x000000014b405d90) at message_loop.h:340
frame #6: 0x000000010a71a5f5 libcontent.dylib`base::MessageLoopForUI::MessageLoopForUI(this=0x000000014b405d90) at message_loop.h:340
frame #7: 0x000000010d5ddecd libcontent.dylib`content::ContentMainRunnerImpl::Run() [inlined] std::__1::__unique_if<base::MessageLoopForUI>::__unique_single std::__1::make_unique<base::MessageLoopForUI>() at memory:3114
frame #8: 0x000000010d5ddeb9 libcontent.dylib`content::ContentMainRunnerImpl::Run(this=0x0000000151128180) at content_main_runner_impl.cc:981
frame #9: 0x000000010d5d3215 libcontent.dylib`content::ContentServiceManagerMainDelegate::RunEmbedderProcess(this=0x00007ffeefbfd488) at content_service_manager_main_delegate.cc:53
frame #10: 0x0000000123874078 libembedder.dylib`service_manager::Main(params=0x00007ffeefbfd470) at main.cc:459
frame #11: 0x000000010d5dac66 libcontent.dylib`content::ContentMain(params=0x00007ffeefbff2a8) at content_main.cc:19
frame #12: 0x0000000103386eb0 extensions_browsertests`content::BrowserTestBase::SetUp(this=0x000000015111d990) at browser_test_base.cc:325
frame #13: 0x000000010012445b extensions_browsertests`extensions::AppShellTest::SetUp(this=0x000000015111d990) at shell_test.cc:47
frame #14: 0x0000000101478d1e extensions_browsertests`void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(object=0x000000015111d990, method=11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00, location="SetUp()")(), char const*) at gtest.cc:2417
frame #15: 0x000000010144e262 extensions_browsertests`void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(object=0x000000015111d990, method=11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00, location="SetUp()")(), char const*) at gtest.cc:2472
frame #16: 0x000000010144e144 extensions_browsertests`testing::Test::Run(this=0x000000015111d990) at gtest.cc:2487
frame #17: 0x000000010144f280 extensions_browsertests`testing::TestInfo::Run(this=0x0000000151112830) at gtest.cc:2667
frame #18: 0x000000010145064f extensions_browsertests`testing::TestCase::Run(this=0x0000000151112380) at gtest.cc:2785
frame #19: 0x0000000101464cc6 extensions_browsertests`testing::internal::UnitTestImpl::RunAllTests(this=0x0000000151107d10) at gtest.cc:5047
frame #20: 0x000000010147bdce extensions_browsertests`bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x0000000151107d10, method=50 49 46 01 01 00 00 00 00 00 00 00 00 00 00 00, location="auxiliary test code (environments or event listeners)")(), char const*) at gtest.cc:2417
frame #21: 0x00000001014648d2 extensions_browsertests`bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x0000000151107d10, method=50 49 46 01 01 00 00 00 00 00 00 00 00 00 00 00, location="auxiliary test code (environments or event listeners)")(), char const*) at gtest.cc:2472
frame #22: 0x00000001014647ab extensions_browsertests`testing::UnitTest::Run(this=0x0000000103e70a90) at gtest.cc:4663
frame #23: 0x00000001034291d1 extensions_browsertests`RUN_ALL_TESTS() at gtest.h:2329
frame #24: 0x00000001034284db extensions_browsertests`base::TestSuite::Run(this=0x00007ffeefbff068) at test_suite.cc:275
frame #25: 0x000000010012463d extensions_browsertests`extensions::AppShellTestLauncherDelegate::RunTestSuite(this=0x00007ffeefbff960, argc=3, argv=0x00007ffeefbff998) at shell_test_launcher_delegate.cc:15
frame #26: 0x00000001033c08f2 extensions_browsertests`content::LaunchTests(launcher_delegate=0x00007ffeefbff960, parallel_jobs=1, argc=3, argv=0x00007ffeefbff998) at test_launcher.cc:625
frame #27: 0x0000000100124910 extensions_browsertests`main(argc=3, argv=0x00007ffeefbff998) at shell_tests_main.cc:17
frame #28: 0x00007fff6d856015 libdyld.dylib`start + 1
frame #29: 0x00007fff6d856015 libdyld.dylib`start + 1
,
Jun 18 2018
,
Jun 18 2018
Thanks Robert! It seems the initialization occurs as expected. It is called in delegate->PreContentInitialization() (https://chromium-review.googlesource.com/c/chromium/src/+/1072387/26/content/app/content_main_runner_impl.cc#975). If the NsApplication has set, what can cause the check of CrAppProtocol failed?
,
Jun 18 2018
No, I do not think the initialization is occurring as expected -- that's what #7 shows. The first call is happening directly on NSApplication, but the CHECK requires that the first call to the +sharedApplication selector must be done on a class that conforms to CrAppProtocol.
,
Jun 18 2018
It looks like the issue is that extensions::TestShellMainDelegate does not register an NSApp instance.
,
Jun 18 2018
Hmmm, the extensions::ShellMainDelegate doesn't register an NsApp instance in the existing implementation. The registration could happen somewhere hidden in the code, so I missed it in the first place. Will add an override function and see whether it fixes the crash. Thanks Robert!
,
Jun 18 2018
A CL WIP https://chromium-review.googlesource.com/c/chromium/src/+/1105194. I locally build it and the test passes. I will polish it tomorrow!
,
Jun 19 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8861a325d84fa8d7fb6150b11f60854fe106d35a commit 8861a325d84fa8d7fb6150b11f60854fe106d35a Author: Xi Han <hanxi@chromium.org> Date: Tue Jun 19 18:02:42 2018 extension_browsertest's WebViewAPITest.CloseOnLoadcommit failing on ToTMac The test failure is due to NSApplication isn't set in extensions::TestShellMainDelegate. This CL also did a clean up of CL: https://crrev.com/c/1072387. Bug: 853172 Change-Id: Id42649427b659a2b97cd0236e0d1d4d815ba4158 Reviewed-on: https://chromium-review.googlesource.com/1105194 Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Xi Han <hanxi@chromium.org> Cr-Commit-Position: refs/heads/master@{#568525} [modify] https://crrev.com/8861a325d84fa8d7fb6150b11f60854fe106d35a/chrome/app/chrome_main_delegate.cc [modify] https://crrev.com/8861a325d84fa8d7fb6150b11f60854fe106d35a/chrome/app/chrome_main_mac.h [modify] https://crrev.com/8861a325d84fa8d7fb6150b11f60854fe106d35a/chrome/app/chrome_main_mac.mm [modify] https://crrev.com/8861a325d84fa8d7fb6150b11f60854fe106d35a/extensions/shell/BUILD.gn [modify] https://crrev.com/8861a325d84fa8d7fb6150b11f60854fe106d35a/extensions/shell/test/DEPS [modify] https://crrev.com/8861a325d84fa8d7fb6150b11f60854fe106d35a/extensions/shell/test/test_shell_main_delegate.h [add] https://crrev.com/8861a325d84fa8d7fb6150b11f60854fe106d35a/extensions/shell/test/test_shell_main_delegate_mac.mm
,
Jun 19 2018
,
Jun 25 2018
,
Jun 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ee124a002ac971c60330eaac0a5c064dbc1107b9 commit ee124a002ac971c60330eaac0a5c064dbc1107b9 Author: Nico Weber <thakis@chromium.org> Date: Fri Jun 29 15:49:28 2018 Run extensions_browsertests on mac asan bot. It should pass now. Bug: 843511, 853172 Change-Id: Ibb9b8add16581a2b63fbef38918d366444fb98e4 Reviewed-on: https://chromium-review.googlesource.com/1120226 Reviewed-by: Hans Wennborg <hans@chromium.org> Cr-Commit-Position: refs/heads/master@{#571492} [modify] https://crrev.com/ee124a002ac971c60330eaac0a5c064dbc1107b9/testing/buildbot/chromium.memory.json [modify] https://crrev.com/ee124a002ac971c60330eaac0a5c064dbc1107b9/testing/buildbot/test_suite_exceptions.pyl |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by hanxi@chromium.org
, Jun 15 2018Owner: hanxi@chromium.org
Status: (was: Untriaged)