Closed
Bug 350873
Opened 18 years ago
Closed 17 years ago
nsStreamLoader code accessed on secondary thread [ASSERTION: nsStreamLoader not thread-safe]
Categories
(Core :: Security: PSM, defect, P3)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
People
(Reporter: KaiE, Assigned: dcamp)
References
Details
(Keywords: assertion)
Attachments
(1 file, 1 obsolete file)
1.26 KB,
patch
|
KaiE
:
review+
dveditz
:
superreview+
|
Details | Diff | Splinter Review |
We occassionaly get a console warning about nsStreamLoader not being thread safe.
We identified the cause to be the destructor of nsIStreamLoaderObserver.
Christian recommended to try NS_ProxyRelease.
While this makes the warning go away, it can introduce a deadlock on application exit, because we need to do synchrounous shutdown of all NSS resources, which requires destroying all our objects first.
The deadlock is caused by the main thread dispatching shutdown events, and the PSM modules's shutdown code trying to proxy a destructor call to the main thread.
Updated•18 years ago
|
QA Contact: psm
Comment 1•18 years ago
|
||
Loading http://grml.org/ triggers:
###!!! ASSERTION: nsStreamLoader not thread-safe: '_mOwningThread.GetThread() == PR_GetCurrentThread()', file /Users/jruderman/trunk/mozilla/netwerk/base/src/nsStreamLoader.cpp, line 65
![]() |
||
Updated•17 years ago
|
Flags: blocking1.9?
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9+
Updated•17 years ago
|
Priority: -- → P2
Comment 2•17 years ago
|
||
Is this really only on the branch? Shouldn't block 1.9 if so.
Priority: P2 → P3
Reporter | ||
Comment 3•17 years ago
|
||
I guess this affects trunk, too, as I'm not aware of relevant changes.
Version: 1.8 Branch → Trunk
Comment 5•17 years ago
|
||
(In reply to comment #3)
> I guess this affects trunk, too, as I'm not aware of relevant changes.
>
confirmed on trunk, my steps to reproduce on trunk are :
->Type gmail.google.com into the url bar
-> Before the Gmail UI
(https://www.google.com/accounts/ServiceLogin?service=mail&passive=true ... )is
loaded completely the Assertion occur
Updated•17 years ago
|
Keywords: assertion
Summary: nsStreamLoader code accessed on secondary thread → nsStreamLoader code accessed on secondary thread [ASSERTION: nsStreamLoader not thread-safe]
Comment 6•17 years ago
|
||
Loading https://www.bankofamerica.com/ trigger the assertion. (FF Linux)
Assignee | ||
Comment 7•17 years ago
|
||
(In reply to comment #0)
> Christian recommended to try NS_ProxyRelease.
> While this makes the warning go away, it can introduce a deadlock on
> application exit, because we need to do synchrounous shutdown of all NSS
> resources, which requires destroying all our objects first.
>
> The deadlock is caused by the main thread dispatching shutdown events, and the
> PSM modules's shutdown code trying to proxy a destructor call to the main
> thread.
Would this actually deadlock? NS_ProxyRelease proxies the event asynchronously, it wouldn't block the rest of the PSM shutdown.
Assignee | ||
Comment 8•17 years ago
|
||
... so unless I'm wrong, this should work fine.
Attachment #303166 -
Flags: review?(kengert)
Assignee | ||
Comment 9•17 years ago
|
||
Comment on attachment 303166 [details] [diff] [review]
proxy mListener's release
... and apparently I am, because I just ran into a shutdown deadlock.
Attachment #303166 -
Attachment is obsolete: true
Attachment #303166 -
Flags: review?(kengert)
Assignee | ||
Comment 10•17 years ago
|
||
so actually the hang I was seeing was caused by bug 417404. New patch cleans things up a bit.
Reporter | ||
Comment 11•17 years ago
|
||
Comment on attachment 303208 [details] [diff] [review]
v2
Using this patch (only), I crash when visiting some SSL sites.
Using this patch combined with the patch from bug 417404, it works and the assertion is gone.
This tells me, we must really wait for 417404 before we can check this in.
Attachment #303208 -
Flags: review?(kengert) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #303208 -
Flags: superreview?(dveditz)
Comment 12•17 years ago
|
||
Comment on attachment 303208 [details] [diff] [review]
v2
sr=dveditz with the caveat about landing 417404 too.
Attachment #303208 -
Flags: superreview?(dveditz) → superreview+
Assignee | ||
Comment 13•17 years ago
|
||
Checking in nsNSSCallbacks.cpp;
/cvsroot/mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp,v <-- nsNSSCallbacks.cpp
new revision: 1.62; previous revision: 1.61
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•