Closed Bug 1316927 Opened 8 years ago Closed 5 years ago

Crash in shutdownhang | libpthread-2.23.so@0xd3b0 when closing thunderbird (password related - Linux)

Categories

(Thunderbird :: General, defect)

50 Branch
Unspecified
Linux
defect
Not set
critical

Tracking

(thunderbird_esr45? affected, thunderbird51 affected, thunderbird52 affected)

RESOLVED WORKSFORME
Tracking Status
thunderbird_esr45 ? affected
thunderbird51 --- affected
thunderbird52 --- affected

People

(Reporter: wsmwk, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: crash, topcrash-thunderbird)

Crash Data

#1 linux crash for TB45.4.0. 
The most common comment is "closing thunderbird"

bp-a9e287d7-ccd5-4386-91d3-c44d92161111 is a typical stack
 Ø 0 	libpthread-2.23.so	libpthread-2.23.so@0xd3b0
1 	libnspr4.so	PR_WaitCondVar
2 	libxul.so	mozilla::CondVar::Wait
3 	libxul.so	nsEventQueue::GetEvent
4 	libxul.so	nsThread::ProcessNextEvent
5 	libxul.so	NS_ProcessNextEvent
6 	libxul.so	nsThread::Shutdown
7 	libxul.so	nsThreadManager::Shutdown
8 	libxul.so	mozilla::ShutdownXPCOM
9 	libxul.so	ScopedXPCOMStartup::~ScopedXPCOMStartup
10 	libxul.so	mozilla::DefaultDelete<ScopedXPCOMStartup>::operator()
11 	libxul.so	XREMain::XRE_main
12 	libxul.so	XRE_main
13 	thunderbird	do_main
14 	thunderbird	main
Ø 15 	libc-2.23.so	libc-2.23.so@0x2082f
16 	thunderbird	_init
17 	thunderbird	thunderbird@0x482f
Ø 18 	ld-2.23.so	ld-2.23.so@0x105fa
19 	thunderbird	thunderbird@0x482f
20 	thunderbird	_start
21 		@0x7ffed6c264c7
#2 linux crash is shutdownhang | libpthread-2.19.so@0xc404 
I'd bet has the same root cause
Crash Signature: [@ shutdownhang | libpthread-2.23.so@0xd3b0] → [@ shutdownhang | libpthread-2.23.so@0xd3b0] [@ shutdownhang | libpthread-2.19.so@0xc404]
Blocks: 1310983
(from bug 130983, but with more detail) Some of the bug 1316927 users also were getting Bug 1274758 - Crash in shutdownhang | libpthread-2.23.so@0xd3a0 - whose crash rate has dropped steadily since about Oct 24 [1].  Which is around the time when the crash rate for shutdownhang | libpthread-2.23.so@0xd3b0 increased [2]. 

Coincidence?

[1] https://crash-stats.mozilla.com/signature/?signature=shutdownhang%20%7C%20libpthread-2.23.so%400xd3a0&date=%3E%3D2016-10-16T11%3A24%3A50.000Z&date=%3C2016-11-16T11%3A24%3A50.000Z#graphs
[2] https://crash-stats.mozilla.com/signature/?signature=shutdownhang%20%7C%20libpthread-2.23.so%400xd3b0&date=%3E%3D2016-08-16T11%3A51%3A45.000Z&date=%3C2016-11-16T11%3A51%3A45.000Z#graphs
See Also: → 1274758
Jay, thanks for visiting the bug report.  Can you summarize what you tried in your attempts to stop the crashing?  And had you tried safe mode - or all addons disabled?
Flags: needinfo?(jayburrill)
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #3)
> Jay, thanks for visiting the bug report.  Can you summarize what you tried
> in your attempts to stop the crashing?  And had you tried safe mode - or all
> addons disabled?

I run over NFS and as such see disk activity in the network statistics. A couple of weeks back I reactivted an old pop3 account and it trasferred about 10,000 emails. Shortly after thunderbird seems to run a background task reading and writing the database up to abo7t 1.2 MB per second.It runs continuously. Every time I close thunderbird it is this background task that 'crashes' since it never ends on its own. Or at least that is how it seems from the other side of the keyboard. I obviously am guessing about the connection between events, but it makes a good story.
Your to mine is about right. I was just a out to contact you to find out what this background task might be. It is logging 5 to 6 hours a day doing something...
Fred
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #3)
> Jay, thanks for visiting the bug report.  Can you summarize what you tried
> in your attempts to stop the crashing?  And had you tried safe mode - or all
> addons disabled?

