Last Comment Bug 334523 - [branch only] deadlock in nsObserverList::RemoveObserver
: [branch only] deadlock in nsObserverList::RemoveObserver
Status: RESOLVED FIXED
: fixed1.8.0.4, fixed1.8.1
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All All
: -- critical (vote)
: mozilla1.8.1
Assigned To: Darin Fisher
:
: Nathan Froyd [:froydnj]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-18 12:42 PDT by Darin Fisher
Modified: 2006-11-10 12:15 PST (History)
2 users (show)
dveditz: blocking1.8.1+
dveditz: blocking1.8.0.4+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 patch (1.23 KB, patch)
2006-04-18 14:15 PDT, Darin Fisher
benjamin: review+
benjamin: approval‑branch‑1.8.1+
dveditz: approval1.8.0.4+
Details | Diff | Splinter Review
stack showing deadlock (15.03 KB, text/plain)
2006-04-18 14:16 PDT, Darin Fisher
no flags Details

Description Darin Fisher 2006-04-18 12:42:34 PDT
Possible deadlock in nsObserverList::RemoveObserver

If RemoveObserver results in an observer being destroyed, then that could result in another call to RemoveObserver, which will dead-lock trying to acquire nsObserverList::mLock.  This is not a bug on the trunk because mLock has been removed.

The simple solution is to insert a kungFuDeathGrip.
Comment 1 Darin Fisher 2006-04-18 14:15:02 PDT
Created attachment 218885 [details] [diff] [review]
v1 patch
Comment 2 Darin Fisher 2006-04-18 14:16:00 PDT
Created attachment 218886 [details]
stack showing deadlock
Comment 3 Darin Fisher 2006-04-19 13:48:01 PDT
Comment on attachment 218885 [details] [diff] [review]
v1 patch

Actually, I meant to request 1.8.1 approval too.  This is 1.8 branch only.
Comment 4 Benjamin Smedberg [:bsmedberg] 2006-04-19 13:55:18 PDT
Comment on attachment 218885 [details] [diff] [review]
v1 patch

Yeah, me too ;-)
Comment 5 Darin Fisher 2006-04-19 14:21:38 PDT
fixed1.8.1
Comment 6 Daniel Veditz [:dveditz] 2006-04-20 11:42:13 PDT
Comment on attachment 218885 [details] [diff] [review]
v1 patch

approved for 1.8.0 branch, a=dveditz for drivers
Comment 7 Darin Fisher 2006-04-27 19:25:18 PDT
fixed1.8.0.4
Comment 8 Dave Liebreich [:davel] 2006-05-22 10:37:43 PDT
please provide guidance on how to verify this fix on the 180 branch

Note You need to log in before you can comment on or make changes to this bug.