Last Comment Bug 334523 - [branch only] deadlock in nsObserverList::RemoveObserver
: [branch only] deadlock in nsObserverList::RemoveObserver
: 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]
Depends on:
  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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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 User image 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 User image Darin Fisher 2006-04-18 14:15:02 PDT
Created attachment 218885 [details] [diff] [review]
v1 patch
Comment 2 User image Darin Fisher 2006-04-18 14:16:00 PDT
Created attachment 218886 [details]
stack showing deadlock
Comment 3 User image 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 User image Benjamin Smedberg [:bsmedberg] 2006-04-19 13:55:18 PDT
Comment on attachment 218885 [details] [diff] [review]
v1 patch

Yeah, me too ;-)
Comment 5 User image Darin Fisher 2006-04-19 14:21:38 PDT
Comment 6 User image 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 User image Darin Fisher 2006-04-27 19:25:18 PDT
Comment 8 User image 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.