Closed Bug 1303222 Opened 8 years ago Closed 6 years ago

Crash in nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState with enigmail

Categories

(MailNews Core :: Networking: IMAP, defect)

x86_64
All
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: giovino, Unassigned)

References

Details

(Keywords: crash)

Crash Data

This bug was filed from the Socorro interface and is 
report bp-332f0b41-e0bf-43e2-b018-e0d852160916.
=============================================================

Four more reports of 'nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState' in the last 15 days:

ID: d23431f1-8094-4ee0-97d5-276f02160910
ID: c5d1cb74-dc6d-4716-b146-0e5e32160902
ID: 4b8cf49e-6dac-4191-be09-f6bf32160902
ID: 478c2d0b-ba1c-40c3-8c2f-f15192160901

Beyond that.. I find other ones that are not 'nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState'

ID: 200e7fb4-d167-4568-9741-807902160901
Signature: <name omitted> | (anonymous namespace)::SyncRunnable1<T>::Run

ID: 2adfdce5-6e4d-41ec-9c57-3e7d02160830
Signature: non-virtual thunk to nsImapMailFolder::CloseMockChannel

ID: 852cf3dc-f65f-4b9d-bdac-2f9382160830
Signature: nsImapMailFolder::UpdateImapMailboxStatus

ID: e1d89700-1c0e-4d4d-89de-d5f0f2160830
Signature: nsImapMailFolder::UpdateImapMailboxInfo

I have no idea if these all have the same root cause or there are many different reasons. 

I have 74 Thunderbird crash reports in total in 2016. If anyone body's willing to work with me, I'm willing to try to find one or more root causes.
The earliest crashes still on the system are version 38
bp-d1ab64bc-faae-44cc-83dc-e3d532160401	2016-04-01 _ZThn488_N16nsImapMailFolder16CloseMockChannelEP18nsIImapMockChannel   
bp-f4dc8d15-6895-4446-8795-61ffd2160323	2016-03-23 shutdownhang | libsystem_kernel.dylib@0x16eb2  
bp-cad1c402-1c2b-4984-9969-8e2b52160317	2016-03-17 shutdownhang | libsystem_kernel.dylib@0x16eb2 

Do you have any on your PC from 2015?
Would you say they have changed in frequency or in nature over time, or version?

two next most frequent signatures are 
[@ non-virtual thunk to nsImapMailFolder::CloseMockChannel]
[@ nsImapMailFolder::UpdateImapMailboxStatus]
Severity: major → critical
Status: UNCONFIRMED → NEW
Crash Signature: [@ nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState] → [@ nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState] [@ non-virtual thunk to nsImapMailFolder::CloseMockChannel] [@ nsImapMailFolder::UpdateImapMailboxStatus]
Component: Untriaged → Networking: IMAP
Ever confirmed: true
Flags: needinfo?(giovino)
Keywords: crash
Product: Thunderbird → MailNews Core
Version: 49 Branch → 49
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #1)
> Do you have any on your PC from 2015?

Yes. 

$ cat submit.log

