Closed Bug 370229 Opened 19 years ago Closed 16 years ago

crash on startup / compact folder [@ nsImapProtocol::AddFolderRightsForUser]

Categories

(MailNews Core :: Networking: IMAP, defect)

1.8 Branch
x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: wsmwk, Unassigned)

References

Details

(Keywords: crash, Whiteboard: [tb2only])

Crash Data

Attachments

(2 files)

about 1 crash/day in talkback ~2/3 are v1, ~1/3 v1.5 (approx 1/week) no trunk or version 2 of the very few comments, most mention startup, for example "Starting Thunderbird for the first time. I had just set up the first email account (IMAP)". One below mentions compacting Incident ID: TB29118999 Stack Signature nsImapProtocol::AddFolderRightsForUser aff1f59f Product ID Thunderbird15 Build ID 2006120700 Trigger Time 2007-02-07 16:20:32.0 Platform Win32 Operating System Windows NT 5.1 build 2600 Module thunderbird.exe + (004c7545) URL visited User Comments Since Last Crash 602149 sec Total Uptime 1006172 sec Trigger Reason Access violation Source File, Line No. c:/builds/tinderbox/Tb-Mozilla1.8.0-Release/WINNT_5.2_Depend/mozilla/mailnews/imap/src/nsImapProtocol.cpp, line 4183 Stack Trace nsImapProtocol::AddFolderRightsForUser [mozilla/mailnews/imap/src/nsImapProtocol.cpp, line 4183] nsImapServerResponseParser::myrights_data [mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp, line 2407] 0x90906017 Incident ID: TB25990698 Stack Signature nsImapProtocol::AddFolderRightsForUser aff1f59f Product ID Thunderbird15 Build ID 2006102517 Trigger Time 2006-11-14 07:12:04.0 Platform Win32 Operating System Windows NT 5.1 build 2600 Module thunderbird.exe + (004c576b) URL visited User Comments Compacting folders Since Last Crash 8878 sec Total Uptime 8878 sec Trigger Reason Access violation Source File, Line No. c:/builds/tinderbox/Tb-Mozilla1.8.0-Release/WINNT_5.2_Depend/mozilla/mailnews/imap/src/nsImapProtocol.cpp, line 4183 Stack Trace nsImapProtocol::AddFolderRightsForUser [mozilla/mailnews/imap/src/nsImapProtocol.cpp, line 4183] nsImapServerResponseParser::myrights_data [mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp, line 2407] 0x90906017
still infrequent, only #177 in talkback. not all same stack. some preceded by nsImapServerResponseParser::myrights_data as above. some are nsImapServerResponseParser::acl_data like these TB5773625 Stack Signature nsImapProtocol::AddFolderRightsForUser 54f145b3 Product ID Thunderbird2 Build ID 2007072817 Trigger Time 2007-09-10 09:42:09.0 Platform Win32 Operating System Windows NT 5.1 build 2600 Module thunderbird.exe + (004d93cf) User Comments Searching all folders for messages with "lawn" in subject. Minimized search window after ~ 10 minutes. Since Last Crash 55252 sec Total Uptime 790479 sec Trigger Reason Access violation Source File, Line No. e:/builds/tinderbox/Tb-Mozilla1.8-Release/WINNT_5.0_Depend/mozilla/mailnews/imap/src/nsImapProtocol.cpp, line 4273 Stack Trace nsImapProtocol::AddFolderRightsForUser [mozilla/mailnews/imap/src/nsImapProtocol.cpp, line 4273] nsImapServerResponseParser::acl_data [mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp, line 2459] 0x2e73656c TB38221847 Stack Signature nsImapProtocol::AddFolderRightsForUser 2cbbe8f8 Product ID Thunderbird2 Build ID 2007103104 Trigger Time 2007-11-19 01:07:20.0 Platform Win32 Operating System Windows NT 5.1 build 2600 User Comments first of the day opening of computer - set to open at start up. Fails every time Since Last Crash 156 sec Total Uptime 58936 sec Trigger Reason Access violation Source File, Line No. e:/builds/tinderbox/Tb-Mozilla1.8-Release/WINNT_5.0_Depend/mozilla/mailnews/imap/src/nsImapProtocol.cpp, line 4273 Stack Trace nsImapProtocol::AddFolderRightsForUser [mozilla/mailnews/imap/src/nsImapProtocol.cpp, line 4273] nsImapServerResponseParser::acl_data [mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp, line 2459] 0x2d6c6172
I've gotten this a bunch of times in tonight since Mozilla's Zimbra upgrade. Anything from hitting the "N" key to go to the next message to just letting it retrieve mail in the background (and once on startup, too). Seems to be the same trace every time. Mac version doesn't have Talkback, so here's what CrashReporter says: Thread 10 Crashed: 0 org.mozilla.thunderbird 0x000f53b9 nsImapProtocol::AddFolderRightsForUser(char const*, char const*, char const*) + 147 1 org.mozilla.thunderbird 0x004bed3b nsImapServerResponseParser::acl_data() + 225 2 org.mozilla.thunderbird 0x004c22d9 nsImapServerResponseParser::response_data() + 1089 3 org.mozilla.thunderbird 0x004c08a5 nsImapServerResponseParser::ParseIMAPServerResponse(char const*, int) + 531 4 org.mozilla.thunderbird 0x000fee3c nsImapProtocol::Logout(int, int) + 236 5 org.mozilla.thunderbird 0x00106acc nsImapProtocol::ProcessSelectedStateURL() + 7866 6 org.mozilla.thunderbird 0x00107679 nsImapProtocol::ProcessCurrentURL() + 2065 7 org.mozilla.thunderbird 0x000f9212 nsImapProtocol::ImapThreadMainLoop() + 204 8 org.mozilla.thunderbird 0x000f938e nsImapProtocol::ImapThreadMainLoop() + 584 9 libxpcom_core.dylib 0x00e47fe3 nsThread::Main(void*) + 41 10 libnspr4.dylib 0x00ef1ffd PR_Select + 813 11 libSystem.B.dylib 0x913a3c55 _pthread_start + 321 12 libSystem.B.dylib 0x913a3b12 thread_start + 34 version 2.0.0.13pre (20080224)
is this related to bug 283848?
I'm getting this personally once or twice a day now, usually with Thunderbird just idling in the background at the time. My Addons manager claims I have Talkback installed, but it never fires. Here's what I get from OS X's CrashReporter: Thread 14 Crashed: 0 org.mozilla.thunderbird 0x000f5369 nsImapProtocol::AddFolderRightsForUser(char const*, char const*, char const*) + 147 1 org.mozilla.thunderbird 0x004bfeb3 nsImapServerResponseParser::acl_data() + 225 2 org.mozilla.thunderbird 0x004c3451 nsImapServerResponseParser::response_data() + 1089 3 org.mozilla.thunderbird 0x004c1a1d nsImapServerResponseParser::ParseIMAPServerResponse(char const*, int) + 531 4 org.mozilla.thunderbird 0x000fedec nsImapProtocol::Logout(int, int) + 236 5 org.mozilla.thunderbird 0x00106a7c nsImapProtocol::ProcessSelectedStateURL() + 7866 6 org.mozilla.thunderbird 0x00107629 nsImapProtocol::ProcessCurrentURL() + 2065 7 org.mozilla.thunderbird 0x000f91c2 nsImapProtocol::ImapThreadMainLoop() + 204 8 org.mozilla.thunderbird 0x000f933e nsImapProtocol::ImapThreadMainLoop() + 584 9 libxpcom_core.dylib 0x00e49fcb nsThread::Main(void*) + 41 10 libnspr4.dylib 0x00ef3ffd PR_Select + 813 11 libSystem.B.dylib 0x913a3c55 _pthread_start + 321 12 libSystem.B.dylib 0x913a3b12 thread_start + 34
Flags: blocking1.8.1.13?
No one's going to have time to track this down while we're in the middle of release-candidate testing. Will push it off to the next release, but even that isn't likely if no mail developers are actually investigating this. I guess I can "confirm" the bug--talkback proves it exists--but there's still not much to go on.
Flags: blocking1.8.1.13? → blocking1.8.1.14?
Keywords: qawanted
Assignee: mscott → ebirol
Status: UNCONFIRMED → NEW
Ever confirmed: true
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp&rev=1.147&mark=102,107,154-155,208,209,321,411,888,929-930,953,1143,1158,1169,1840-1841,2188,2378,2384,2391,2400,2418,2424,2430,2434,2447,2470,2493,2505,2522,2544,2659,2956, This isn't your problem, but it is a problem, and since there's an engineer, here's a good time for an intro to Mozilla and memory allocators (we have a lot of them, and unless they are explicitly documented as compatible, they aren't. And anyone claiming that 'malloc' from X is compatible with free from Y is usually wrong [malloc is only guaranteed to be compatible with free if both malloc and free are called from the same library, otherwise, as is the case on windows, they can use different heaps): PL_strdup is not compatible with PR_Malloc, the first hint is that the prefix doesn't match. The correct pair is PL_strfree (which seems to be used properly for one variable in this entire file). justdave: since you can reproduce this, can you run w/ a build w/ --enable-debugger-info-modules and get a core dump? it'd sure help if you could explain what the state of the variables are. The most obvious candidate was a null pointer to nsDependent*String, however in my scan of the code, I don't think that can happen (not that I like the code as can be seen from my url above...). FWIW, I don't see any reason offhand why this isn't a duplicate of the other bug, and that's usually a good reason not to confirm a bug, confirming duplicates is a bad practice.
Hmm, that means coming up with a build environment again. I can try. Tomorrow sometime, if I think of it.
> FWIW, I don't see any reason offhand why this isn't a duplicate of the other > bug, and that's usually a good reason not to confirm a bug, confirming > duplicates is a bad practice. Confirming it drew attention and good analysis (thanks!) so it seems to have paid off IMHO.
>PL_strdup is not compatible with PR_Malloc, the first hint is that the prefix >doesn't match. The correct pair is PL_strfree (which seems to be used properly >for one variable in this entire file). Good point. http://developer.mozilla.org/en/docs/Choosing_the_right_memory_allocator emphasis "You should only use the NSPR allocators within NSPR or the security code located in the /security/ subtree of the source code. Avoid using them elsewhere." Dave: Did you have a chance to get a new crash report?
I've been clicking "Ignore" the last few times. I'll snag one the next time it happens (still happening every day or so).
Attached file CrashReporter dump —
Got one.
justdave: sorry, i mean a real core dump from a build you spin yourself, we need local variables.
oh, forgot about that, I was answering comment 10. I still need to come up with a build environment. Maybe this afternoon after church if I remember.
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 [Switching to process 828 thread 0x611b] 0x01364b59 in nsImapProtocol::AddFolderRightsForUser () (gdb) bt #0 0x01364b59 in nsImapProtocol::AddFolderRightsForUser () #1 0x013778b9 in nsImapServerResponseParser::acl_data () #2 0x0137a27b in nsImapServerResponseParser::response_data () #3 0x013745fb in nsImapServerResponseParser::ParseIMAPServerResponse () #4 0x0135394f in nsImapProtocol::ParseIMAPandCheckForNewMail () #5 0x01359403 in nsImapProtocol::Logout () #6 0x013667f3 in nsImapProtocol::TellThreadToDie () #7 0x01370462 in nsImapProtocol::ProcessCurrentURL () #8 0x01365395 in nsImapProtocol::ImapThreadMainLoop () #9 0x01366994 in nsImapProtocol::Run () #10 0x00311135 in nsThread::Main () #11 0x004dd461 in _pt_root (arg=0x25ae6d70) at /Users/dave/Source/MozillaBuild/mozilla/nsprpub/pr/src/pthreads/ptthread.c:220 #12 0x905adc55 in _pthread_start () #13 0x905adb12 in thread_start () (gdb) I'll leave this sit for now in case anyone wants any debug info out of it. Where do I go from here? (I'm not a gdb expert)
btw, my email is down until I get walked through this, so the likelihood that I'll see bugmail is pretty slim... :) Come find me on #maildev if you want to help.
<justdave> and that was built from a checkout to an empty directory of client.mk and mail/config using -rMOZILLA_1_8_BRANCH and this .mozconfig oh! not trunk? <justdave> nope, this is 1.8 branch where I'm reproducing it constantly http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/imap/src/nsImapProtocol.cpp&rev=1.612.2.27 0x01364ad4 should be 4260 0x01364b2c should be 4266 0x01364b34 would be the same 0x01364b6f would be 4271 but we crashed before that the best candidate is 4269 m_runningUrl-> frame 1 m_runningUrl will be an nsIImapUrl and it is null 333 bienvenu 1.167 nsCOMPtr<nsIImapUrl>m_runningUrl; // the nsIImapURL that is currently running http://mxr-test.landfill.bugzilla.org/mozilla1.8.x/search?string=m_runningUrl&find=mail&findi=&filter=running.*[^%3D]%3D[^%3D] did this code ever work? re zimbra, i'm fairly certain the crash is simply because they support a feature they didn't have before (mail would have crashed years ago if the code was exercised). if someone wants to do some debugging, basically take that last url; for each line that does m_runningUrl = ... add a line (after it): fprintf(stderr, "this(%p)->m_runningUrl = %p\n", (void*)this, m_runningUrl); and in nsImapProtocol::AddFolderRightsForUser as the first line of that function what should happen is right before it crashes it'll list a this which you never saw w/ an m_runningUrl that wasn't 0
Severity: normal → critical
Keywords: crash
dmose: should we block 1.8.1.15 for this?
Flags: wanted1.8.1.x+
After discussing with Dan, we decided that while we'd like to see a fix for this, it doesn't appear to be obviously exploitable, so we won't block.
Clearing "QAWanted" as we seem to have what we need here.
Keywords: qawanted
Flags: blocking1.8.1.15?
still not finding in any 3.0 builds.
Assignee: bugmil.ebirol → nobody
Component: General → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: general → networking.imap
Whiteboard: [not 3.0]
Version: 1.5 → 1.8 Branch
not found as top of stack in any recent v3 crashes. and nsImapProtocol::AddFolderRightsForUser not found in any open crash bug reports => WFM
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
Whiteboard: [not 3.0] → [tb2only]
Crash Signature: [@ nsImapProtocol::AddFolderRightsForUser]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: