David, I've had another hang at shutdown, but not 100% cpu this time. I did a complete GDB session, and inspected every one of the 15 threads running. One is indeed hanging in the IMAP code. The full backtrace is near the end of the file. Relevant parts:
#5 nsPipeInputStream::Wait (this=0x7fe274372910)
at /home/jonathan/Code/comm-central/mozilla/xpcom/io/nsPipe3.cpp:652
No locals.
#6 0x00007fe2a1cebfd5 in nsPipeInputStream::ReadSegments (
this=0x7fe274372910,
writer=0x7fe2a1cec8fb <NS_CopySegmentToBuffer(nsIInputStream*, void*, char const*, P
readCount=0x7fe26d9fc80c)
at /home/jonathan/Code/comm-central/mozilla/xpcom/io/nsPipe3.cpp:777
writeCount = 1924833280
originalLen = <value optimized out>
rv = <value optimized out>
segment = 0x7fe26d9fc858 "\n"
segmentLen = 32738
#7 0x00007fe2a20616b8 in nsMsgCompressIStream::Read (this=0x7fe275d70950,
aBuf=0x7fe272baa000 "+ idling\r\n", aCount=7008, aResult=0x7fe26d9fc868)
at /home/jonathan/Code/comm-central/mailnews/base/util/nsMsgCompressIStream.cpp:175
bytesRead = 0
rv = <value optimized out>
rv = <value optimized out>
#8 0x00007fe2a2044619 in nsMsgLineStreamBuffer::ReadNextLine (
this=0x7fe270a5d310, aInputStream=0x7fe275d70950,
aNumBytesInLine=@0x7fe26d9fc928, aPauseForMoreData=@0x7fe26d9fc92c,
prv=0x7fe26d9fc924, addLineTerminator=0)
at /home/jonathan/Code/comm-central/mailnews/base/util/nsMsgLineBuffer.cpp:403 startOfNewData = <value optimized out>
i = <value optimized out>
rv = <value optimized out> numBytesInStream = 7008 numFreeBytesInBuffer = <value optimized out> numBytesCopied = 0 nonBlockingStream = 0
endOfLine = <value optimized out>
startOfLine = 0x7fe272baa000 "+ idling\r\n"
#9 0x00007fe2a1fb81b8 in nsImapProtocol::CreateNewLineFromSocket (
this=0x7fe2709c6000)
at /home/jonathan/Code/comm-central/mailnews/imap/src/nsImapProtocol.cpp:4718 numBytesInLine = 0
rv = 0
kungFuGrip = {<nsCOMPtr_base> = {
mRawPtr = 0x7fe275d70950}, <No data fields>} needMoreData = 0
newLine = <value optimized out>
#10 0x00007fe2a1fc7b6e in nsImapServerResponseParser::GetNextLineForParser (
this=0x7fe2709c6290, nextLine=0x7fe2709c62a0)
at /home/jonathan/Code/comm-central/mailnews/imap/src/nsImapServerResponseParser.cpp
rv = 1
#11 0x00007fe2a2085569 in nsIMAPGenericParser::AdvanceToNextLine (
this=0x7fe2709c6290)
at /home/jonathan/Code/comm-central/mailnews/imap/src/nsIMAPGenericParser.cpp:181
ok = <value optimized out>
#12 0x00007fe2a20855ff in nsIMAPGenericParser::AdvanceToNextToken (
this=0x7fe2709c6290)
at /home/jonathan/Code/comm-central/mailnews/imap/src/nsIMAPGenericParser.cpp:152
No locals.
#13 0x00007fe2a1fc93d2 in nsImapServerResponseParser::ParseIMAPServerResponse (
this=0x7fe2709c6290, aCurrentCommand=<value optimized out>,
aIgnoreBadAndNOResponses=0, aGreetingWithCapability=0x0)
at /home/jonathan/Code/comm-central/mailnews/imap/src/nsImapServerResponseParser.cpp placeInTokenString = 0x7fe274349271 "\n"
tagToken = <value optimized out> commandToken = <value optimized out>
inIdle = <value optimized out> sendingIdleDone = 0 numberOfTaggedResponsesReceived = 0 copyCurrentCommand = {<nsACString_internal> = {
mData = 0x7fe274349268 "321", mLength = 10,
mFlags = 5}, <No data fields>}
#14 0x00007fe2a1fb25f0 in nsImapProtocol::HandleIdleResponses (
Created attachment 529281
GDB log
David, I've had another hang at shutdown, but not 100% cpu this time. I did a complete GDB session, and inspected every one of the 15 threads running. One is indeed hanging in the IMAP code. The full backtrace is near the end of the file. Relevant parts:
#5 nsPipeInputStre am::Wait (this=0x7fe2743 72910) Code/comm- central/ mozilla/ xpcom/io/ nsPipe3. cpp:652 am::ReadSegment s ( 0x7fe274372910, 0x7fe2a1cec8fb <NS_CopySegment ToBuffer( nsIInputStream* , void*, char const*, P 0x7fe26d9fc80c) Code/comm- central/ mozilla/ xpcom/io/ nsPipe3. cpp:777 tream:: Read (this=0x7fe275d 70950, 0x7fe272baa000 "+ idling\r\n", aCount=7008, aResult= 0x7fe26d9fc868) Code/comm- central/ mailnews/ base/util/ nsMsgCompressIS tream.cpp: 175 Buffer: :ReadNextLine ( 0x7fe270a5d310, aInputStream= 0x7fe275d70950, Line=@0x7fe26d9 fc928, aPauseForMoreDa ta=@0x7fe26d9fc 92c, 0x7fe26d9fc924, addLineTerminat or=0) Code/comm- central/ mailnews/ base/util/ nsMsgLineBuffer .cpp:403
startOfNewData = <value optimized out>
numBytesInStre am = 7008
numFreeBytesIn Buffer = <value optimized out>
numBytesCopied = 0
nonBlockingStr eam = 0 :CreateNewLineF romSocket ( 0x7fe2709c6000) Code/comm- central/ mailnews/ imap/src/ nsImapProtocol. cpp:4718
numBytesInLine = 0
needMoreData = 0 ponseParser: :GetNextLineFor Parser ( 0x7fe2709c6290, nextLine= 0x7fe2709c62a0) Code/comm- central/ mailnews/ imap/src/ nsImapServerRes ponseParser. cpp rser::AdvanceTo NextLine ( 0x7fe2709c6290) Code/comm- central/ mailnews/ imap/src/ nsIMAPGenericPa rser.cpp: 181 rser::AdvanceTo NextToken ( 0x7fe2709c6290) Code/comm- central/ mailnews/ imap/src/ nsIMAPGenericPa rser.cpp: 152 ponseParser: :ParseIMAPServe rResponse ( 0x7fe2709c6290, aCurrentCommand =<value optimized out>, ndNOResponses= 0, aGreetingWithCa pability= 0x0) Code/comm- central/ mailnews/ imap/src/ nsImapServerRes ponseParser. cpp
placeInTokenSt ring = 0x7fe274349271 "\n"
commandToken = <value optimized out>
sendingIdleDon e = 0
numberOfTagged ResponsesReceiv ed = 0
copyCurrentCom mand = {<nsACString_ internal> = { :HandleIdleResp onses (
at /home/jonathan/
No locals.
#6 0x00007fe2a1cebfd5 in nsPipeInputStre
this=
writer=
readCount=
at /home/jonathan/
writeCount = 1924833280
originalLen = <value optimized out>
rv = <value optimized out>
segment = 0x7fe26d9fc858 "\n"
segmentLen = 32738
#7 0x00007fe2a20616b8 in nsMsgCompressIS
aBuf=
at /home/jonathan/
bytesRead = 0
rv = <value optimized out>
rv = <value optimized out>
#8 0x00007fe2a2044619 in nsMsgLineStream
this=
aNumBytesIn
prv=
at /home/jonathan/
i = <value optimized out>
rv = <value optimized out>
endOfLine = <value optimized out>
startOfLine = 0x7fe272baa000 "+ idling\r\n"
#9 0x00007fe2a1fb81b8 in nsImapProtocol:
this=
at /home/jonathan/
rv = 0
kungFuGrip = {<nsCOMPtr_base> = {
mRawPtr = 0x7fe275d70950}, <No data fields>}
newLine = <value optimized out>
#10 0x00007fe2a1fc7b6e in nsImapServerRes
this=
at /home/jonathan/
rv = 1
#11 0x00007fe2a2085569 in nsIMAPGenericPa
this=
at /home/jonathan/
ok = <value optimized out>
#12 0x00007fe2a20855ff in nsIMAPGenericPa
this=
at /home/jonathan/
No locals.
#13 0x00007fe2a1fc93d2 in nsImapServerRes
this=
aIgnoreBadA
at /home/jonathan/
tagToken = <value optimized out>
inIdle = <value optimized out>
mData = 0x7fe274349268 "321", mLength = 10,
mFlags = 5}, <No data fields>}
#14 0x00007fe2a1fb25f0 in nsImapProtocol: