Closed
Bug 698860
Opened 14 years ago
Closed 14 years ago
Workers: Cycle collector calls DOM worker from wrong thread
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: Irving, Assigned: bent.mozilla)
Details
Attachments
(1 file)
658 bytes,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: Wrong thread!: 'NS_IsMainThread()', file /Users/ireid/tbird/comm-central/mozilla/dom/workers/WorkerPrivate.cpp, line 1440
The cycle collector is calling down into the DOM Worker code, which asserts because it's being called outside the main thread. This is easily reproduced on my trunk Thunderbird build under debugger, so find me in #maildev if you need more details.
Stack trace:
#0 0x0000000101d4dc5c in mozilla::dom::workers::AssertIsOnMainThread() at /Users/ireid/tbird/comm-central/mozilla/dom/workers/WorkerPrivate.cpp:1441
#1 0x0000000101d4f901 in mozilla::dom::workers::WorkerPrivateParent<mozilla::dom::workers::WorkerPrivate>::AssertIsOnParentThread() const ()
#2 0x0000000101d4fa33 in mozilla::dom::workers::WorkerPrivateParent<mozilla::dom::workers::WorkerPrivate>::TraceInstance(JSTracer*) ()
#3 0x0000000101d4aa20 in (anonymous namespace)::Worker::Trace(JSTracer*, JSObject*) at /Users/ireid/tbird/comm-central/mozilla/dom/workers/Worker.cpp:262
#4 0x0000000103323f93 in js::gc::MarkChildren(JSTracer*, JSObject*) at /Users/ireid/tbird/comm-central/mozilla/js/src/jsgcmark.cpp:781
#5 0x00000001033240c1 in JS_TraceChildren ()
#6 0x00000001021a4198 in nsXPConnect::Traverse(void*, nsCycleCollectionTraversalCallback&) ()
#7 0x0000000102e7b2e1 in GCGraphBuilder::Traverse(PtrInfo*) ()
#8 0x0000000102e7b356 in nsCycleCollector::MarkRoots(GCGraphBuilder&) ()
#9 0x0000000102e7b518 in nsCycleCollector::BeginCollection(nsICycleCollectorListener*) ()
#10 0x0000000102e7ec0d in nsCycleCollectorRunner::Run() at /Users/ireid/tbird/comm-central/mozilla/xpcom/base/nsCycleCollector.cpp:3497
#11 0x0000000102e6188e in nsThread::ProcessNextEvent(bool, bool*) at /Users/ireid/tbird/comm-central/mozilla/xpcom/threads/nsThread.cpp:631
#12 0x0000000102defe26 in NS_ProcessNextEvent_P(nsIThread*, bool) at /Users/ireid/tbird/objdir-comm-central-permissions/mozilla/xpcom/build/nsThreadUtils.cpp:245
#13 0x0000000102e623c5 in nsThread::ThreadFunc(void*) at /Users/ireid/tbird/comm-central/mozilla/xpcom/threads/nsThread.cpp:272
Not sure if this will help, but:
(gdb) call DumpJSObject(aObj)
Debugging reminders...
class: (JSClass*)(obj->fslots[2]-1)
parent: (JSObject*)(obj->fslots[1])
proto: (JSObject*)(obj->fslots[0])
0x1459d6af0 'native' <Worker>
parent: 0x1459022b8 'native' <ChromeWindow>
parent: null
proto: 0x1459baa80 'native' <XPC_WN_ModsAllowed_NoCall_Proto_JSClass>
parent: 0x1459022b8 'native' <ChromeWindow> (SEE ABOVE)
proto: 0x11adb1e98 'native' <Object>
parent: 0x1459022b8 'native' <ChromeWindow> (SEE ABOVE)
proto: null
proto: 0x1459d6a60 'native' <Worker>
parent: 0x1459022b8 'native' <ChromeWindow> (SEE ABOVE)
proto: 0x1459d6a18 'native' <WorkerEventTarget>
parent: 0x1459022b8 'native' <ChromeWindow> (SEE ABOVE)
proto: 0x11b401430 'native' <DOM Constructor.prototype>
parent: 0x1459022b8 'native' <ChromeWindow> (SEE ABOVE)
proto: 0x11adb1e98 'native' <Object> (SEE ABOVE)
Assignee | ||
Comment 1•14 years ago
|
||
Ah, I think we can ignore this. The assertion is just wrong here.
Assignee | ||
Updated•14 years ago
|
Summary: CG Cycle collector calls DOM worker from wrong thread → Workers: Cycle collector calls DOM worker from wrong thread
Reporter | ||
Comment 2•14 years ago
|
||
Is there any way to get rid of the assertion then? It's pretty disturbing to be trying to debug gecko-based stuff and have error messages like that flying out at you.
Assignee | ||
Comment 3•14 years ago
|
||
We just can't assert which thread we're on here.
Assignee | ||
Comment 4•14 years ago
|
||
(In reply to Irving Reid (:irving) from comment #2)
> It's pretty disturbing to
> be trying to debug gecko-based stuff and have error messages like that
> flying out at you.
Of course. Just letting you know that in this one case it's harmless.
Severity: normal → minor
Attachment #571136 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 5•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•