Hangs in an endless loop




Networking: HTTP
13 years ago
13 years ago


(Reporter: Enrico Scholz, Assigned: Darin Fisher)



1.7 Branch

Firefox Tracking Flags

(Not tracked)




13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041112 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041112 Firefox/1.0

firefox sometimes hangs and utilizes all CPU time. It is not reproducible;
but investigating the last hangup in gdb shows:


(gdb) bt
#0  PL_HashTableRawLookup (ht=0x89ed980, keyHash=108352116, key=0x415199a0) at plhash.c:206
#1  0x4012a552 in PL_HashTableLookup (ht=0x89ed980, key=0x415199a0) at plhash.c:388
#2  0x41aa2e57 in nsHttp::ResolveAtom (str=0x415199a0 "Accept") at nsHttp.cpp:140
#3  0x41ab6665 in nsHttpChannel::SetRequestHeader (this=0xe571720, header=@0xbfffda6c, value=@0xbfffda7c, merge=0) at nsTString.h:141
#4  0x4150d9b6 in NewImageChannel (aResult=0xbfffdb64, aURI=0xee93778, aInitialDocumentURI=0xcfbb708, aReferringURI=0xcfbb708, aLoadGroup=0xbfffda6c, aLoadFlags=0) at nsCOMPtr.h:710
#5  0x4150dffc in imgLoader::LoadImage (this=0x82611a8, aURI=0xee93778, aInitialDocumentURI=0xcfbb708, aReferrerURI=0xcfbb708, aLoadGroup=0xbc927b8, aObserver=0x9dd2f3c, aCX=0xa5d26f8, 
    aLoadFlags=3221216100, cacheKey=0x0, aRequest=0x0, _retval=0x9dd2f40) at nsCOMPtr.h:1211
#6  0x4129eaa4 in nsContentUtils::LoadImage (aURI=0xee93778, aLoadingDocument=0xa5d26f8, aObserver=0x9dd2f3c, aLoadFlags=0, aRequest=0x9dd2f40) at nsCOMPtr.h:704
#7  0x412db7f6 in nsImageLoadingContent::ImageURIChanged (this=0x9dd2f3c, aNewURI=@0xbfffdcb0) at nsCOMPtr.h:704
#8  0x412db990 in nsImageLoadingContent::ImageURIChanged (this=0x9dd2f3c, aNewURI=@0xbfffdd2c) at nsString.h:158
#9  0x41318d7a in nsHTMLInputElement::SetParent (this=0x9dd2f18, aParent=0xbfffdd2c) at nsHTMLInputElement.cpp:1680
#10 0x4129cbba in nsGenericElement::AppendChildTo (this=0x9dd2e58, aKid=0x9dd2f18, aNotify=0, aDeepSetDocument=0) at nsGenericElement.cpp:2587
#11 0x41346440 in SinkContext::AddLeaf (this=0x928c4e0, aContent=0x9dd2f18) at nsHTMLContentSink.cpp:1606
#12 0x4134698f in SinkContext::AddLeaf (this=0x928c4e0, aNode=@0xec5cf68) at nsCOMPtr.h:704
#13 0x41349e72 in HTMLContentSink::AddLeaf (this=0xf270c70, aNode=@0xec5cf68) at nsHTMLContentSink.cpp:3197
#14 0x415a8cad in CNavDTD::AddLeaf (this=0xc643dd8, aNode=0xec5cf68) at CNavDTD.cpp:3787
#15 0x415aa5bf in CNavDTD::HandleDefaultStartToken (this=0xc643dd8, aToken=0xa330908, aChildTag=eHTMLTag_input, aNode=0xec5cf68) at CNavDTD.cpp:1460
#16 0x415ab3f1 in CNavDTD::HandleStartToken (this=0xc643dd8, aToken=0xa330908) at CNavDTD.cpp:1835
#17 0x415abc2e in CNavDTD::HandleToken (this=0xc643dd8, aToken=0xa330908, aParser=0xee16128) at CNavDTD.cpp:1019
#18 0x415a6eaf in CNavDTD::BuildModel (this=0xc643dd8, aParser=0xee16128, aTokenizer=0x19, anObserver=0x0, aSink=0xf270cbc) at CNavDTD.cpp:511
#19 0x415baf31 in nsParser::BuildModel (this=0xee16128) at nsCOMPtr.h:704
#20 0x415bbd28 in nsParser::ResumeParse (this=0xee16128, allowIteration=1, aIsFinalChunk=1, aCanInterrupt=1) at nsParser.cpp:1866
#21 0x415b93d7 in nsParser::ContinueParsing (this=0xee16128) at nsParser.cpp:1429
#22 0x41267ef7 in nsContentSink::ScriptEvaluated (this=0xf270c70, aResult=0, aElement=0xef3db7c, aIsInline=0, aWasPending=1) at nsCOMPtr.h:710
#23 0x41267a22 in nsScriptLoaderObserverProxy::ScriptEvaluated (this=0x6755274, aResult=0, aElement=0xef3db7c, aIsInline=0, aWasPending=1) at nsCOMPtr.h:710
#24 0x412d1320 in nsScriptLoader::FireScriptEvaluated (this=0xa3a84a0, aResult=0, aRequest=0xaa6ea80) at nsCOMPtr.h:710
#25 0x412d14c2 in nsScriptLoader::ProcessRequest (this=0xa3a84a0, aRequest=0xaa6ea80) at nsScriptLoader.cpp:582
#26 0x412d2f46 in nsScriptLoader::OnStreamComplete (this=0xa3a84a0, aLoader=0xbfffe448, aContext=0xaa6ea80, aStatus=3221218744, stringLen=4294967295, string=0xf271b52 "R")
    at nsScriptLoader.cpp:902