[Tue Jun 10 16:46:26 2014] Crash report submitted successfully
[Fri May 15 14:45:01 2015] Crash report submitted successfully
[Mon May 18 14:06:01 2015] Crash report submitted successfully
[Mon May 18 14:08:32 2015] Crash report submitted successfully
[Fri May 29 17:02:55 2015] Crash report submitted successfully
[Tue Jun  2 13:55:16 2015] Crash report submitted successfully
[Thu Jun 11 09:22:29 2015] Crash report submitted successfully
[Wed Jun 24 16:30:39 2015] Crash report submitted successfully
[Wed Jul  1 09:55:17 2015] Crash report submitted successfully
[Wed Jul  1 15:16:54 2015] Crash report submitted successfully
[Wed Jul  8 14:58:24 2015] Crash report submitted successfully
[Thu Jul  9 14:44:03 2015] Crash report submitted successfully
[Wed Jul 15 18:38:06 2015] Crash report submitted successfully
[Wed Jul 22 07:07:46 2015] Crash report submitted successfully
[Tue Jul 28 07:09:48 2015] Crash report submitted successfully
[Sat Aug  8 00:42:25 2015] Crash report submitted successfully
[Thu Aug 13 15:46:45 2015] Crash report submitted successfully
[Mon Aug 17 21:52:40 2015] Crash report submitted successfully
[Tue Aug 18 06:52:28 2015] Crash report submitted successfully
[Wed Aug 19 16:40:06 2015] Crash report submitted successfully
[Wed Aug 19 20:59:43 2015] Crash report submitted successfully
[Tue Aug 25 19:01:25 2015] Crash report submitted successfully
[Wed Aug 26 18:40:39 2015] Crash report submitted successfully
[Sat Aug 29 07:23:47 2015] Crash report submitted successfully
[Tue Sep 15 17:10:54 2015] Crash report submitted successfully
[Thu Oct  1 12:58:43 2015] Crash report submitted successfully
[Thu Oct 22 14:38:57 2015] Crash report submitted successfully
[Wed Oct 28 23:35:19 2015] Crash report submitted successfully
[Sat Oct 31 00:58:28 2015] Crash report submitted successfully
[Wed Nov  4 10:44:33 2015] Crash report submitted successfully
[Fri Nov  6 11:55:54 2015] Crash report submitted successfully
[Thu Nov 12 14:50:25 2015] Crash report submitted successfully
[Sat Nov 14 09:31:43 2015] Crash report submitted successfully
[Wed Nov 25 07:24:42 2015] Crash report submitted successfully
[Fri Nov 27 09:19:40 2015] Crash report submitted successfully
[Sun Nov 29 08:07:21 2015] Crash report submitted successfully
[Wed Dec  9 08:52:49 2015] Crash report submitted successfully
[Mon Dec 14 07:21:42 2015] Crash report submitted successfully
[Wed Dec 16 07:42:23 2015] Crash report submitted successfully
[Wed Dec 16 14:38:40 2015] Crash report submitted successfully
[Wed Dec 23 13:07:04 2015] Crash report submitted successfully
[Thu Dec 24 18:11:06 2015] Crash report submitted successfully
[Wed Dec 30 07:10:41 2015] Crash report submission failed: server returned status 500
[Thu Jan  7 10:01:19 2016] Crash report submitted successfully
[Mon Jan 11 12:06:30 2016] Crash report submitted successfully
[Fri Jan 15 09:10:52 2016] Crash report submitted successfully
[Mon Jan 18 22:37:36 2016] Crash report submitted successfully
[Fri Jan 29 07:27:18 2016] Crash report submitted successfully
[Fri Feb  5 07:34:23 2016] Crash report submitted successfully
[Mon Feb 15 19:20:47 2016] Crash report submitted successfully
[Tue Feb 23 13:28:34 2016] Crash report submitted successfully
[Fri Feb 26 06:26:27 2016] Crash report submitted successfully
[Thu Mar  3 12:56:44 2016] Crash report submitted successfully
[Fri Mar  4 12:35:22 2016] Crash report submitted successfully
[Mon Mar  7 07:25:09 2016] Crash report submitted successfully
[Mon Mar  7 14:56:05 2016] Crash report submitted successfully
[Thu Mar 17 07:48:11 2016] Crash report submitted successfully
[Wed Mar 23 10:42:00 2016] Crash report submitted successfully
[Fri Apr  1 14:40:46 2016] Crash report submitted successfully
[Mon Apr  4 08:02:19 2016] Crash report submitted successfully
[Sun Apr 17 11:06:34 2016] Crash report submitted successfully
[Fri Apr 29 00:53:14 2016] Crash report submitted successfully
[Sat Apr 30 12:33:06 2016] Crash report submitted successfully
[Wed May  4 10:08:03 2016] Crash report submitted successfully
[Wed May  4 11:47:58 2016] Crash report submitted successfully
[Tue May 10 07:20:07 2016] Crash report submitted successfully
[Wed May 18 07:31:07 2016] Crash report submitted successfully
[Fri May 27 11:26:49 2016] Crash report submitted successfully
[Thu Jun  2 14:05:59 2016] Crash report submitted successfully
[Mon Jun  6 12:58:18 2016] Crash report submitted successfully
[Wed Jun  8 21:24:30 2016] Crash report submitted successfully
[Sun Jun 12 18:02:07 2016] Crash report submitted successfully
[Sun Jun 12 22:43:02 2016] Crash report submitted successfully
[Thu Jun 16 10:46:07 2016] Crash report submitted successfully
[Mon Jun 20 07:34:56 2016] Crash report submitted successfully
[Sat Jun 25 14:46:56 2016] Crash report submitted successfully
[Wed Jun 29 07:21:53 2016] Crash report submitted successfully
[Wed Jun 29 14:05:51 2016] Crash report submitted successfully
[Fri Jul  1 21:42:02 2016] Crash report submitted successfully
[Wed Jul  6 10:23:46 2016] Crash report submitted successfully
[Thu Jul  7 03:44:26 2016] Crash report submitted successfully
[Thu Jul  7 11:13:23 2016] Crash report submitted successfully
[Thu Jul  7 16:04:55 2016] Crash report submitted successfully
[Fri Jul  8 17:01:50 2016] Crash report submitted successfully
[Sat Jul  9 07:26:37 2016] Crash report submitted successfully
[Sat Jul  9 19:00:25 2016] Crash report submitted successfully
[Sun Jul 10 08:46:11 2016] Crash report submitted successfully
[Wed Jul 13 10:10:42 2016] Crash report submitted successfully
[Wed Jul 13 21:20:54 2016] Crash report submitted successfully
[Thu Jul 14 15:20:39 2016] Crash report submitted successfully
[Fri Jul 15 20:13:48 2016] Crash report submitted successfully
[Sun Jul 17 09:25:00 2016] Crash report submitted successfully
[Tue Jul 19 09:57:30 2016] Crash report submitted successfully
[Wed Jul 20 16:29:21 2016] Crash report submitted successfully
[Thu Jul 21 21:34:30 2016] Crash report submitted successfully
[Fri Jul 22 22:03:47 2016] Crash report submitted successfully
[Mon Jul 25 08:30:05 2016] Crash report submitted successfully
[Tue Jul 26 11:46:41 2016] Crash report submitted successfully
[Tue Jul 26 14:28:04 2016] Crash report submitted successfully
[Wed Jul 27 07:38:00 2016] Crash report submitted successfully
[Fri Jul 29 16:42:12 2016] Crash report submitted successfully
[Mon Aug  1 08:23:27 2016] Crash report submitted successfully
[Mon Aug  8 14:38:00 2016] Crash report submission failed: The request timed out.
[Tue Aug 16 07:58:28 2016] Crash report submitted successfully
[Fri Aug 19 00:20:51 2016] Crash report submitted successfully
[Mon Aug 22 12:00:09 2016] Crash report submitted successfully
[Mon Aug 29 20:18:36 2016] Crash report submitted successfully
[Mon Aug 29 20:38:52 2016] Crash report submitted successfully
[Tue Aug 30 09:26:01 2016] Crash report submitted successfully
[Tue Aug 30 15:37:35 2016] Crash report submitted successfully
[Wed Aug 31 12:42:10 2016] Crash report submitted successfully
[Wed Aug 31 21:35:51 2016] Crash report submitted successfully
[Thu Sep  1 07:18:51 2016] Crash report submitted successfully
[Fri Sep  2 11:06:05 2016] Crash report submitted successfully
[Fri Sep  2 11:46:46 2016] Crash report submitted successfully
[Fri Sep  9 23:01:05 2016] Crash report submitted successfully
[Thu Sep 15 20:16:43 2016] Crash report submitted successfully


