Closed
Bug 768480
Opened 13 years ago
Closed 10 years ago
Mac OSX TB 13 crashes in nsMsgDBFolder::CreateFileForDB when going online. Caused by folder subscribed on server that no longer exists?
Categories
(Thunderbird :: General, defect)
Tracking
(thunderbird38+ fixed, thunderbird39 fixed, thunderbird40 fixed, thunderbird_esr31+ affected)
VERIFIED
FIXED
Thunderbird 40.0
People
(Reporter: sgay, Assigned: rkent)
References
()
Details
(Keywords: crash, testcase, Whiteboard: [startupcrash][rare])
Crash Data
Attachments
(2 files)
4.56 KB,
text/plain
|
Details | |
1.32 KB,
patch
|
neil
:
review+
rkent
:
approval-comm-aurora+
rkent
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build ID: 20120614114901
Steps to reproduce:
Wipe everything related to TB on the Mac (caches, libraries, profiles, etc).
Fresh-install TB 13.0.1 with no extension, nothing.
Start TB offline and configure an IMAP email account.
Go online.
Actual results:
TB crashes as soon as it goes online.
If TB starts in online mode, it displays the interface then crashes.
If TB starts offline, if works fine until I go online, then crashes.
Same in safe-mode.
Works if offline / not checking mails.
Unchecking "Enable Global Search and Indexer" in prefs does not make a difference.
Expected results:
Should not crash!
By the way, TB 13.0.1 on a Windows 7 works fine reading the same IMAP account.
I was told to "please also mention that crash signature NS_MsgHashIfNecessary is Mac-only" and report the crash ID bp-6a2e9a27-3fc7-4b30-868b-a364f2120626.
Comment 1•13 years ago
|
||
ref http://forums.mozillazine.org/viewtopic.php?f=39&t=2469047
according to crash stats, crashes are OS X 10.6 and 10.7.
And I find no windows equivalent crashes with NS_MsgHashIfNecessary, nsMsgDBFolder::CreateFileForDB or nsImapMailFolder::CreateClientSubfolderInfo in any crash signature
0 XUL NS_MsgHashIfNecessary
1 XUL nsMsgDBFolder::CreateFileForDB mailnews/base/util/nsMsgDBFolder.cpp:916
2 XUL nsImapMailFolder::CreateClientSubfolderInfo mailnews/imap/src/nsImapMailFolder.cpp:977
3 XUL nsImapMailFolder::CreateClientSubfolderInfo mailnews/imap/src/nsImapMailFolder.cpp:961
4 XUL nsImapIncomingServer::PossibleImapMailbox mailnews/imap/src/nsImapIncomingServer.cpp:1206
5 XUL SyncRunnable4<nsIImapServerSink,const nsACString_internal&,char,int,bool*>::Run mailnews/imap/src/nsSyncRunnableHelpers.cpp:244
6 XUL nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:657
7 XUL NS_ProcessPendingEvents_P objdir-tb/x86_64/mozilla/xpcom/build/nsThreadUtils.cpp:195
8 XUL nsBaseAppShell::NativeEventCallback widget/xpwidgets/nsBaseAppShell.cpp:130
9 XUL nsAppShell::ProcessGeckoEvents widget/cocoa/nsAppShell.mm:441
10 CoreFoundation __CFRunLoopDoSources0
11 CoreFoundation __CFRunLoopRun
12 CoreFoundation CFRunLoopRunSpecific
Severity: major → critical
Status: UNCONFIRMED → NEW
Crash Signature: [@ NS_MsgHashIfNecessary ]
Ever confirmed: true
Keywords: crash
Comment 2•13 years ago
|
||
IMAP:5 protocol log would be helpful - https://wiki.mozilla.org/MailNews:Logging
presumably, the end of the log would show us what folder we were crashing on.
As requested, attached is the imap.log corresponding to a crash.
Looking at the log I thought, is that folder faulty? But, one has to remember that TB13 is quite happy with the very same folder on a Windows 7 PC.
Comment 5•13 years ago
|
||
what if you unsubscribe from that folder (temporarily) on windows, and see if you can get your mac build to start.
Went to my ISP webmail and... I was not subscribed to that folder? Yet I see it in TB on Windows, and TB on OSX tries to open it? So I subscribed and now the imap.log ends with:
428883968[118d1fb80]: ReadNextLine [stream=1f3d5510 nb=33 needmore=0]
428883968[118d1fb80]: 1f8af800:imap.online.net:A:CreateNewLineFromSocket: * LSUB () "/" "Urssaf, Assedic"
428883968[118d1fb80]: ReadNextLine [stream=1f3d5510 nb=36 needmore=0]
428883968[118d1fb80]: 1f8af800:imap.online.net:A:CreateNewLineFromSocket: * LSUB () "/" "Urssaf, Assedic///"
So the "Urssaf, Assedic" folder is the one I can subscribe/unsubscribe to, and the other one (ending with ///) a rogue folder coming from my ISP? I cannot unsubscribe from it, so it seems.
I should *not* crash TB (and it does not on Windows).
But I'll contact my ISP and ask them what's wrong with that folder.
OK, there is this rogue "Urssaf, Assedic///" that the server thinks I'm subscribed to, even though it does not exist anymore. And I can not unsubscribe because it does not exist. Trying to sort out things with the ISP.
Nevertheless, it should not crash TB.
The rogue folder has been deleted by the ISP and TB does not crash anymore. So that seem to have been the cause. Now, TB should not have crashed anyway.
Comment 9•13 years ago
|
||
bienvenu, wada, I find only Mac and linux crashes. previous patch with this signature is bug 562104
other examples: bp-e930ded8-3597-4d8f-80e8-fca5e2120630 bp-c0e6bf52-c69c-4e0e-a217-a5da72120613
Updated•13 years ago
|
Summary: Mac OSX TB 13 crashes when going online → Mac OSX TB 13 crashes in nsMsgDBFolder::CreateFileForDB when going online
Comment 10•11 years ago
|
||
This crash signature is gone in version 24.x.
New in version 24 is [@ NS_MsgHashIfNecessary(nsAutoString&) ] however, none of the stacks I looked at contain nsMsgDBFolder::CreateFileForDB
But perhaps the steps are still valid. SOmeone able to test on a Mac?
Keywords: testcase
Whiteboard: [closeme 2014-01-01]
Comment 11•11 years ago
|
||
Resolved per whiteboard
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2014-01-01]
Comment 12•10 years ago
|
||
It is back.
user in https://support.mozilla.org/en-US/questions/1038015
bp-3ab94152-f7ba-4514-9b9a-855de2141223
0 XUL NS_MsgHashIfNecessary(nsAutoString&) mailnews/base/util/nsMsgUtils.cpp
1 XUL nsMsgDBFolder::CreateFileForDB(nsAString_internal const&, nsIFile*, nsIFile**) mailnews/base/util/nsMsgDBFolder.cpp
2 XUL nsImapMailFolder::CreateClientSubfolderInfo(nsACString_internal const&, char, int, bool) mailnews/imap/src/nsImapMailFolder.cpp
3 XUL nsImapMailFolder::CreateClientSubfolderInfo(nsACString_internal const&, char, int, bool) mailnews/imap/src/nsImapMailFolder.cpp
4 XUL nsImapIncomingServer::PossibleImapMailbox(nsACString_internal const&, char, int, bool*) mailnews/imap/src/nsImapIncomingServer.cpp
5 XUL (anonymous namespace)::SyncRunnable4<nsIImapServerSink, nsACString_internal const&, char, int, bool*>::Run() mailnews/imap/src/nsSyncRunnableHelpers.cpp
http://hg.mozilla.org/releases/comm-esr31/annotate/7777d8694ab2/mailnews/imap/src/nsImapMailFolder.cpp#l942
hg@0 932 // Create an empty database for this mail folder, set its name from the user
hg@0 933 nsCOMPtr<nsIMsgDatabase> mailDBFactory;
hg@0 934 nsCOMPtr<nsIMsgFolder> child;
hg@0 935
hg@0 936 nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
hg@0 937 NS_ENSURE_SUCCESS(rv, rv);
hg@0 938 nsCOMPtr<nsIMsgDatabase> unusedDB;
geoff@12584 939 nsCOMPtr <nsIFile> dbFile;
hg@0 940
hg@0 941 // warning, path will be changed
bienvenu@1936 942 rv = CreateFileForDB(folderNameStr, path, getter_AddRefs(dbFile));
http://hg.mozilla.org/releases/comm-esr31/annotate/7777d8694ab2/mailnews/base/util/nsMsgDBFolder.cpp#l914
hg@0 907 // path coming in is the root path without the leaf name,
hg@0 908 // on the way out, it's the whole path.
geoff@12584 909 nsresult nsMsgDBFolder::CreateFileForDB(const nsAString& userLeafName, nsIFile *path, nsIFile **dbFile)
hg@0 910 {
hg@0 911 NS_ENSURE_ARG_POINTER(dbFile);
hg@0 912
bienvenu@1936 913 nsAutoString proposedDBName(userLeafName);
hg@0 914 NS_MsgHashIfNecessary(proposedDBName);
Status: RESOLVED → REOPENED
Crash Signature: [@ NS_MsgHashIfNecessary ] → [@ NS_MsgHashIfNecessary ]
[@ NS_MsgHashIfNecessary(nsAutoString&)]
Resolution: INCOMPLETE → ---
Summary: Mac OSX TB 13 crashes in nsMsgDBFolder::CreateFileForDB when going online → Mac OSX TB 13 crashes in nsMsgDBFolder::CreateFileForDB when going online. Caused by folder subscribed on server that no longer exists?
Assignee | ||
Comment 13•10 years ago
|
||
This code causes name[-1] to be read if the length of the passed string is zero. We should protect against this:
Assignee: nobody → rkent
Assignee | ||
Comment 14•10 years ago
|
||
I'm not sure if this is causing the crash or not, but this method should have protection against zero length string.
Attachment #8589203 -
Flags: review?(neil)
Comment 15•10 years ago
|
||
Comment on attachment 8589203 [details] [diff] [review]
Check length of string before decrementing
* Protect both overloads for consistency. r=me with that fixed.
* Prefer to early return in the case of an empty string.
* Prefer use of IsEmpty() to check for empty string.
Attachment #8589203 -
Flags: review?(neil) → review+
Assignee | ||
Comment 16•10 years ago
|
||
Checked in https://hg.mozilla.org/comm-central/rev/4322a4f7e57a
We'll consider taking this simple patch in TB 38, also possibly TB 31.
Status: REOPENED → RESOLVED
Closed: 11 years ago → 10 years ago
status-thunderbird38:
--- → affected
status-thunderbird40:
--- → fixed
status-thunderbird_esr31:
--- → affected
tracking-thunderbird38:
--- → +
tracking-thunderbird_esr31:
--- → +
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 40.0
Assignee | ||
Updated•10 years ago
|
Attachment #8589203 -
Flags: approval-comm-beta?
Attachment #8589203 -
Flags: approval-comm-aurora?
Assignee | ||
Comment 17•10 years ago
|
||
Comment on attachment 8589203 [details] [diff] [review]
Check length of string before decrementing
http://hg.mozilla.org/releases/comm-beta/rev/3f8f00759a24
http://hg.mozilla.org/releases/comm-aurora/rev/6c54d11a4ed5
Attachment #8589203 -
Flags: approval-comm-beta?
Attachment #8589203 -
Flags: approval-comm-beta+
Attachment #8589203 -
Flags: approval-comm-aurora?
Attachment #8589203 -
Flags: approval-comm-aurora+
Assignee | ||
Updated•10 years ago
|
Comment 18•10 years ago
|
||
Thanks for the patch. Crash is gone in version 31.7.0.
https://crash-stats.mozilla.com/search/?signature=~NS_MsgHashIfNecessary&product=Thunderbird&date=%3E2015-05-01&date=%3C2015-07-01&_facets=signature&_columns=date&_columns=signature&_columns=version&_columns=build_id&_columns=platform&_columns=uptime#crash-reports
also reported in https://support.mozilla.org/en-US/questions/1026271
Status: RESOLVED → VERIFIED
OS: Mac OS X → All
Whiteboard: [startupcrash][rare]
You need to log in
before you can comment on or make changes to this bug.
Description
•