Last Comment Bug 735552 - nshttpconnectionmgr.cpp:513 NS_ABORT_IF_FALSE incorrect
: nshttpconnectionmgr.cpp:513 NS_ABORT_IF_FALSE incorrect
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Networking: HTTP (show other bugs)
: unspecified
: x86_64 Windows 7
: -- minor (vote)
: mozilla14
Assigned To: Patrick McManus [:mcmanus]
:
: Patrick McManus [:mcmanus]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-13 18:42 PDT by Patrick McManus [:mcmanus]
Modified: 2012-03-16 05:54 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch 0 (961 bytes, patch)
2012-03-13 18:48 PDT, Patrick McManus [:mcmanus]
honzab.moz: review+
Details | Diff | Splinter Review

Description Patrick McManus [:mcmanus] 2012-03-13 18:42:36 PDT
nsHttpConnectionMgr::ReportSpdyConnection() asserts that conn->ConnectionInfo() is present in mCT. If we have begun the shutdown pass that is not necessarily true as mCT would have been emptied out already.

The runtime code does the right thing here (returning when !ent), so all we need to do is remove the NS_ABORT_IF_FALSE()

stack:

(gdb) bt
#0  0x00007ffff7fe859a in TouchBadMemory () at ../../../preconnect-hint/memory/mozalloc/mozalloc_abort.cpp:68
#1  0x00007ffff7fe85ee in mozalloc_abort (
    msg=0x7fffe51fe640 "###!!! ABORT: no connection entry: 'ent', file ../../../../preconnect-hint/netwerk/protocol/http/nsHttpConnectionMgr.cpp, line 513")
    at ../../../preconnect-hint/memory/mozalloc/mozalloc_abort.cpp:89
#2  0x00007ffff50d4fad in Abort (aMsg=0x7fffe51fe640 "###!!! ABORT: no connection entry: 'ent', file ../../../../preconnect-hint/netwerk/protocol/http/nsHttpConnectionM
gr.cpp, line 513")
    at ../../../preconnect-hint/xpcom/base/nsDebugImpl.cpp:388
#3  0x00007ffff50d4eb0 in NS_DebugBreak_P (aSeverity=3, aStr=0x7ffff5989eb0 "no connection entry", aExpr=0x7ffff5989eac "ent",
    aFile=0x7ffff5989960 "../../../../preconnect-hint/netwerk/protocol/http/nsHttpConnectionMgr.cpp", aLine=513) at ../../../preconnect-hint/xpcom/base/nsDebugImpl.cpp:
345
#4  0x00007ffff3aaf03d in nsHttpConnectionMgr::ReportSpdyConnection (this=0x7fffdad6f590, conn=0x7fffda07aa80, usingSpdy=false)
    at ../../../../preconnect-hint/netwerk/protocol/http/nsHttpConnectionMgr.cpp:513
#5  0x00007ffff3aab47f in nsHttpConnection::OnSocketWritable (this=0x7fffda07aa80) at ../../../../preconnect-hint/netwerk/protocol/http/nsHttpConnection.cpp:1097
#6  0x00007ffff3aac249 in nsHttpConnection::OnOutputStreamReady (this=0x7fffda07aa80, out=0x7ffff6d7e248) at ../../../../preconnect-hint/netwerk/protocol/http/nsHttpCon
nection.cpp:1335
#7  0x00007ffff3a04145 in nsSocketOutputStream::OnSocketReady (this=0x7ffff6d7e248, condition=2147500036) at ../../../../preconnect-hint/netwerk/base/src/nsSocketTransp
ort2.cpp:525
#8  0x00007ffff3a077bf in nsSocketTransport::OnSocketDetached (this=0x7ffff6d7e0d0, fd=0x7fffea3fc490) at ../../../../preconnect-hint/netwerk/base/src/nsSocketTransport
2.cpp:1660
#9  0x00007ffff3a0a832 in nsSocketTransportService::DetachSocket (this=0x7ffff6d55520, listHead=0x7fffe5283000, sock=0x7fffe5283000)
    at ../../../../preconnect-hint/netwerk/base/src/nsSocketTransportService2.cpp:214
#10 0x00007ffff3a0c253 in nsSocketTransportService::DoPollIteration (this=0x7ffff6d55520, wait=true) at ../../../../preconnect-hint/netwerk/base/src/nsSocketTransportSe
rvice2.cpp:711
#11 0x00007ffff3a0bef0 in nsSocketTransportService::Run (this=0x7ffff6d55520) at ../../../../preconnect-hint/netwerk/base/src/nsSocketTransportService2.cpp:645
#12 0x00007ffff50c62bd in nsThread::ProcessNextEvent (this=0x7ffff6d55600, mayWait=true, result=0x7fffe51fedef) at ../../../preconnect-hint/xpcom/threads/nsThread.cpp:6
57
#13 0x00007ffff505bb1b in NS_ProcessNextEvent_P (thread=0x7ffff6d55600, mayWait=true) at nsThreadUtils.cpp:245
#14 0x00007ffff50c5142 in nsThread::ThreadFunc (arg=0x7ffff6d55600) at ../../../preconnect-hint/xpcom/threads/nsThread.cpp:289
#15 0x00007ffff7eaf103 in _pt_root (arg=0x7ffff6d27030) at ../../../../../preconnect-hint/nsprpub/pr/src/pthreads/ptthread.c:187
#16 0x00007ffff7bc4d8c in start_thread (arg=0x7fffe51ff700) at pthread_create.c:304
#17 0x00007ffff6f6b04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#18 0x0000000000000000 in ?? ()
(gdb) up
#5  0x00007ffff3aab47f in nsHttpConnection::OnSocketWritable (this=0x7fffda07aa80) at ../../../../preconnect-hint/netwerk/protocol/http/nsHttpConnection.cpp:1097
1097                                   gHttpHandler->ConnMgr()->ReportSpdyConnection(this, mUsingSpdy);
(gdb) down
#4  0x00007ffff3aaf03d in nsHttpConnectionMgr::ReportSpdyConnection (this=0x7fffdad6f590, conn=0x7fffda07aa80, usingSpdy=false)
    at ../../../../preconnect-hint/netwerk/protocol/http/nsHttpConnectionMgr.cpp:513
513     NS_ABORT_IF_FALSE(ent, "no connection entry");
(gdb) print mSocketThreadTarget
$3 = {
  mRawPtr = 0x0
Comment 1 Patrick McManus [:mcmanus] 2012-03-13 18:48:06 PDT
Created attachment 605627 [details] [diff] [review]
patch 0
Comment 2 Honza Bambas (:mayhemer) 2012-03-14 18:18:53 PDT
Comment on attachment 605627 [details] [diff] [review]
patch 0

Review of attachment 605627 [details] [diff] [review]:
-----------------------------------------------------------------

r=honzab
Comment 3 Patrick McManus [:mcmanus] 2012-03-14 21:10:54 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/e5b860072f6e
Comment 4 Marco Bonardo [::mak] 2012-03-16 05:54:14 PDT
https://hg.mozilla.org/mozilla-central/rev/e5b860072f6e

Note You need to log in before you can comment on or make changes to this bug.