Closed
Bug 386148
Opened 18 years ago
Closed 15 years ago
"ASSERTION: nsImapMailboxSpec not thread-safe"
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: mscott, Assigned: Bienvenu)
References
Details
Attachments
(2 files)
|
12.04 KB,
text/plain
|
Details | |
|
872 bytes,
patch
|
Details | Diff | Splinter Review |
I just started running into this assertion in my debug build, either of you guys seeing this?
###!!! ASSERTION: nsImapMailboxSpec not thread-safe: '_mOwningThread.GetThread()
== PR_GetCurrentThread()', file c:/build/trees/tb-trunk/mozilla/mailnews/imap/s
rc/nsImapUtils.cpp, line 236
| Assignee | ||
Comment 1•18 years ago
|
||
I think I have seen that recently - I'll try to look at a stack trace next time it happens. It might be that it happens when an imap connection gets dropped, and the imap protocol object gets released on the wrong thread.
| Assignee | ||
Comment 2•18 years ago
|
||
The UpdateMailboxInfo event (which gets proxied from the imap thread to the ui thread) has a reference to a mailbox spec, and is the last owner of the reference, so that when the event gets cleaned up, it releases the reference and the destructor is hit. I think this happens on the ui thread, but the mailbox spec is created on the imap thread. I'm not sure what changed about this, but I'll look a little more.
| Assignee | ||
Comment 3•18 years ago
|
||
it's not a last reference case - any release on the wrong thread causes this assertion. What's weird is that my fastmail.fm account has no problem, but my mozilla.com account does assert everytime a folder is selected.
| Reporter | ||
Comment 4•18 years ago
|
||
I wonder if this issue was triggered by Bug 337492.
Addref / Release calls are happening on the imap thread as I would expect. The only one that's on the wrong thread is when a nsIRunnable object gets destroyed, it's releasing our mailbox spec object. We could have been relying on an ordering problem that was changed with 337492.
| Reporter | ||
Comment 5•18 years ago
|
||
sometimes I do see the nsIRunnable object release the mailbox spec on the imap thread. here's a stack trace where things are happening correctly:
> nsImapMailboxSpec::Release() Line 236 C++
nsProxyObjectCallInfo::RefCountInInterfacePointers() Line 214 C++
nsProxyObjectCallInfo::~nsProxyObjectCallInfo() Line 153 C++
nsProxyObjectCallInfo::`scalar deleting destructor'() C++
nsRunnable::Release() Line 51 C++
nsRefPtr<nsProxyObjectCallInfo>::~nsRefPtr<nsProxyObjectCallInfo>() Line 957 C++
nsProxyEventObject::CallMethod() Line 263 C++
PrepareAndDispatch() Line 114 C++
SharedStub() Line 142 C++
nsImapProtocol::UpdatedMailboxSpec() Line 3720 C++
nsImapProtocol::UpdatedMailboxSpec() Line 3720 C++
nsImapProtocol::ProcessMailboxUpdate() Line 3674 C++
nsImapProtocol::ProcessSelectedStateURL() Line 2258 C++
nsImapProtocol::ProcessCurrentURL() Line 1441 C++
nsImapProtocol::ImapThreadMainLoop() Line 1155 C++
nsImapProtocol::Run() Line 936 C++
| Reporter | ||
Comment 6•18 years ago
|
||
Stack trace where nsIRunnable releases nsImapMailboxSpec on the wrong thread...
> nsImapMailboxSpec::Release() Line 236 C++
nsProxyObjectCallInfo::RefCountInInterfacePointers() Line 214 C++
nsProxyObjectCallInfo::~nsProxyObjectCallInfo() Line 153 C++
nsProxyObjectCallInfo::`scalar deleting destructor'() C++
nsRunnable::Release() Line 51 C++
nsCOMPtr<nsIRunnable>::~nsCOMPtr<nsIRunnable>() Line 584 C++
nsThread::ProcessNextEvent() Line 492 C++
NS_ProcessNextEvent_P() Line 227 C++
nsBaseAppShell::Run() Line 154 C++
nsAppStartup::Run() Line 171 C++
XRE_main() Line 2810 C++
| Assignee | ||
Comment 7•18 years ago
|
||
Scott, it does sound like that bug is involved - but this only happens sometimes to me, which kinda implies that something random is still going on and perhaps bug 337492 isn't really fixed.
Comment 8•18 years ago
|
||
It looks like it's a dup of bug 351193, but I would prefer marking that as duplicate.
I got this assertion every time it checks for new IMAP mail and sometimes the whole interface hangs for a few seconds while downloading new mail or headers.
Running Linux 64 bits.
Comment 9•18 years ago
|
||
Just another info:
the IMAP account in question is a gmail imap account and I'm checking on new mail on all folders.
So generally new mail arrives on at least two folders at once (inbox and all mail).
Comment 11•17 years ago
|
||
Ran into this assertion while switching from an IMAP folder into downloading newsgroup messages. (I think)
Updated•17 years ago
|
Summary: Assertion about nsImapMailboxSpec not being threadsafe → "ASSERTION: nsImapMailboxSpec not thread-safe"
| Assignee | ||
Comment 12•17 years ago
|
||
this papers over the underlying problem, which sure sounds a lot like Bug 337492 - I don't know how much traction we're going to get on that though. At least this silences the assertion, relatively cheaply.
Comment 13•17 years ago
|
||
Also hit this assertion when leaving Thunderbird idle with an IMAP and a news account.
Updated•17 years ago
|
Product: Core → MailNews Core
| Assignee | ||
Comment 14•15 years ago
|
||
have not seen this in a long time.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•