Note: This article is intended for developers and technically-knowledgeable users. If that's not you, or you just want to fix a Firefox hang without reporting it, see Firefox hangs or is not responding - How to fix.

Is your Firefox not responding? Or are you regularly seeing the "Firefox is running but is not responding..." dialog? This usually means that something in Firefox is hung. This may be because of a code error within Firefox itself, such as a deadlock or infinite loop, or it may be caused by 3rd-party software such as a Firefox extension, antivirus software, or even malware or a virus on your computer.

What information to include in a bug report

Submit a crash report for a hung Firefox

The easiest way to help the Firefox stability team to debug these kinds of hangs is to make the hung Firefox crash and submit a crash report. Then file a bug report with the crash report ID. The steps to induce a crash are slightly different on each platform:

Windows

On Windows, the stability team has written a utility which will inject a crash into Firefox which will trigger the crash reporter: Download crashfirefox.exe here (source code). Running this tool will search for firefox.exe and inject crashing code into it. The tool also has command-line options to kill processes with other names or by process ID.

Linux and Mac

On Linux and Mac (Firefox >=27), sending SIGABRT to a process will trigger the crash reporter. You can use any process monitoring tool to find the Firefox process ID (PID).

Finding the Firefox PID using a system monitoring tool (Linux screenshot).

Then, in a terminal, kill Firefox using a command such as this:

# Replace 31042 with the PID of Firefox found above
kill -n SIGABRT 31042

# on osx
kill -s SIGABRT 31042

All OS

As long as you do not need to be in Firerfox's safe mode, a user friendly method of crashing Firefox is to install and use the addon Crash Me Now! (Simple)

Another way to trigger a crash in a hung tab is to run the following script in the Browser Console (opened after selecting the hung tab):

let wm = Cc["@mozilla.org/appshell/window-mediator;1"].
         getService(Ci.nsIWindowMediator);
let win = wm.getMostRecentWindow("navigator:browser");
let browser = win.gBrowser.selectedBrowser;
if (browser.isRemoteBrowser) {
  browser.messageManager.loadFrameScript('data:,let appInfo = Components.classes["@mozilla.org/xre/app-info;1"];if (appInfo && appInfo.getService(Components.interfaces.nsIXULRuntime).processType != Components.interfaces.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {Components.utils.import("resource://gre/modules/ctypes.jsm");var zero = new ctypes.intptr_t(8);var badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));var crash = badptr.contents;}', true);
}

Other Techniques

On OS X if you use a Nightly build (>= Firefox 16), you can use Activity Monitor's "Sample Process" feature to generate a sample. This won't produce useful results on a regular release/beta build.

Instead of crashing Firefox, more advanced developers who know how to use a debugger can try attaching to the Firefox process and debugging in place. This is only useful if you have Firefox debug symbols, which are available on Windows from the Mozilla symbol server.