Open
Bug 1132865
Opened 10 years ago
Updated 2 years ago
Crash in mozilla::dom::workers::SharedWorker::Resume
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: baku, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
I didn't investigate this issue a lot and if it's needed I can provide a simple test.
The fastest way to "resolve" the issue is to remove the 2 assertions.
This is similar to Bug 978260.
I'll submit a patch that removes the 2 assertions... but I guess it will be a r- :)
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff0332e41 in mozilla::dom::workers::SharedWorker::Resume (this=0x13d6490) at /home/baku/Sources/m/barfoo/src/dom/workers/SharedWorker.cpp:100
100 MOZ_ASSERT(IsSuspended());
(gdb) bt
#0 0x00007ffff0332e41 in mozilla::dom::workers::SharedWorker::Resume (this=0x13d6490) at /home/baku/Sources/m/barfoo/src/dom/workers/SharedWorker.cpp:100
#1 0x00007ffff036ea37 in mozilla::dom::workers::WorkerPrivateParent<mozilla::dom::workers::WorkerPrivate>::Resume(JSContext*, nsPIDOMWindow*)::Closure::Resume(unsigned long const&, mozilla::dom::workers::SharedWorker*, void*) (aKey=@0x17f2108: 1, aSharedWorker=0x13d6490,
aClosure=0x7fffffffc350) at /home/baku/Sources/m/barfoo/src/dom/workers/WorkerPrivate.cpp:2695
#2 0x00007ffff037bc0a in nsBaseHashtable<nsUint64HashKey, mozilla::dom::workers::SharedWorker*, mozilla::dom::workers::SharedWorker*>::s_EnumReadStub (aTable=0x1f07d28, aHdr=0x17f2100, aNumber=0, aArg=0x7fffffffc2f0) at ../../dist/include/nsBaseHashtable.h:391
#3 0x00007fffedc34008 in PLDHashTable::Enumerate (this=0x1f07d28, aEtor=0x7ffff037bbb0 <nsBaseHashtable<nsUint64HashKey, mozilla::dom::workers::SharedWorker*, mozilla::dom::workers::SharedWorker*>::s_EnumReadStub(PLDHashTable*, PLDHashEntryHdr*, unsigned int, void*)>,
aArg=0x7fffffffc2f0) at /home/baku/Sources/m/barfoo/src/xpcom/glue/pldhash.cpp:751
#4 0x00007fffedc329de in PL_DHashTableEnumerate (aTable=0x1f07d28, aEtor=0x7ffff037bbb0 <nsBaseHashtable<nsUint64HashKey, mozilla::dom::workers::SharedWorker*, mozilla::dom::workers::SharedWorker*>::s_EnumReadStub(PLDHashTable*, PLDHashEntryHdr*, unsigned int, void*)>,
aArg=0x7fffffffc2f0) at /home/baku/Sources/m/barfoo/src/xpcom/glue/pldhash.cpp:802
#5 0x00007ffff0377f05 in nsBaseHashtable<nsUint64HashKey, mozilla::dom::workers::SharedWorker*, mozilla::dom::workers::SharedWorker*>::EnumerateRead (this=0x1f07d28,
aEnumFunc=0x7ffff036e952 <mozilla::dom::workers::WorkerPrivateParent<mozilla::dom::workers::WorkerPrivate>::Resume(JSContext*, nsPIDOMWindow*)::Closure::Resume(unsigned long const&, mozilla::dom::workers::SharedWorker*, void*)>, aUserArg=0x7fffffffc350)
at ../../dist/include/nsBaseHashtable.h:176
#6 0x00007ffff036ec20 in mozilla::dom::workers::WorkerPrivateParent<mozilla::dom::workers::WorkerPrivate>::Resume (this=0x1f07a50, aCx=0x2f54150, aWindow=0x37f2840) at /home/baku/Sources/m/barfoo/src/dom/workers/WorkerPrivate.cpp:2711
#7 0x00007ffff0370d0c in mozilla::dom::workers::WorkerPrivateParent<mozilla::dom::workers::WorkerPrivate>::SynchronizeAndResumeRunnable::Run (this=0x1a04320) at /home/baku/Sources/m/barfoo/src/dom/workers/WorkerPrivate.cpp:1965
#8 0x00007fffedbeb823 in nsThread::ProcessNextEvent (this=0x4f71e0, aMayWait=false, aResult=0x7fffffffc4ff) at /home/baku/Sources/m/barfoo/src/xpcom/threads/nsThread.cpp:855
#9 0x00007fffedc2f912 in NS_ProcessNextEvent (aThread=0x4f71e0, aMayWait=false) at /home/baku/Sources/m/barfoo/src/xpcom/glue/nsThreadUtils.cpp:265
#10 0x00007fffee0f36cc in mozilla::ipc::MessagePump::Run (this=0x4f4690, aDelegate=0x4f67e0) at /home/baku/Sources/m/barfoo/src/ipc/glue/MessagePump.cpp:99
#11 0x00007fffee09e225 in MessageLoop::RunInternal (this=0x4f67e0) at /home/baku/Sources/m/barfoo/src/ipc/chromium/src/base/message_loop.cc:233
#12 0x00007fffee09e1ba in MessageLoop::RunHandler (this=0x4f67e0) at /home/baku/Sources/m/barfoo/src/ipc/chromium/src/base/message_loop.cc:226
#13 0x00007fffee09e14b in MessageLoop::Run (this=0x4f67e0) at /home/baku/Sources/m/barfoo/src/ipc/chromium/src/base/message_loop.cc:200
#14 0x00007ffff05875fc in nsBaseAppShell::Run (this=0x9110f0) at /home/baku/Sources/m/barfoo/src/widget/nsBaseAppShell.cpp:164
#15 0x00007ffff123bb72 in nsAppStartup::Run (this=0x8b2d30) at /home/baku/Sources/m/barfoo/src/toolkit/components/startup/nsAppStartup.cpp:281
#16 0x00007ffff12c780b in XREMain::XRE_mainRun (this=0x7fffffffc8c0) at /home/baku/Sources/m/barfoo/src/toolkit/xre/nsAppRunner.cpp:4160
#17 0x00007ffff12c7b5c in XREMain::XRE_main (this=0x7fffffffc8c0, argc=5, argv=0x7fffffffddc8, aAppData=0x7fffffffcae0) at /home/baku/Sources/m/barfoo/src/toolkit/xre/nsAppRunner.cpp:4236
#18 0x00007ffff12c7df6 in XRE_main (argc=5, argv=0x7fffffffddc8, aAppData=0x7fffffffcae0, aFlags=0) at /home/baku/Sources/m/barfoo/src/toolkit/xre/nsAppRunner.cpp:4456
#19 0x0000000000403b1a in do_main (argc=5, argv=0x7fffffffddc8, xreDirectory=0x430010) at /home/baku/Sources/m/barfoo/src/browser/app/nsBrowserApp.cpp:294
#20 0x0000000000403f99 in main (argc=5, argv=0x7fffffffddc8) at /home/baku/Sources/m/barfoo/src/browser/app/nsBrowserApp.cpp:667
(gdb) q
Attachment #8564060 -
Flags: review?(khuey)
Comment on attachment 8564060 [details] [diff] [review]
asserts.patch
Review of attachment 8564060 [details] [diff] [review]:
-----------------------------------------------------------------
I think we've discussed this before, but our suspend/resume handling is totally broken, and we should fix that.
Attachment #8564060 -
Flags: review?(khuey)
Comment 3•10 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #1)
> I think we've discussed this before, but our suspend/resume handling is
> totally broken, and we should fix that.
Can you please clarify?
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(khuey)
Comment 4•10 years ago
|
||
(FWIW this bug is very annoying since I hit it every time that I try to debug a test case using service workers in a debug build, so I'd appreciate an idea to fix it)
I never got to fixing this :/
The basic problem here is that we can run scripts in a Window that currently has timeouts suspended (consider onreadystatechange for a sync XHR). My plan was basically to fix this with the segmented event queues thing (by replacing "suspending timeouts" with pausing the main event queue for that window and spinning up a separate queue for sync events like workers do). Quantum will save us!
Flags: needinfo?(khuey)
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•