How to get a stacktrace for a bug report

  • Revision slug: How_to_get_a_stacktrace_for_a_bug_report
  • Revision title: How to get a stacktrace for a bug report
  • Revision id: 100551
  • Created:
  • Creator: DaveG
  • Is current revision? No
  • Comment 29 words added, 22 words removed

Revision Content

If you file a bug report in Bugzilla about a crash you should include a stacktrace (call stack) in your report. A stacktrace will tell Mozilla developers what crashed and provide a starting point for investigating its cause. This article describes how to use the Mozilla Crash Reporter (Breakpad) to get a crash ID and alternative ways to create a stacktrace.

Requirements

You need a binary build of Firefox 3 or newer from Mozilla.org. SeaMonkey 2, Thunderbird 3, and Sunbird 1 also support Breakpad, however some steps below will be somewhat different.

Mozilla's crash report server currently only has debug information for Mozilla builds and thus the crash reporter cannot work if you use a build from a Linux distribution or if you compile from source code. In these cases you will need to use one of the alternative methods listed below.

Note: Before generating a stacktrace you should try Firefox safe mode and attempt to troubleshoot your extensions and plugins to see if Firefox or an add-on is the cause.
Note: Older versions of the Adobe Flash plugin interfere with the crash reporter on Windows. Please use Flash 10 or newer.

How to get a crash ID with the Mozilla Crash Reporter

reporter.jpg

1. Crash and submit a report to the system.

The Mozilla Crash Reporter window should automatically come up after Mozilla crashes. If you have any additional information about the crash, such as additional detail on what you were doing at the time that may have triggered the crash, please enter it into the comments box. Be sure that you check the "Tell Mozilla about this crash" checkbox and click the restart button. The crash reporter should now submit the crash report and Firefox should open again.

The "Details" button gives additional data about the incident, however this is not useful in a bug report by itself.

 

 

crashlist.jpg

2. Tell us the ID of the report you submitted.

To access all of your submitted reports type "about:crashes" in the Firefox URL bar and press enter. Firefox should open a list of IDs for your submitted crash reports. Copy two or three of the IDs for the appropriate crashes and paste them into your Bugzilla report. Please check the listed times to avoid copying the ID of an unrelated crash report.

You can prefix a "bp-" to the beginning of an ID to make Bugzilla turn it into a link: bp-a70759c6-1295-4160-aa30-bc4772090918

 

 

 

How to get the crash ID if Firefox crashes on startup

If Firefox crashes on startup you can still access your submitted crash reports. Crash reports are accessible from all Firefox profiles, so if a new profile does not crash you can use it to access them through "about:crashes" as above.

Accessing crash report IDs outside of Firefox

If you cannot load Firefox at all you can find the crash report files at this location depending on your operating system:

Windows : %APPDATA%\Mozilla\Firefox\Crash Reports\submitted\
Mac OS : ~/Library/Application Support/Firefox/Crash Reports/submitted/
Linux : ~/.mozilla/firefox/Crash Reports/submitted/

Each file in this folder contains one submitted crash report ID. You can check the modified or creation time for each file to discern which crash reports are relevant to your bug report.

Alternative ways to get a stacktrace

If the Mozilla crash reporter doesn't come up or isn't available you will need to obtain a stacktrace manually:

Windows

See the article Create a stacktrace with Windbg for information on how to do this.

You can also use WinDbg if you get a hang or freeze instead of a crash. In that case use the command:

 !analyze -v -hang

Mac

Run /Applications/Utilities/Console.app.  Expand "~/Library/Logs" and "CrashReporter", then look for logs for "firefox-bin".

Linux

Note that for most distros the package you need to get symbols for will be something like "xulrunner", not "firefox".

Revision Source