I have not done a lot of work to debug this issue.  I have only removed one third-party Add-On, a Theme & Font Switcher, or such.  that Add-On was not working for me, anyway (although I still struggle with the tiny fonts that TB uses for composition and reply composition windows.)

I am running Ubuntu 16.04.1 LTS.  And I have installed Lightning, Themes Menu, ExQuilla for Microsoft Exchange, and and Exchange EWS Provider.  the latter two are necessary for me to continue to use TB, as I have an Exchange account for much of my email.

I can attempt All Add-ons Disabled, but if either of the Exchange add-ons are to blame, I will need to consider other options.  I can try Safe Mode, but have not done so.

One other note.  I have a lot of useless emails coming my way.  Some are deflected through Exchange Rules, to my Deleted Items folder.  I had attempted to use only TB filters for this, but TB would often be overwhelmed with the work and become unresponsive.  So I used an Outlook session on another machine to create the Exchange Rules instead.  That said, there are a number of TB Inbox filters that remain.  And I do see the incoming activity of Exchange-filtered emails on my Deleted Items folder when I start each time.  So, I am not sure that these background activities of Exchange intercepting and redirecting to Deleted Items, or TB filters intercepting Inbox entries to Deleted Items, have any impact.
(In reply to Fred Ford from comment #4)
> (In reply to Wayne Mery (:wsmwk, NI for questions) from comment #3)
> > Jay, thanks for visiting the bug report.  Can you summarize what you tried
> > in your attempts to stop the crashing?  And had you tried safe mode - or all
> > addons disabled?
> 
> I run over NFS and as such see disk activity in the network statistics. A
> couple of weeks back I reactivted an old pop3 account and it trasferred
> about 10,000 emails. Shortly after thunderbird seems to run a background
> task reading and writing the database up to abo7t 1.2 MB per second.It runs
> continuously. Every time I close thunderbird it is this background task that
> 'crashes' since it never ends on its own. Or at least that is how it seems
> from the other side of the keyboard. I obviously am guessing about the
> connection between events, but it makes a good story.
> Your to mine is about right. I was just a out to contact you to find out
> what this background task might be. It is logging 5 to 6 hours a day doing
> something...
> Fred

I just returned this week from a Thanksgiving holiday. And what to my wondering eyes should appear... The problem has vanished. No longer is there continuous back traffic (1-10MBps) and no longer a shutdown crash. Kudos to the elves.
Jay, what's happening on your end?  Your crash reports stop the day after you made comment 5.

combining crash counts of the two signatures, crash ranks aprox #10 for version 45.5.1 (which is amazing going up against windows crash counts)
These hangs will be generic issue that non-main thread doesn't finish during shutdown.

ex.

bp-91066550-e526-4eed-81ed-9e90a2161207
Tb is waiting response of IAMP server.

bp-caf57ccb-50fc-4ba5-b8b6-3aad32161207#
IMAP server asks password, then Tb may show password dialog.
(In reply to Makoto Kato [:m_kato] from comment #8)
> These hangs will be generic issue that non-main thread doesn't finish during
> shutdown.
> 
> ex.
> 
> bp-91066550-e526-4eed-81ed-9e90a2161207
> Tb is waiting response of IAMP server.
> 
> bp-caf57ccb-50fc-4ba5-b8b6-3aad32161207#
> IMAP server asks password, then Tb may show password dialog.

Excellent. so this is linux equivalent of windows topcrash bug 1257058 - which is what I was hoping for. And also mentioned in bug 1257058 comment 6 with signature shutdownhang | libpthread-2.19.so@0xc08f.  Probably also a match to shutdownhang | libpthread-2.23.so@0xd3a0 from the early days of 45.*

Now, we just need a patch for bug 1257058 :)
Crash Signature: [@ shutdownhang | libpthread-2.23.so@0xd3b0] [@ shutdownhang | libpthread-2.19.so@0xc404] → [@ shutdownhang | libpthread-2.23.so@0xd3b0] [@ shutdownhang | libpthread-2.19.so@0xc404] [@ shutdownhang | libpthread-2.23.so@0xd3a0] [@ shutdownhang | libpthread-2.19.so@0xc08f]
Depends on: 1257058
(In reply to Fred Ford from comment #6)
> ...
> I just returned this week from a Thanksgiving holiday. And what to my
> wondering eyes should appear... The problem has vanished. No longer is there
> continuous back traffic (1-10MBps) and no longer a shutdown crash. Kudos to
> the elves.

Some of Fred's crashes, for reference
bp-5485bb9b-f442-4ff9-b3b6-765892161115
bp-1d147cd4-cedf-42a9-bc85-4faa02161114   
bp-1b9a3a70-5c44-4a12-9652-e61e32161113   
bp-b3dbddc4-0a2d-45c3-84e9-97e492161113
0xd3b0 signature does not exist for 45.6.0 and 45.7.0. 
not sure what replaced it
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #11)
> 0xd3b0 signature does not exist for 45.6.0 and 45.7.0. 
> not sure what replaced it

apparently, [@ shutdownhang | libpthread-2.23.so@0xd360 ] 45.7.0, for one
Crash Signature: [@ shutdownhang | libpthread-2.23.so@0xd3b0] [@ shutdownhang | libpthread-2.19.so@0xc404] [@ shutdownhang | libpthread-2.23.so@0xd3a0] [@ shutdownhang | libpthread-2.19.so@0xc08f] → [@ shutdownhang | libpthread-2.23.so@0xd3b0] [@ shutdownhang | libpthread-2.19.so@0xc404] [@ shutdownhang | libpthread-2.23.so@0xd3a0] [@ shutdownhang | libpthread-2.19.so@0xc08f] [@ shutdownhang | libpthread-2.23.so@0xd360 ]
I just saw this. Thunderbird was crawling and using CPU, so I closed it. It took about 30 seconds to shut down, and then there was this crash. I suspect I'd see it more if I didn't normally try and restart Thunderbird, get the "Thunderbird is already running" message, and issue a "killall thunderbird" to get rid of it.

Gerv
(In reply to Gervase Markham [:gerv] from comment #14)
> I just saw this. 

bp-b8148cb5-3852-4aa5-b00b-da54f0170525

Believe it or not, some of the shutdown crashes are password related, so if all goes well with 54 beta then 52.2.0 should kill some of them.
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #15)
> (In reply to Gervase Markham [:gerv] from comment #14)
> > I just saw this. 
> 
> bp-b8148cb5-3852-4aa5-b00b-da54f0170525
> 
> Believe it or not, some of the shutdown crashes are password related, so if
> all goes well with 54 beta then 52.2.0 should kill some of them.

We landed the patch, but sadly had to back it out.

Crash rate has generally been steady, but slightly down the last 1-2 weeks. hutdownhang | libpthread-2.23.so@0x898d is 52.2.1 only so perhaps it's a new manestifestation of the same issue.  shutdownhang | libpthread-2.23.so@0xba6b, not new but not previously cited here, is much more common.
Blocks: 777491
Hi,
I have the same problem on a fresh Kubuntu installation.
But only with installed add-on: Enigmail. When I remove Enigmail, TB closes without a problem.

Crash-Report:
https://crash-stats.mozilla.com/report/index/dc5a2032-594e-49ed-847a-1a97f0180423
This crash always happens to me when my profile folder is on a CIFS share. Earlier, I tested it with a copy of the profile folder on the local disk without any problems. So it really seems to be a problem with the remote profile on a CIFS share. I mount it with autofs from a WD My Cloud Ex2 NAS with these settings: 

auto.master: 
/amnt /etc/auto.botnas-cifs --timeout=0 --ghost 

auto.botnas-cifs: 
botnas -fstype=cifs,rw,vers=3.0,credentials=/home/andii/.smbcredentials,uid=1000,gid=1000,file_mode=0644 \
	/andii	 	://botnas/andii \
	/pictures	://botnas/Pictures \
	/public		://botnas/Public \
	/verschiedenes	://botnas/Verschiedenes

botnas is a hostname defined locally in /etc/hosts.

I believe the same problem occurs when I mount with NFS (if necessary I can test that again).
The problem does NOT occur when I run Thunderbird with profile on CIFS share in offline mode.

Crash report:
https://crash-stats.mozilla.com/report/index/8fa7f74e-6d07-4707-a32b-d848f0180610
(In reply to Muesliflyer from comment #19)
> This crash always happens to me when my profile folder is on a CIFS share.
> Earlier, I tested it with a copy of the profile folder on the local disk
> without any problems. So it really seems to be a problem with the remote
> profile on a CIFS share.

This gives me the idea, why I too often have this kind of crash, but not always. It does not happen, when I run TB a short time, but when it runs longer than a day, in most times I have the crash. In my case I have the profile reachable via a symbolic link at ~/.thunderbird to a local NTFS partition via NTFS-3G.
Summary: Crash in shutdownhang | libpthread-2.23.so@0xd3b0 when closing thunderbird → Crash in shutdownhang | libpthread-2.23.so@0xd3b0 when closing thunderbird (password related)
Depends on: 1524247
See Also: → 1505042

Looking at the crash history above I can not confirm decrease. It almost always happens, when I close my TB. See also bug 1549978.

I have a new estimation for the cause. I have an IMAP account where the message actualization often hangs on it's subfolders, but not for INBOX. The server is: wp215.webpack.hosteurope.de

Another observation:
In this IMAP Account I have defined some filters to move messages from INBOX to some sub folders. The filtering often hangs too, so it can take up to some hours that the messages are actually moved. Also some arbitrary messages are never moved, so I finally have to do that manually. I see no logic behind that, when and which messages are moved, it seems by random.
But I can imagine, that these hangs also can cause the regular crashes on shutdown.

Maybe the cause of the problem is this special mail server. But I think, that TB should not hang or crash upon such problem mail server.
Is there a possibility to log the activity with this account to bring more light in the case?

Flags: needinfo?(vseerror)

(I don't remember much about this bug report but...)

If it's password related, which has pretty clear steps to reproduce, then there's nothing to be done until the password issues are fixed - several bug reports https://mzl.la/2Ya3ndY

If it's not password related, like CIFS or NFS, then we should find or file a different bug.

Flags: needinfo?(vseerror)
Flags: needinfo?(jayburrill)

(In reply to Wayne Mery (:wsmwk) from comment #24)

If it's password related, which has pretty clear steps to reproduce, then there's nothing to be done until the password issues are fixed - several bug reports https://mzl.la/2Ya3ndY

I do not really understand, what is meant by "password related". I can say, that all my passwords are saved in the profile with "master password" on top, so I normally never have to input passwords when using TB. The only exception: sometimes I get, "Enter your password again, it seems wrong", but this goes away after some time without entering a password, I only do "Cancel". In my feeling the cause are moments, sometimes hours, when the server is not reachable.

I also do not find a recipe to reproduce the case intentionally by reading some of your links. So I can't confirm, if my issue is a password issue.

Sorry for the bad formatting, I almost always stumble over the unluckly needed blank line.
The case with "Enter your password again, it seems wrong" 99 % happens with Yahoo accounts, with others very rarely.

(In reply to Ulf Zibis from comment #25)

All my passwords are saved in the profile with "master password" on top, so I normally never have to input passwords when using TB. The only exception: sometimes I get, "Enter your password again, it seems wrong", but this goes away after some time without entering a password, I only do "Cancel".

If you enter an incorrect password or close a password prompt without entering a password (such as Cancel) then this might cause a crash later. This includes the master password dialogs.

Flags: needinfo?(vseerror)
Flags: needinfo?(vseerror)

(In reply to Ulf Zibis from comment #25)

I do not really understand, what is meant by "password related". ...
I also do not find a recipe to reproduce the case intentionally by reading some of your links. So I can't confirm, if my issue is a password issue.

Steps of bug 1257058 comment 0?

Flags: needinfo?(Ulf.Zibis)
Summary: Crash in shutdownhang | libpthread-2.23.so@0xd3b0 when closing thunderbird (password related) → Crash in shutdownhang | libpthread-2.23.so@0xd3b0 when closing thunderbird (password related - Linux)

(In reply to Leon from comment #18)

I have the same problem on a fresh Kubuntu installation. But only with installed add-on: Enigmail. When I remove Enigmail, TB closes without a problem.

Leon, can you still reproduce this?

Flags: needinfo?(leon)

Hi Wayne,
no, Thunderbird is closing fine, for me!
No problems anymore :)

Flags: needinfo?(leon)

No current version crashes for any of the top 10 shutdownhang | libpthread.xxxx

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(Ulf.Zibis)
Resolution: --- → WORKSFORME

I now have installed version 91 and I still have a shutdown crash: bp-e30c0ab2-eb73-413a-b946-c491a1211204

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