Last Comment Bug 882200 - crash in nsLDAPOperation::GetMessageListener @ nsXPCWrappedJS::AddRef
: crash in nsLDAPOperation::GetMessageListener @ nsXPCWrappedJS::AddRef
Status: RESOLVED FIXED
: crash, regression, topcrash
Product: Thunderbird
Classification: Client Software
Component: General (show other bugs)
: 24 Branch
: All Windows 7
: -- critical (vote)
: Thunderbird 24.0
Assigned To: neil@parkwaycc.co.uk
:
Mentors:
: 882125 (view as bug list)
Depends on:
Blocks: 770840 773610
  Show dependency treegraph
 
Reported: 2013-06-12 09:46 PDT by Scoobidiver (away)
Modified: 2013-06-24 11:29 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
unaffected
+
fixed


Attachments
Untested patch (4.61 KB, patch)
2013-06-12 11:53 PDT, neil@parkwaycc.co.uk
no flags Details | Diff | Splinter Review
Variant patch (5.06 KB, patch)
2013-06-12 12:58 PDT, neil@parkwaycc.co.uk
standard8: review+
Details | Diff | Splinter Review

Description Scoobidiver (away) 2013-06-12 09:46:45 PDT
It's a new signature in TB 24.0a1/20130612 and a regression from bug 770840.

Frame 	Module 	Signature 	Source
0 	xul.dll 	nsXPCWrappedJS::AddRef 	js/xpconnect/src/XPCWrappedJS.cpp:158
1 	xul.dll 	nsXPTCStubBase::AddRef 	xpcom/reflect/xptcall/src/xptcall.cpp:30
2 	xul.dll 	nsLDAPOperation::GetMessageListener 	ldap/xpcom/src/nsLDAPOperation.cpp:161
3 	xul.dll 	nsLDAPConnection::InvokeMessageCallback 	ldap/xpcom/src/nsLDAPConnection.cpp:449
4 	xul.dll 	nsLDAPConnectionRunnable::Run 	ldap/xpcom/src/nsLDAPConnection.cpp:735
5 	xul.dll 	nsThread::ProcessNextEvent 	xpcom/threads/nsThread.cpp:626
6 	xul.dll 	NS_ProcessNextEvent 	objdir-tb/mozilla/xpcom/build/nsThreadUtils.cpp:238
7 	xul.dll 	nsThread::ThreadFunc 	xpcom/threads/nsThread.cpp:264
8 	nspr4.dll 	_PR_NativeRunThread 	nsprpub/pr/src/threads/combined/pruthr.c:397
9 	nspr4.dll 	pr_root 	nsprpub/pr/src/md/windows/w95thred.c:90
10 	msvcr100.dll 	_callthreadstartex 	f:\dd\vctools\crt_bld\self_x86\crt\src\threadex.c:314
11 	msvcr100.dll 	_threadstartex 	f:\dd\vctools\crt_bld\self_x86\crt\src\threadex.c:292
12 	kernel32.dll 	BaseThreadInitThunk 	
13 	ntdll.dll 	__RtlUserThreadStart 	
14 	ntdll.dll 	_RtlUserThreadStart 	

More reports at:
https://crash-stats.mozilla.com/report/list?product=Thunderbird&signature=nsXPCWrappedJS%3A%3AAddRef%28%29
Comment 1 Bobby Holley (:bholley) (busy with Stylo) 2013-06-12 09:52:59 PDT
This will require fixes in mailnews code to use nsMainThreadPtrHolder.
Comment 2 Josh Matthews [:jdm] 2013-06-12 10:43:23 PDT
Like the same problem reported in bug 882125.
Comment 3 neil@parkwaycc.co.uk 2013-06-12 11:33:56 PDT
Perhaps instead of getting the listener on the LDAP thread and then dispatching a runnable to the main thread, we could just get the runnable to get the listener from the operation.
Comment 4 Josh Matthews [:jdm] 2013-06-12 11:34:20 PDT
http://mxr.mozilla.org/comm-central/source/ldap/xpcom/public/nsILDAPOperation.idl#42 and http://mxr.mozilla.org/comm-central/source/ldap/xpcom/src/nsLDAPOperation.cpp#154 will need to use nsMainThreadPtrHandle instead, with nsLDAPOperation holding on to an nsMainThreadPtrHandle that contains an nsMainThreadPtrHolder. nsOnLDAPMessageRunnable will need to use an nsMainThreadPtrHandle as well.
Comment 5 neil@parkwaycc.co.uk 2013-06-12 11:53:51 PDT
Created attachment 761580 [details] [diff] [review]
Untested patch

Gets the listener from the operation on the main thread.
Comment 6 neil@parkwaycc.co.uk 2013-06-12 12:58:18 PDT
Created attachment 761619 [details] [diff] [review]
Variant patch

Using friendship to simplify the code slightly.
Comment 7 Mark Banner (:standard8) (afk until 26th July) 2013-06-12 14:26:23 PDT
*** Bug 882125 has been marked as a duplicate of this bug. ***
Comment 8 Wayne Mery (:wsmwk, NI for questions) 2013-06-13 06:04:16 PDT
me bp-e14f7d34-6a01-49d3-93c6-339202130613
#3 crash for TB24
Comment 9 Wayne Mery (:wsmwk, NI for questions) 2013-06-24 04:18:36 PDT
To inform the tracking-thunderbird24+ status ...
- #1 crash for TB24 https://crash-stats.mozilla.com/topcrasher/byversion/Thunderbird/24.0a1
- crash rate of TB24a1 is 5-10x the rate of TB23a2 https://crash-stats.mozilla.com/daily?form_selection=by_version&p=Thunderbird&v[]=23.0a2&v[]=24.0a1&v[]=22.0b1&v[]=&hang_type=any&os[]=Windows&os[]=Mac+OS+X&os[]=Linux&date_range_type=report&date_start=2013-06-14&date_end=2013-06-23&submit=Generate
- for those running TB24, it appears to be merely annoying and not a debilitating crash. Still, it would be preferable I think to land this before cutting TB24.0a2 so as to not annoy Earlybird users to the extent that they stop running earlybird
Comment 10 Mark Banner (:standard8) (afk until 26th July) 2013-06-24 10:30:44 PDT
Comment on attachment 761619 [details] [diff] [review]
Variant patch

Review of attachment 761619 [details] [diff] [review]:
-----------------------------------------------------------------

I think I like this one best. r=Standard8. Sorry for the delay.
Comment 11 neil@parkwaycc.co.uk 2013-06-24 11:27:10 PDT
Pushed comm-central changeset 67e02a3c68e1.

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