> Would you say they have changed in frequency or in nature over time, or
> version?

Maybe getting more frequent over time (see above).

At one time I read bug reports that suggest local Message Filters could be a cause, I had deleted all client side message filters but that did not seem to make a difference. 

I'd guess I look different than average Thunderbird user:

1. 4 IMAP accounts
  * large quotas / lots of folders & messages 
2. Use GPG
3. Have a Local Folders (mbox) at 5+ GB
4. Leave my client (host) on 24/7, rarely close Thunderbird (until it crashes)
(In reply to Gabriel Iovino from comment #0)
> ...
> I have 74 Thunderbird crash reports in total in 2016. If anyone body's
> willing to work with me, I'm willing to try to find one or more root causes.

It is fantastic of you to offer. And I hope we can leverage that. And thank you for trying what you have done so far, eg comment 2.

Unfortunately imap crashes are many - https://mzl.la/2cTs0DU - and most have very deep, difficult roots, plus we have little expertise to diagnose them.  Therefore, progress is difficult.

To make matters worse, you have many crash signatures which suggests this may be a off-main threading issue - one of our most intractable issues.  bug 1133892 is one of those. But there are probably other possibilities.
Depends on: 1133892
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #3)
> Unfortunately imap crashes are many - https://mzl.la/2cTs0DU - and most have
> very deep, difficult roots, plus we have little expertise to diagnose them. 
> Therefore, progress is difficult.
> 
> To make matters worse, you have many crash signatures which suggests this
> may be a off-main threading issue - one of our most intractable issues.  bug
> 1133892 is one of those. But there are probably other possibilities.

Thank you very much for the explanation, at the very least it helps me understand why these (my) crashes don't seem to get attention/fixed.
James is seeing this crash signatures, as well as nsImapMailFolder::UpdateImapMailboxInfo.
bp-d1b60b64-a6cc-48eb-b206-34e932160911
 7 	CoreFoundation	__CFRunLoopDoSources0	
8 	CoreFoundation	__CFRunLoopRun	
9 	CoreFoundation	CFRunLoopRunSpecific	
10 	HIToolbox	RunCurrentEventLoopInMode	
11 	HIToolbox	ReceiveNextEventCommon	
12 	HIToolbox	_BlockUntilNextEventMatchingListInModeWithFilter	
13 	AppKit	_DPSNextEvent	
14 	AppKit	-[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:]	
15 	CoreFoundation	-[__NSArrayM insertObject:atIndex:]
Crash Signature: [@ nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState] [@ non-virtual thunk to nsImapMailFolder::CloseMockChannel] [@ nsImapMailFolder::UpdateImapMailboxStatus] → [@ nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState] [@ non-virtual thunk to nsImapMailFolder::CloseMockChannel] [@ nsImapMailFolder::UpdateImapMailboxStatus] [@ nsImapMailFolder::UpdateImapMailboxInfo ]
Flags: needinfo?(giovino)
I have seen the same crash today by simply loading the content of an email from the inbox of an IMAP account: bp-b168f907-f33f-42e7-9b71-c657c2161028. The size of the MBOX for this folder currently is 336kB.

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 ID:20160928113259 CSet: 8d00ed48c4853c58465cb5833428e6aba05c0e6b
Version: 49 → 45
(In reply to Henrik Skupin (:whimboo) from comment #6)
> I have seen the same crash today by simply loading the content of an email
> from the inbox of an IMAP account: bp-b168f907-f33f-42e7-9b71-c657c2161028.

Are you able to reproduce it?

(I see only one other Thunderbird crash for you since then -  <name omitted> | (anonymous namespace)::SyncRunnable1<T>::Run bp-b171d186-8870-4926-9c77-4c01e2161123 )
Flags: needinfo?(hskupin)
No, it was a single instance of that crash so far.
Flags: needinfo?(hskupin)
nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState correlates highly to engimail
84% (16/19) vs.  11% (148/1287

Gabriel, 
To see whether bug 1069275 helps you, Please check and report what happens when you install 45.7.0 when it becomes available in a couple weeks , or 51 beta(uness you  are running sierra), available http://www.mozilla.org/en-US/thunderbird/channel/
Flags: needinfo?(giovino)
p.s. ranks #88 for 45.6.0
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #9)
> nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState correlates
> highly to engimail
> 84% (16/19) vs.  11% (148/1287
> 
> Gabriel, 
> To see whether bug 1069275 helps you, Please check and report what happens
> when you install 45.7.0 when it becomes available in a couple weeks , or 51
> beta(uness you  are running sierra), available
> http://www.mozilla.org/en-US/thunderbird/channel/

Will do, thank you for the heads up.
All the reports have engimail installed
OS: Mac OS X → All
Summary: Crash in nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState → Crash in nsCOMPtr_base::assign_from_qi | nsImapMailFolder::SetUrlState with enigmail
Blocks: 1339044
Looks like I've experienced 44 crashes 2016-09-15. 

The last time I saw 'nsImapMailFolder::SetUrlState' was on 2017-01-13 17:30:16 (Thunderbird 45.6.0):
https://crash-stats.mozilla.com/report/index/be454d68-5e1b-4335-ad5f-b2dad2170113

The two most recent crashes since 45.7.x

1. Thunderbird 45.7.0 Crash Report [@ non-virtual thunk to nsImapMailFolder::CloseMockChannel ]
https://crash-stats.mozilla.com/report/index/e5ae7f40-c663-448e-b142-644522170208

2. Thunderbird 45.7.1 Crash Report [@ nsImapMailFolder::PercentProgress ]
https://crash-stats.mozilla.com/report/index/709b8642-24ac-4c83-8bbd-eae9c2170208

I do not know why I've seen less 'nsImapMailFolder::SetUrlState' crashes in 45.6.0 nor do I know if the two crashes after 45.7.1 are related in any way.
Looks like this is happening significantly less in v52.0, I can confirm I've had zero nsImapMailFolder::SetUrlState' crashes in 52.0. 

Product         Version Count   Percent Installations
Thunderbird	45.8.0	162	91.0%	129
Thunderbird	52.0	3	1.7%	3

https://crash-stats.mozilla.com/signature/?product=Thunderbird&signature=nsCOMPtr_base%3A%3Aassign_from_qi%20%7C%20nsImapMailFolder%3A%3ASetUrlState
Flags: needinfo?(giovino)
Assuming you are relatively crash free, looking at last 6 months of crash stats I agree the original issue is gone.  (or the signature morphed)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.