Open Bug 1649847 Opened 5 years ago Updated 11 months ago

application crashed [@ NS_DispatchToMainThread(already_AddRefed<nsIRunnable>&&, unsigned int)] during dispatch vsync on main thread

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- affected
firefox77 --- unaffected
firefox78 --- wontfix
firefox79 --- wontfix
firefox80 --- fix-optional

People

(Reporter: CuveeHsu, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Regressed by bug 1630912.
This is similar to Bug 1635349 but it's reproducible by running this test locally
toolkit/components/extensions/test/xpcshell/test_ext_webRequest_filterResponseData.js

I don't know why treeherder is happy with this.

1:25.48 pid:14773 #01: NS_DispatchToMainThread(already_AddRefed<nsIRunnable>&&, unsigned int) (/home/juhsu/mozilla-central/xpcom/threads/nsThreadUtils.cpp:259)                                            
1:25.49 pid:14773 #02: mozilla::gfx::VsyncSource::Display::NotifyVsync(mozilla::TimeStamp) (/home/juhsu/mozilla-central/gfx/thebes/VsyncSource.cpp:120)                                                    
1:25.49 pid:14773 #03: SoftwareDisplay::NotifyVsync(mozilla::TimeStamp) (/home/juhsu/mozilla-central/gfx/thebes/SoftwareVsyncSource.cpp:100)                                                               
1:25.49 pid:14773 #04: SoftwareDisplay::EnableVsync() (/home/juhsu/mozilla-central/gfx/thebes/SoftwareVsyncSource.cpp:0)                                                                                   
1:25.49 pid:14773 #05: decltype ((*{parm#1}.*{parm#2})(((((Get<>)({parm#3})).PassAsParameter)())...)) mozilla::detail::RunnableMethodArguments<>::applyImpl<SoftwareDisplay, void (SoftwareDisplay::*)(), ,
>(SoftwareDisplay*, void (SoftwareDisplay::*)(), mozilla::Tuple<>&, std::integer_sequence<unsigned long, ()...>) (/home/juhsu/mozilla-central/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:1188)   
1:25.50 pid:14773 #06: decltype ((applyImpl)({parm#1}, {parm#2}, (*this).mArguments, std::integer_sequence<unsigned long, >{})) mozilla::detail::RunnableMethodArguments<>::apply<SoftwareDisplay, void (So
twareDisplay::*)()>(SoftwareDisplay*, void (SoftwareDisplay::*)()) (/home/juhsu/mozilla-central/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:1194)                                                 
1:25.50 pid:14773 #07: mozilla::detail::RunnableMethodImpl<SoftwareDisplay*, void (SoftwareDisplay::*)(), true, (mozilla::RunnableKind)0, >::Run() (/home/juhsu/mozilla-central/obj-x86_64-pc-linux-gnu/dis
/include/nsThreadUtils.h:0)                                                                                                                                                                                
1:25.50 pid:14773 #08: MessageLoop::RunTask(already_AddRefed<nsIRunnable>) (/home/juhsu/mozilla-central/ipc/chromium/src/base/message_loop.cc:465)                                                         
1:25.50 pid:14773 #09: MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask&&) (/home/juhsu/mozilla-central/ipc/chromium/src/base/message_loop.cc:473)                                              
1:25.50 pid:14773 #10: MessageLoop::DoWork() (/home/juhsu/mozilla-central/ipc/chromium/src/base/message_loop.cc:548)                                                                                       
1:25.50 pid:14773 #11: base::MessagePumpDefault::Run(base::MessagePump::Delegate*) (/home/juhsu/mozilla-central/ipc/chromium/src/base/message_pump_default.cc:35)                                          
1:25.50 pid:14773 #12: MessageLoop::RunInternal() (/home/juhsu/mozilla-central/ipc/chromium/src/base/message_loop.cc:334)                                                                                  
1:25.50 pid:14773 #13: MessageLoop::RunHandler() (/home/juhsu/mozilla-central/ipc/chromium/src/base/message_loop.cc:328)                                                                                   
1:25.50 pid:14773 #14: MessageLoop::Run() (/home/juhsu/mozilla-central/ipc/chromium/src/base/message_loop.cc:309)                                                                                          
1:25.50 pid:14773 #15: base::Thread::ThreadMain() (/home/juhsu/mozilla-central/ipc/chromium/src/base/thread.cc:192)                                                                                        
1:25.50 pid:14773 #16: ThreadFunc(void*) (/home/juhsu/mozilla-central/ipc/chromium/src/base/platform_thread_posix.cc:40)                                                                                   
1:25.52 pid:14773 #17: ??? (/lib/x86_64-linux-gnu/libpthread.so.0 + 0x76db)                                                                                                                                
1:25.52 pid:14773 #18: clone (/lib/x86_64-linux-gnu/libc.so.6 + 0x12188f)                                                                                                                                  
1:25.52 pid:14773 #19: ??? (???:???)                                                                                                                                                                       
1:25.52 pid:14773 [14785, SoftwareVsyncThread] ###!!! ASSERTION: Failed NS_DispatchToMainThread() in shutdown; leaking: 'false', file /home/juhsu/mozilla-central/xpcom/threads/nsThreadUtils.cpp, line 260
1:25.52 pid:14773 Hit MOZ_CRASH() at /home/juhsu/mozilla-central/memory/mozalloc/mozalloc_abort.cpp:33                                                                                                     
1:25.52 TEST_END: Test FAIL, expected PASS. Subtests passed 2/3. Unexpected 1                                                                                                                              
Flags: needinfo?(tnikkel)
Blocks: 1649848