<p>If you file a bug report in Bugzilla about a crash you should include a stacktrace (call stack) in your report. A stacktrace will tell Mozilla developers what crashed and provide a starting point for investigating its cause. This article describes how to use the Mozilla Crash Reporter (Breakpad) to get a crash ID and alternative ways to create a stacktrace.</p>
<h2>Requirements</h2>
<p>You need a binary build of Firefox 3 or newer from <a class="external" href="http://www.mozilla.com/en-US/firefox/">Mozilla.org</a>. SeaMonkey 2, Thunderbird 3, and Sunbird 1 also support Breakpad, however some steps below will be somewhat different.</p>
<p>Mozilla's crash report server currently only has debug information for Mozilla builds and thus the crash reporter cannot work if you use a build from a Linux distribution or if you compile from source code. In these cases you will need to use one of the <a href="#Alternative_ways_to_get_a_stacktrace">alternative methods</a> listed below.</p>
<div class="note"><strong>Note: </strong>Before generating a stacktrace you should try <a class="external" href="http://support.mozilla.com/en-US/kb/Safe+Mode" title="http://support.mozilla.com/en-US/kb/Safe+Mode">Firefox safe mode</a> and attempt to troubleshoot your <a class="external" href="http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes" title="http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes">extensions</a> and <a class="external" href="http://support.mozilla.com/en-US/kb/Troubleshooting+plugins" title="http://support.mozilla.com/en-US/kb/Troubleshooting+plugins">plugins</a> to see if Firefox or an add-on is the cause.</div>
<div class="note"><strong>Note: </strong>Older versions of the Adobe Flash plugin interfere with the crash reporter on Windows. Please use <a class="external" href="http://get.adobe.com/flashplayer/">Flash 10</a> or newer.</div>
<h2>How to get a crash ID with the Mozilla Crash Reporter</h2>
<p style="text-align: center;"><img align="left" alt="reporter.jpg" class="internal lwrap" src="../../../../@api/deki/files/2854/=reporter.jpg?size=webview" style="width: 300px; height: 307px;"></p>
<p><strong>1. Crash and submit a report to the system.</strong></p>
<p>The Mozilla Crash Reporter window should automatically come up after Mozilla crashes. If you have any additional information about the crash, such as additional detail on what you were doing at the time that may have triggered the crash, please enter it into the comments box. Be sure that you <strong>check the "Tell Mozilla about this crash"</strong> checkbox and click the restart button. The crash reporter should now submit the crash report and Firefox should open again.</p>
<div class="note">The "Details" button gives additional data about the incident, however this is not useful in a bug report by itself.</div>
<p> </p>
<p> </p>
<p style="text-align: center;"><img align="left" alt="crashlist.jpg" class="internal lwrap" src="../../../../@api/deki/files/2855/=crashlist.jpg?size=webview" style="width: 450px; height: 403px;"></p>
<p><strong>2. Tell us the ID of the report you submitted.</strong></p>
<p>To access all of your submitted reports<strong> type "about:crashes"</strong> in the Firefox URL bar and press enter. Firefox should open a list of IDs for your submitted crash reports. Copy two or three of the IDs for the appropriate crashes and paste them into your Bugzilla report. Please check the listed times to avoid copying the ID of an unrelated crash report.</p>
<div class="note">You can prefix a "bp-" to the beginning of an ID to make Bugzilla turn it into a link: <a class="external" href="http://crash-stats.mozilla.com/report/index/a70759c6-1295-4160-aa30-bc4772090918" title="http://crash-stats.mozilla.com/report/index/a70759c6-1295-4160-aa30-bc4772090918">bp-a70759c6-1295-4160-aa30-bc4772090918</a></div>
<p> </p>
<p> </p>
<p> </p>
<h3>How to get the crash ID if Firefox crashes on startup</h3>
<p>If Firefox crashes on startup you can still access your submitted crash reports. Crash reports are accessible from all Firefox profiles, so if a <a class="external" href="http://support.mozilla.com/en-US/kb/Managing+Profiles" title="http://support.mozilla.com/en-US/kb/Managing+Profiles">new profile</a> does not crash you can use it to access them through "about:crashes" as above.</p>
<h4>Accessing crash report IDs outside of Firefox</h4>
<p>If you cannot load Firefox at all you can find the crash report files at this location depending on your operating system:</p>
<p>Windows : <span class="filename">%APPDATA%\Mozilla\Firefox\Crash Reports\submitted\</span><br>
Mac OS : <span class="filename">~/Library/Application Support/Firefox/Crash Reports/submitted/</span><br>
Linux : <span class="filename">~/.mozilla/firefox/Crash Reports/submitted/</span></p>
<p>Each file in this folder contains one submitted crash report ID. You can check the modified or creation time for each file to discern which crash reports are relevant to your bug report.</p>
<h2>Alternative ways to get a stacktrace</h2>
<p>If the Mozilla crash reporter doesn't come up or isn't available you will need to obtain a stacktrace manually:</p>
<h4>Windows</h4>
<p>See the article <a class="internal" href="/en/How_to_get_a_stacktrace_with_WinDbg" title="En/How to get a stacktrace with WinDbg">Create a stacktrace with Windbg</a> for information on how to do this.</p>
<p>You can also use WinDbg if you get a hang or freeze instead of a crash. In that case use the command:</p>
<pre> !analyze -v -hang</pre>
<h4>Mac</h4>
<p>Run /Applications/Utilities/Console.app.  Expand "~/Library/Logs" and "CrashReporter", then look for logs for "firefox-bin".</p>
<h4>Linux</h4>
<p>Note that for most distros the package you need to get symbols for will be something like "xulrunner", not "firefox".</p>
<ul> <li>Ubuntu:  <a class="link-https" href="https://wiki.ubuntu.com/MozillaTeam/Bugs#Obtain%20a%20backtrace%20from%20an%20apport%20crash%20report%20(using%20gdb)" title="https://wiki.ubuntu.com/MozillaTeam/Bugs#Obtain a backtrace from an apport crash report (using gdb)">Instructions from the Ubuntu Team</a></li> <li>openSUSE:  <a class="external" href="http://en.opensuse.org/Bugs:An_application_crashed" title="http://en.opensuse.org/Bugs:An_application_crashed">General instructions from openSUSE</a>  <a class="external" href="http://en.opensuse.org/Bugs:mozilla" title="http://en.opensuse.org/Bugs:mozilla">Mozilla specific instructions</a></li> <li>Fedora: <a class="external" href="http://fedoraproject.org/wiki/StackTraces" title="http://fedoraproject.org/wiki/StackTraces">Capturing Stack Traces</a></li> <li>Gentoo: <a class="external" href="http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap2" title="http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap2">Debugging using GDB</a></li>
</ul>
Revert to this revision