User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b4pre) Gecko/2008020604 Minefield/3.0b4pre Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b4pre) Gecko/2008020604 Minefield/3.0b4pre This page causes Firefox to hang completely if Firebug is set to break on errors. FF3 on Windows does not exhibit this problem. The offending page is just 2 lines: <body onload="n"> <img src=""> Reproducible: Always Steps to Reproduce: 1. In Firebug, set Script / Options / Break on All Errors 2. Load this page http://mqlx.com/~willmoffat/learn_feature/firebug/firebug_hangs.html Actual Results: Firefox hangs. UI completely unresponsive. Force-quit necessary to restart FF. CPU usage is very low. Setup: * Mac OS 10.5.1 * FF3 (beta 3 or latest nightly) * Completely clean FF profile, except for: * Latest release of firebug: http://fireclipse.xucia.com/files/fireclipse/firebug-1.1.0b10.xpi I first reported this on the Firebug mailing list http://groups.google.com/group/firebug/browse_thread/thread/a13c8a123b449037
Created attachment 301742 [details] Sample of FF while page loads and then hangs. I've no idea if this sample (created using Shark) is useful since the documentation here http://developer.mozilla.org/en/docs/Debugging_a_hang_on_OS_X seems to be out of date. Sampler.app is now DTrace-based and doesn't have a menuitem Tools > Generate Report.
Does OS X have "pstack"? I forgot, but if so that would be more useful than the shark. If you're not building your own Firefox, though, then you won't have symbols, and since you said that sending SIGSEGV to the process doesn't get you breakpad (just Apple's crash reporter), I'm not sure what else to suggest. :/ Ted: any idea how to get breakpad to trigger, rather than the Apple crash reporter?
Created attachment 301773 [details] GDB Stacktrace of debug build I finally bit the bullet and compiled my own debug build. I'm impressed how easy it was. Here's a stacktrace with symbols. If I can provide any other helpful info then please let me know.
stupid question: if you have more than one window, can you use the other windows? (this bug is probably more core than the debugger, but for now i want the attention)
anyway, since you have a debug build and a debugger, #13 0x0914e6a6 in XPCWrappedNative::CallMethod (ccx=@0xbfff93ec, mode=XPCWrappedNative::CALL_METHOD) at /Users/will/mozilla/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp:2339 frame 13 call DumpJSStack() the onnest callback http://mxr.mozilla.org/seamonkey/source/js/jsd/jsd_xpc.cpp#2994 http://www.google.com/codesearch?hl=en&q=+package:http://fbug%5C.googlecode%5C.com+startDebugging+show:GtJ7LeLysic:enniAyMdo3M:tGRjPVp5Z00&sa=N&cd=1&ct=rc&cs_p=http://fbug.googlecode.com/svn&cs_f=trunk/content/firebug/debugger.js#l362 http://www.google.com/codesearch?hl=en&q=+package:http://fbug%5C.googlecode%5C.com+onLock+show:GtJ7LeLysic:enniAyMdo3M:tGRjPVp5Z00&sa=N&cd=1&ct=rc&cs_p=http://fbug.googlecode.com/svn&cs_f=trunk/content/firebug/debugger.js#l492 It seems a bit strange, if only because it doesn't seem to have any way to say Unnest() I think you're going to want to arrange for remote debugging (basically get a second computer, ssh into the first, use the debugger via ssh), and walk through nsAppShell::ProcessNextNativeEvent The question is mostly, what's happening to events. I'm assuming your CPU isn't being pegged (solid green/red in activity monitor), certainly there's nothing to indicate that.
> if you have more than one window, can you use the other windows? No, everything has hung. > CPU isn't being pegged Correct. CPU usage is tiny. > I think you're going to want to arrange for remote debugging I don't have the time to get up to speed on debugging FF myself. However I'd be happy to allow somebody else to SSH in and take a look around. Has anybody else been able to reproduce this bug on a Mac? I also tested with the latest version of Firebug from svn (1.2.0a6). This also has the same problem.
This 2nd testcase uses the "debugger" command rather than an error to invoke Firebug: http://mqlx.com/~willmoffat/learn_feature/firebug/firebug_hangs2.html This is even nastier than the first testcase, by dropping the need to have Firebug set to "Break on All Errors" all you need to experience this bug is: * a Mac * FF3 * Firebug enabled
visit irc.mozilla.org ask someone for help finding me.
Created attachment 304367 [details] GDB session of timeless timeless: you could say that it's functionally equivalent to call DumpJSStack() :_)
Will, can you capture the the OS console with Firebug-1.2->FBTrace->Options set to FBS_BP and FBS_STEP? We might be able to guess what section of code is running.
(In reply to comment #10) Hi John, here's the output you requested: fbs.onBreak type=debugger_keyword stopStepping firebug.createSourceBox done appendScriptLines...debugger.setLineBreakpoints building lineTable for sourceFile.href:http://mqlx.com/~willmoffat/learn_feature/firebug/firebug_hangs2.html/event/7b5pFSE2rtNaEzSBEw0OyQ== firebug.createSourceBox done sourceBoxDecorator P.S. If anybody wants SSH access to my machine for debugging then just ask.
Ok thanks. Although firebug is on the call stack and jsd is has paused the interpreter, this does not look like a Firebug or JSD problem. Firebug has just built the UI to so the event handler and the stack in comment 9 suggests that FF is now processing events. If you want to see the body of the event handler, set FBTrace FBS_CREATION true; depending on the version of firebug the body will be printed to the console or to fbug/firebug-service.txt in your TEMP dir.
Created attachment 305550 [details] Console log with FBTrace FBS_CREATION true At John's suggestion, here is the console log with FBTrace FBS_CREATION set true.
Well that certainly revealed some problems, too bad they don't relate to this bug ;-). (I need to get on to FF3). Will, FBS_CREATION has to be reset after Firebug comes up (to avoid tracing all of Firefox during start up). I don't see any scripts so I guess it is not set.
Testcase in comment #7 hangs for me on OS X (FF3 nightly, FB 1.2 tip).
The test case in comment 7 is supposed to breakpoint in the event handler. Maybe this 'hang' is really the debugger breakpointing but the UI not responding.
Rob can you try on your Mac?
I'm pretty sure this was a Firebug bug that has been fixed. I tested the original case. It works in Firebug 1.4, but has a small problem I reported to Firebug: http://code.google.com/p/fbug/issues/detail?id=1276