stacktrace_report.rst (5848B)
1 How to get a stacktrace for a bug report 2 ======================================== 3 4 If you file a bug report in Bugzilla about a crash you should include a 5 stacktrace (call stack) in your report. A stacktrace will tell Mozilla 6 developers what crashed and provide a starting point for investigating 7 its cause. This article describes how to use the Mozilla Crash Reporter 8 (Breakpad) to get a crash ID, which our engineers can use to get a 9 stacktrace, and alternative ways to get a stacktrace if you can't get a 10 crash ID. 11 12 Requirements 13 ------------ 14 15 You need a binary build of Firefox from 16 `Mozilla.org <https://www.mozilla.org/firefox/>`__. SeaMonkey and 17 Thunderbird also support crash reporting. 18 19 Mozilla's crash report server currently only has debug information for 20 Mozilla builds and thus the crash reporter cannot work if you use a 21 build from a Linux distribution or if you compile from source code. In 22 these cases you will need to use one of the :ref:`alternative 23 methods <Alternative ways to get a stacktrace>` listed below. 24 25 .. note:: 26 27 **Note:** When filing a crash report, it is important to know whether 28 the crash occurs with `Firefox safe 29 mode <http://support.mozilla.com/kb/Safe+Mode>`__. This helps 30 engineers determine whether a particular 31 `extension <http://support.mozilla.com/kb/Troubleshooting+extensions+and+themes>`__ 32 or 33 `plugin <http://support.mozilla.com/kb/Troubleshooting+plugins>`__ 34 is the cause of the crash. 35 36 37 How to get a crash ID with the Mozilla Crash Reporter 38 ----------------------------------------------------- 39 40 1 - Crash and submit a report to the system. 41 42 .. image:: img/crashreporter.png 43 44 The Mozilla Crash Reporter window should automatically come up after Firefox crashes. 45 If you have any additional information about the crash, such as additional detail on 46 what you were doing at the time that may have triggered the crash, please enter it 47 into the comments box. Be sure that you **check the "Tell Mozilla about this crash"** 48 checkbox and click the restart button. The crash reporter should now submit the 49 crash report and Firefox should open again. 50 51 .. note:: 52 53 The "Details" button gives additional data about the incident, 54 however this is not useful in a bug report. 55 56 57 2 - Tell us the ID of the report you submitted. 58 59 .. image:: img/crashlist.jpg 60 61 To access all of your submitted reports type "about:crashes" into the Firefox address bar 62 and press enter. Firefox should open a list of IDs for your submitted crash reports. 63 Copy two or three of the IDs for the appropriate crashes and paste them into your 64 Bugzilla report. Please check the listed times to avoid copying the ID of an unrelated 65 crash report. 66 67 .. note:: 68 69 You can prefix a "bp-" to the beginning of an ID to make Bugzilla turn it 70 into a link: bp-a70759c6-1295-4160-aa30-bc4772090918 71 72 73 How to get the crash ID if Firefox crashes on startup 74 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 75 76 If Firefox crashes on startup you can still access your submitted crash 77 reports. Crash reports are accessible from all Firefox profiles, so if a 78 `new 79 profile <https://support.mozilla.org/kb/profile-manager-create-remove-switch-firefox-profiles>`__ 80 does not crash you can use it to access them through "about:crashes" as above. 81 82 83 Accessing crash report IDs outside of Firefox 84 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 85 86 If you cannot load Firefox at all you can find the crash report files at 87 this location depending on your operating system: 88 89 * Windows : ``%APPDATA%\Mozilla\Firefox\Crash Reports\submitted\`` 90 * macOS : ``~/Library/Application Support/Firefox/Crash Reports/submitted/`` 91 * Linux : ``~/.mozilla/firefox/Crash Reports/submitted/`` or ``$XDG_CONFIG_HOME/mozilla/firefox/Crash Reports/submitted/`` 92 93 Each file in this folder contains one submitted crash report ID. You can 94 check the modified or creation time for each file to discern which crash 95 reports are relevant to your bug report. 96 97 .. _Alternative ways to get a stacktrace: 98 99 Alternative ways to get a stacktrace 100 ------------------------------------ 101 102 If the Mozilla crash reporter doesn't come up or isn't available you 103 will need to obtain a stacktrace manually: 104 105 106 Windows 107 ~~~~~~~ 108 109 See the article :ref:`Create a stacktrace with Windbg <How to get a stacktrace with WinDbg>` for information 110 on how to do this. 111 112 For a full process dump, see :ref:`How to get a process dump with Windows 113 Task Manager`. 114 115 116 macOS 117 ~~~~~ 118 119 Run /Applications/Utilities/Console.app. Expand "~/Library/Logs" and 120 "CrashReporter", then look for logs for "firefox". 121 122 123 Linux 124 ~~~~~ 125 126 Note that for most distros, the package you need to get symbols for will 127 be something like "xulrunner", not "firefox". 128 129 130 Crash reports files on your computer 131 ------------------------------------ 132 133 When Breakpad initially catches a crash it first writes crash report 134 files (e.g. .dump and .extra files) into the 'pending' subdirectory of 135 its 'Crash Reports' directory. 136 137 If Breakpad successfully sends the crash report to the reporting server 138 then, by default, the files added to the 'pending' subdirectory for the 139 crash are removed, and a .txt file is placed in the 'submitted' 140 directory containing the crash ID created by the reporting server. 141 142 If you want Breakpad to leave the .dump and .extra files on your 143 computer so that you can examine them locally, then set the 144 MOZ_CRASHREPORTER_NO_DELETE_DUMP environment variable to 1. 145 146 - Ubuntu: `Instructions from the Ubuntu 147 Team <https://wiki.ubuntu.com/MozillaTeam/Bugs#Obtain%20a%20backtrace%20from%20an%20apport%20crash%20report%20(using%20gdb)>`__ 148 - openSUSE: `General instructions from 149 openSUSE <https://en.opensuse.org/openSUSE:Bugreport_application_crashed>`__ 150 - Fedora: `Capturing Stack 151 Traces <https://fedoraproject.org/wiki/StackTraces>`__ 152 - Gentoo: `Debugging using 153 GDB <https://wiki.gentoo.org/wiki/Debugging_with_GDB>`__