crash in nsLDAPOperation::GetMessageListener @ nsXPCWrappedJS::AddRef

RESOLVED FIXED in Thunderbird 24.0

Status

Thunderbird
General
--
critical
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Scoobidiver (away), Assigned: neil@parkwaycc.co.uk)

Tracking

({crash, regression, topcrash})

24 Branch
Thunderbird 24.0
All
Windows 7
crash, regression, topcrash
Dependency tree / graph

Thunderbird Tracking Flags

(thunderbird23 unaffected, thunderbird24+ fixed)

Details

(crash signature)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

4 years ago
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
This will require fixes in mailnews code to use nsMainThreadPtrHolder.

Comment 2

4 years ago
Like the same problem reported in bug 882125.
(Assignee)

Comment 3

4 years ago
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

4 years ago
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.
(Assignee)

Comment 5

4 years ago
Created attachment 761580 [details] [diff] [review]
Untested patch

Gets the listener from the operation on the main thread.
Attachment #761580 - Flags: review?(mbanner)
(Assignee)

Comment 6

4 years ago
Created attachment 761619 [details] [diff] [review]
Variant patch

Using friendship to simplify the code slightly.
(Reporter)

Updated

4 years ago
Summary: TB crash in nsXPCWrappedJS::AddRef → crash in nsLDAPOperation::GetMessageListener @ nsXPCWrappedJS::AddRef
(Reporter)

Updated

4 years ago
Blocks: 773610
Duplicate of this bug: 882125
tracking-thunderbird24: --- → +
me bp-e14f7d34-6a01-49d3-93c6-339202130613
#3 crash for TB24
Keywords: topcrash
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
Flags: needinfo?(mbanner)
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.
Attachment #761619 - Flags: review+
Attachment #761580 - Attachment is obsolete: true
Attachment #761580 - Flags: review?(mbanner)
Flags: needinfo?(mbanner)
(Assignee)

Comment 11

4 years ago
Pushed comm-central changeset 67e02a3c68e1.
Assignee: nobody → neil
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 24.0
status-thunderbird24: affected → fixed
You need to log in before you can comment on or make changes to this bug.