#27 0x41a63b81 in nsStreamLoader::OnStopRequest (this=0xbfb6f58, request=0xd09fa70, ctxt=0xaa6ea80, aStatus=0) at nsCOMPtr.h:710
#28 0x41a7505c in nsHTTPCompressConv::OnStopRequest (this=0x89ee610, request=0xd09fa70, aContext=0xaa6ea80, aStatus=0) at nsHTTPCompressConv.cpp:124
#29 0x41a63740 in nsStreamListenerTee::OnStopRequest (this=0xf0af490, request=0xd09fa70, context=0xaa6ea80, status=0) at nsCOMPtr.h:710
#30 0x41abe4e9 in nsHttpChannel::OnStopRequest (this=0xd09fa70, request=0xc659388, ctxt=0x0, status=0) at nsCOMPtr.h:710
#31 0x41a4fd3b in nsInputStreamPump::OnStateStop (this=0xc659388) at nsCOMPtr.h:710
#32 0x41a5001f in nsInputStreamPump::OnInputStreamReady (this=0xc659388, stream=0xeadcca8) at nsInputStreamPump.cpp:339
#33 0x400e653b in nsInputStreamReadyEvent::EventHandler (plevent=0x6755274) at nsCOMPtr.h:710
#34 0x400f8443 in PL_HandleEvent (self=0xc65941c) at plevent.c:673
#35 0x400f8aa7 in PL_ProcessPendingEvents (self=0x8105a08) at plevent.c:608
#36 0x400f9cf8 in nsEventQueueImpl::ProcessPendingEvents (this=0x81059c0) at nsEventQueue.cpp:391
#37 0x41e2d610 in event_processor_callback (source=0x83acda8, condition=G_IO_IN, data=0x89ee610) at nsAppShell.cpp:67
#38 0x405f26b7 in g_vasprintf () from /usr/lib/libglib-2.0.so.0
#39 0x405ce4fb in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#40 0x405cff82 in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#41 0x405d022f in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#42 0x402e06ae in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#43 0x41e2dbc2 in nsAppShell::Run (this=0x8196500) at nsAppShell.cpp:142
#44 0x41af8511 in nsAppShellService::Run (this=0x6755274) at nsCOMPtr.h:710
#45 0x0804f488 in xre_main (argc=1, argv=0xbffff5d4, aAppData=0x8056014) at nsCOMPtr.h:710
#46 0x0804b219 in main (argc=1, argv=0xbffff5d4) at nsBrowserApp.cpp:58
#47 0x407f6efc in __libc_start_main () from /lib/libc.so.6
#48 0x0804b171 in _start ()

(gdb) list 196,210
196         while ((he = *hep) != 0) {
197             if (he->keyHash == keyHash && (*ht->keyCompare)(key, he->key)) {
198                 /* Move to front of chain if not already there */
199                 if (hep != hep0) {
200                     *hep = he->next;
201                     he->next = *hep0;
202                     *hep0 = he;
203                 }
204                 return hep0;
205             }
206             hep = &he->next;
207     #ifdef HASHMETER
208             ht->nsteps++;
209     #endif
210         }

(gdb) n
197             if (he->keyHash == keyHash && (*ht->keyCompare)(key, he->key)) {
(gdb) p *hep
$14 = (PLHashEntry *) 0x42059c78
(gdb) p **hep
$15 = {next = 0x42059c78, keyHash = 2080557950, key = 0x42059c60, value = 0x42059c60}
(gdb) n
206             hep = &he->next;

Reproducible: Sometimes
Steps to Reproduce:


13 years ago
Assignee: firefox → darin
Component: General → Networking: HTTP
Product: Firefox → Browser
QA Contact: firefox.general → core.networking.http
Version: unspecified → 1.7 Branch
Summary: Hangs in and endloos loop → Hangs in an endless loop


13 years ago
Severity: normal → critical
Keywords: hang
Darin, is there any chance gHttpAtomTable could be accessed and updated by more
than one thread?  I don't see locking, at a glance.

Also, PL_HashTableLookupConst would be indicated if code enumerated the
hashtable and the enumerator called PL_HashTableLookup (see bug 32184), but
doesn't seem to happen here.

This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Last Resolved: 13 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.