I tried running this test on both mac and linux, in both cases it fails hitting asserts, but neither on mac nor linux does it fail hitting the assert in vsync, and the mac and linux asserts are different too.

Set release status flags based on info from the regressing bug 1630912

(In reply to Timothy Nikkel (:tnikkel) from comment #1)

I tried running this test on both mac and linux, in both cases it fails hitting asserts, but neither on mac nor linux does it fail hitting the assert in vsync, and the mac and linux asserts are different too.

I ran in linux on https://hg.mozilla.org/mozilla-central/rev/e950bdd669d4
The test fails and crashes (hit this bug) right after the failure.

0:29.22 pid:26549 [26549, Main Thread] WARNING: NS_ENSURE_SUCCESS_VOID(rv) failed with result 0x80004001 (NS_ERROR_NOT_IMPLEMENTED): file /home/juhsu/mozilla-central/caps/OriginAttributes.cpp, line 111  
0:29.89 pid:26549 [26549, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /home/juhsu/mozilla-central/docshell/base/nsDocShell.cpp, line 805        
0:29.89 ERROR Unexpected exception NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebNavigation.loadURI]                                                             
oadURI/<@chrome://global/content/elements/browser-custom-element.js:880:28                                                                                                                                 
wrapURIChangeCall@chrome://global/content/elements/browser-custom-element.js:806:11                                                                                                                        
oadURI@chrome://global/content/elements/browser-custom-element.js:879:12                                                                                                                                   
oadURL@resource://testing-common/ExtensionXPCShellUtils.jsm:281:18                                                                                                                                         
do_main@/home/juhsu/mozilla-central/testing/xpcshell/head.js:248:6                                                                                                                                         
execute_test@/home/juhsu/mozilla-central/testing/xpcshell/head.js:577:5                                                                                                                                    
-e:1:1                                                                                                                                                                                                     
                                                                                                                                                                                                           
0:29.89 INFO exiting test                                                                                                                                                                                  
0:30.02 FAIL test_stream_encoding_data - [test_stream_encoding_data : 337] Extension left running at test shutdown - "running" == "unloaded"
esource://testing-common/ExtensionXPCShellUtils.jsm:ExtensionWrapper/<:337
home/juhsu/mozilla-central/testing/xpcshell/head.js:_execute_test/<:641
home/juhsu/mozilla-central/testing/xpcshell/head.js:_execute_test:650
e:null:1
0:30.02 INFO exiting test
0:30.02 ERROR NS_ERROR_ABORT:
abort_failed_test@/home/juhsu/mozilla-central/testing/xpcshell/head.js:833:20
o_report_result@/home/juhsu/mozilla-central/testing/xpcshell/head.js:934:5
ssert<@/home/juhsu/mozilla-central/testing/xpcshell/head.js:73:21
roto.report@resource://testing-common/Assert.jsm:233:10
qual@resource://testing-common/Assert.jsm:275:8
xtensionWrapper/<@resource://testing-common/ExtensionXPCShellUtils.jsm:337:24
execute_test/<@/home/juhsu/mozilla-central/testing/xpcshell/head.js:641:28
execute_test@/home/juhsu/mozilla-central/testing/xpcshell/head.js:650:5
-e:1:1

0:30.04 ERROR Error: Found unexpected files in temporary directory: generated-extension.xpi at resource://testing-common/AddonTestUtils.jsm:450
nit/<@resource://testing-common/AddonTestUtils.jsm:450:15
execute_test/<@/home/juhsu/mozilla-central/testing/xpcshell/head.js:641:28
execute_test@/home/juhsu/mozilla-central/testing/xpcshell/head.js:653:16
-e:1:1

0:31.04 pid:26549 [26549, Main Thread] WARNING: Windowless browser was not closed prior to destruction: file /home/juhsu/mozilla-central/xpfe/appshell/nsAppShellService.cpp, line 376
0:31.05 pid:26549 [26549, Main Thread] WARNING: '!inner', file /home/juhsu/mozilla-central/dom/ipc/JSWindowActorProtocol.cpp, line 172
0:31.63 pid:26549 [26549, Main Thread] WARNING: Windowless browser was not closed prior to destruction: file /home/juhsu/mozilla-central/xpfe/appshell/nsAppShellService.cpp, line 376
0:31.67 pid:26549 [26549, Main Thread] WARNING: IPC message discarded: actor cannot send: file /home/juhsu/mozilla-central/ipc/glue/ProtocolUtils.cpp, line 470
0:31.77 pid:26549 [26549, Main Thread] WARNING: IPC message discarded: actor cannot send: file /home/juhsu/mozilla-central/ipc/glue/ProtocolUtils.cpp, line 470
0:31.77 pid:26549 [26549, SoftwareVsyncThread] WARNING: Called GetMainThread but there isn't a main thread and we're not the main thread.: file /home/juhsu/mozilla-central/xpcom/threads/nsThreadManager.c
p, line 651
0:31.77 pid:26549 [26549, SoftwareVsyncThread] WARNING: 'NS_FAILED(rv)', file /home/juhsu/mozilla-central/xpcom/threads/nsThreadUtils.cpp, line 258
0:31.77 pid:26549 \x07[26549, SoftwareVsyncThread] ###!!! ASSERTION: Failed NS_DispatchToMainThread() in shutdown; leaking: 'false', file /home/juhsu/mozilla-central/xpcom/threads/nsThreadUtils.cpp, line
260
0:31.77 pid:26549 #01: NS_DispatchToMainThread(already_AddRefed<nsIRunnable>&&, unsigned int) (/home/juhsu/mozilla-central/xpcom/threads/nsThreadUtils.cpp:259)
0:31.78 pid:26549 #02: NS_DispatchToMainThread(nsIRunnable*, unsigned int) (/home/juhsu/mozilla-central/xpcom/threads/nsThreadUtils.cpp:275)
Attached file macfailure
Flags: needinfo?(tnikkel)
Attached file linuxfailure

Based on the other failures that the tests ends with it is plausible that fixing them would mean we don't hit the assert in question.

Severity: -- → S3
Priority: -- → P3

Seems like there are other issues with this test (based on the existence of bug 1649848). I'll give another try at reproducing this in the future if some other changes happen that might make a difference in what I see locally, but it seems quite possible that other issues with the test are causing us to hit this assert.

(In reply to Timothy Nikkel (:tnikkel) from comment #7)

Seems like there are other issues with this test (based on the existence of bug 1649848). I'll give another try at reproducing this in the future if some other changes happen that might make a difference in what I see locally, but it seems quite possible that other issues with the test are causing us to hit this assert.

Bug 1649873 disable the test we are not going to support.
We could consider close this if the crashes only happen on those failed tests

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: