Closed
Bug 23891
Opened 26 years ago
Closed 26 years ago
deadlock or thread contention displaying IMAP messages
Categories
(MailNews Core :: Networking, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M14
People
(Reporter: alecf, Assigned: mscott)
Details
I've been getting what looks like either deadlock or just lock thrashing
displaying some IMAP messages. My CPU hits 100%, but about 50% of that time is
in the kernel, so I think it's lock contention.
Here are the two threads that are contending:
(gdb) where 15
#0 pthread_handle_sigrestart (sig=-1073754820, ctx={gs = 27260,
__gsh = 16412, fs = 0, __fsh = 0, es = 11124, __esh = 2053, ds = 52692,
__dsh = 49151, edi = 134556552, esi = 134556548, ebp = 0, esp = 0,
ebx = 134555896, edx = 16382, ecx = 134555916, eax = 134555912,
trapno = 0, err = 0, eip = 1077146764, cs = 52608, __csh = 49151,
eflags = 1077146764, esp_at_signal = 1075604092, ss = 18112,
__ssh = 16412, fpstate = 0xbfffcda4, oldmask = 1075569153, cr2 = 0})
at pthread.c:561
#1 0x401be211 in __pthread_lock (lock=0x8052b84, self=0x401c46c0)
at restart.h:32
#2 0x401bb99a in __pthread_mutex_lock (mutex=0x8052b74) at mutex.c:84
#3 0x4019c6fb in PR_Lock (lock=0x8052b74) at ptsynch.c:167
#4 0x4019d4ec in PR_EnterMonitor (mon=0x8052b70) at ptsynch.c:492
#5 0x40186dbd in PR_CEnterMonitor (address=0x87f4990) at prcmon.c:308
#6 0x4135726a in nsImapProtocol::PseudoInterruptMsgLoad (this=0x87f4990,
aImapUrl=0x940d048, interrupted=0xbfffcf0c) at nsImapProtocol.cpp:831
#7 0x4134126f in nsImapIncomingServer::PseudoInterruptMsgLoad (
this=0x8454ef0, aImapUrl=0x940d048, interrupted=0xbfffcf0c)
at nsImapIncomingServer.cpp:1374
#8 0x4137029c in nsImapService::FetchMessage (this=0x86e6ed0,
aImapUrl=0x940d048, aImapAction=<incomplete type>,
aImapMailFolder=0x82b9ba0, aImapMessage=0x82b9c30, aURL=0x0,
aDisplayConsumer=0x85c9930, messageIdentifierList=0x8cdaed8 "4699",
messageIdsAreUID=1) at nsImapService.cpp:516
#9 0x4136e4c3 in nsImapService::DisplayMessage (this=0x86e6ed0,
aMessageURI=0x940cb38 "imap_message://alecf@tintin.mcom.com/Outside#4699",
aDisplayConsumer=0x85c9930, aMsgWindow=0x84660e0, aUrlListener=0x0,
aURL=0x0) at nsImapService.cpp:273
#10 0x40af58c8 in ?? ()
from /home1/alecf/seamonkey/mozilla/dist/bin/components/libmailnews.so
#11 0x40129095 in XPTC_InvokeByIndex (that=0x8452930, methodIndex=11,
paramCount=1, params=0xbfffd284) at xptcinvoke_unixish_x86.cpp:159
#12 0x40964a63 in ?? ()
from /home1/alecf/seamonkey/mozilla/dist/bin/components/libxpconnect.so
#13 0x409661d2 in ?? ()
from /home1/alecf/seamonkey/mozilla/dist/bin/components/libxpconnect.so
#14 0x40069669 in ?? ()
from /home1/alecf/seamonkey/mozilla/dist/bin/libmozjs.so
and:
(gdb) where
#0 pthread_handle_sigrestart (sig=-1088423240, ctx={gs = 27260,
__gsh = 16412, fs = 31976, __fsh = 2286, es = 10488, __esh = 2053,
ds = 27260, __dsh = 16412, edi = 134555916, esi = 134555912, ebp = 0,
esp = 0, ebx = 134555912, edx = 0, ecx = 0, eax = 0, trapno = 0,
err = 0, eip = 0, cs = 0, __csh = 0, eflags = 0, esp_at_signal = 0,
ss = 0, __ssh = 0, fpstate = 0x0, oldmask = 0, cr2 = 0}) at pthread.c:561
#1 0x401be211 in __pthread_lock (lock=0x8052908, self=0xbf1ffe60)
at restart.h:32
#2 0x401bb99a in __pthread_mutex_lock (mutex=0x80528f8) at mutex.c:84
#3 0x4019c6fb in PR_Lock (lock=0x80528f8) at ptsynch.c:167
#4 0x40186df4 in PR_CExitMonitor (address=0x8ee7ce8) at prcmon.c:317
#5 0x41356f87 in nsImapProtocol::ImapThreadIsRunning (this=0x8ee7ce8)
at nsImapProtocol.cpp:729
#6 0x4135749e in nsImapProtocol::ImapThreadMainLoop (this=0x8ee7ce8)
at nsImapProtocol.cpp:905
#7 0x41355e53 in nsImapProtocol::Run (this=0x8ee7ce8)
at nsImapProtocol.cpp:685
#8 0x4011b345 in nsThread::Main (arg=0x8ee8950) at nsThread.cpp:83
#9 0x401a58fb in _pt_root (arg=0x8ee8968) at ptthread.c:157
#10 0x401baeca in pthread_start_thread (arg=0xbf1ffe60) at manager.c:213
I've been seeing this on and off for a week or so... this is on Linux 2.2.12smp,
which means I'm running an SMP kernel, though I'm on a single-processor box, so
it's possible that thread behavior or timing is different than a stock linux
kernel.
The machine is "nefarious" and it's my primary machine.... davidmc's
"dragonballz" has the same configuration.
| Reporter | ||
Updated•26 years ago
|
Summary: deadlock displaying IMAP messages → deadlock or thread contention displaying IMAP messages
| Reporter | ||
Comment 1•26 years ago
|
||
adding bienvenu & sspitzer to the CC
| Reporter | ||
Comment 2•26 years ago
|
||
just noticed I'm missing a frame there in libmailnews.so:
#10 0x40af58c8 in nsMessenger::OpenURL (this=0x8452930,
url=0x940cb00 "imap_message://alecf@tintin.mcom.com/Outside#4699")
at nsMessenger.cpp:318
| Assignee | ||
Comment 3•26 years ago
|
||
Alec, do you actually get past the contention? Or are you just stuck once this
occurrs?
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M14
| Assignee | ||
Comment 4•26 years ago
|
||
I've sent Alec a patch which may help alleviate this problem. We'll see.
| Assignee | ||
Comment 5•26 years ago
|
||
Hey Alec, have you still been running into this problem since you've been
running with that patch I sent you?
| Assignee | ||
Comment 6•26 years ago
|
||
I checked in my patch. Feel free to re-open alec if you start seeing the
contention problems again.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I think this is ok for alec now or else he would have reopened the bug :-)
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•