From Fedora Project Wiki

No edit summary
No edit summary
(15 intermediate revisions by the same user not shown)
Line 7: Line 7:
Debug info packages which contains source files are required to create meaningful bug report. To install them you need to execute following command as root:
Debug info packages which contains source files are required to create meaningful bug report. To install them you need to execute following command as root:
<pre>
<pre>
debuginfo install firefox
debuginfo-install firefox
</pre>
</pre>
for Firefox,
for Firefox,
<pre>
<pre>
debuginfo install thunderbird
debuginfo-install thunderbird
</pre>
</pre>
for Thunderbird.
for Thunderbird.
==== Running application in debugger ====
==== Running application in debugger ====
To run application in gnu debugger you need to run command:
To run application in gnu debugger you need to run command:
Line 31: Line 32:
run
run
</pre>
</pre>
Then bring application to crash. This should be indicated by (gdb) prompt. Type
 
==== Obtain crash stack trace ====
Then bring application to crash. This should be indicated by (gdb) prompt. Type:
<pre>
<pre>
set logging on crash_bt
set logging on crash_bt
thread apply all bt full
thread apply all bt full
print DumpJSStack()
set logging off
set logging off
</pre>
</pre>
to store stack trace into ''crash_bt''. Don't forget to attach this file to bug report.
to store stack and Javascript trace into ''crash_bt''. Don't forget to attach this file to bug report.


Basically there are two types of problems which can occur in Mozilla products: Application doesn't work as expected,
=== Application freeze ===
application crashes , Freeze and application .
If you are able to reproduce freeze you can follow [[#Application crash]] steps. There is only one difference in [[#Obtain crash stack trace]] section where ''(gdb)'' prompt is missing. To get prompt you have to press Ctrl-C.
=== Crash ===
We need to determine whenever crash has been infliced by third party plugin or addon, or by application itself.


=== Freeze ===
==== Attach debugger to running application====
Before you can attach to running application you need to have [[#Installing debug info packages|debug symbols installed]].


Application stops responding to user action for a long time. In this case we need to attach debugger to running process and get stack trace
When the freeze occurs randomly and/or difficult to predict you can attach to running application when it freezes by:
 
<pre>
=== Doesn't work as expected ===
gdb firefox `ps ax|grep firefox/firefox|grep -v grep|cut -d\  -f2`
</pre>
for Firefox.
<pre>
gdb thunderbird `ps ax|grep thunderbird|grep -v grep|cut -d\  -f2`
</pre>
for Thunderbird.


Then you can continue by [[#Obtain crash stack trace]]


== Figuring out whose fault is it ==
=== Figuring out what is responsible for crash ===
Some crashes and problems come from installed addons or 3rd party plugins. To determine if that's the case run Mozilla products with <code>-safe-mode</code> parameter:
Some crashes and problems come from installed addons or 3rd party plugins. To determine if that's the case run application with ''-safe-mode'' parameter:
<pre>
<pre>
firefox -safe-mode
firefox -safe-mode
Line 64: Line 74:
{{admon/note|Note|This setting disables all your add-ons and plugins until you manually re-enable them.}}
{{admon/note|Note|This setting disables all your add-ons and plugins until you manually re-enable them.}}


If problem still persist it isn't most likely related to addons or plugins and you can proceed to [[#Bugs in gecko|Bugs in gecko]].
If problem still persist it isn't most likely related to addons or plugins and you can just simply follow instructions in [[#Application crash]]. Otherwise continue to next section.
Otherwise go to [[#Reporting addons and plugins issues|Reporting addons and plugins issues]].
. In that case proceed to Plugins and Addons problems section.


== Reporting addons and plugins issues ==  
=== Reporting addons and plugins issues ===
{{admon/important|Reenable plugins and addons|At first don't forget to '''reenable all plugins and addons''' in ''Tools/Add-ons/Extensions'' and ''Plugins'' menu and '''restart application.'''}}
{{admon/important|Reenable plugins and addons|At first don't forget to '''reenable all plugins and addons''' in ''Tools/Add-ons/Extensions'' and ''Plugins'' menu and '''restart application.'''}}


Then set your location to [[about:plugins|about:plugins]] page, save it (by ''File/Save Page As...'') to file and attach it to bug report. This page contains information about all installed plugins and it may help us in resolving your issue. Attach also output of following commands:
For '''Firefox''' set your location to [[about:plugins|about:plugins]] page. This page contains information about all installed plugins and it may help us in resolving your issue. Save it by ''File/Save Page As...'' to file and attach saved file to bug report.  
 
For '''Thunderbird''' make screenshot of ''Tools/Addons/Extensions'' and ''Tools/Addons/Plugins,'' dialogs and attach images to bugzilla.
 
Attach also output of following commands:
<pre>
<pre>
rpm -q firefox xulrunner flash-plugin gnash google-talkplugin nspluginwrapper
rpm -q firefox xulrunner thunderbird flash-plugin gnash google-talkplugin nspluginwrapper thunderbird-lightning thunderbird-enigmail flash-plugin
ls /usr/lib64/mozilla/plugins/
ls -l /usr/lib64/mozilla/plugins/
ls /usr/lib/mozilla/plugins/
ls -l /usr/lib/mozilla/plugins/
ls -l /usr/share/mozilla/extensions
</pre>
</pre>


You may also run Firefox or Thunderbird by ''strace''. This help us to track which dynamic libraries are loaded during startup. Strace usage:
You may also run Firefox or Thunderbird by ''strace''. This help us to track which dynamic libraries are loaded during startup. Strace usage:
<pre>
<pre>
strace firefox &>strace_output
strace firefox &> strace_output
</pre>
</pre>
or in case of Thunderbird:
or in case of Thunderbird:
Line 86: Line 99:
strace thunderbird &> strace_output
strace thunderbird &> strace_output
</pre>
</pre>
and don't forget to attach created ''strace_output'' file to bug report. If application crash or freeze stack trace is also very useful, for instruction [[#How to get stacktrace|how to obtain stacktrace go here]].
and don't forget to attach created ''strace_output'' file to bug report. If application crash or freeze stack trace is also very useful, for instructions see [[#Application crash]] section.
 
=== Bug report attachment in a nutshell ===
To make long story short, execute following commands and attach ''~/bug-report'' file to bugzilla:
<pre>
rpm -q firefox xulrunner thunderbird flash-plugin gnash google-talkplugin nspluginwrapper thunderbird-lightning thunderbird-enigmail flash-plugin > ~/bug-report
ls -l /usr/lib64/mozilla/plugins/  >> ~/bug-report
ls -l /usr/lib/mozilla/plugins/    >> ~/bug-report
ls -l /usr/share/mozilla/extensions >> ~/bug-report
</pre>
 
For '''Firefox''' go to [[about:support]] and [[about:plugins]] pages, save them and attach to bug report.
 
For '''Thunderbird''' make screenshot of ''Tools/Addons/Extensions'' and ''Tools/Addons/Plugins,'' dialogs and attach images to bugzilla.
 
Continue in [[#Application crash]] if required.
 
=== Advanced debugging ===
''TODO''


== Bugs in core ==
Thanks for your time you spare to reporting bugs!
== How to get stacktrace ==

Revision as of 12:22, 18 April 2012

This article helps affected users in reporting of Firefox and Thunderbird bugs and ease package maintainers fixing them.

Application crash

Application crash can occur during runtime. Application window simply disappear and bug report dialog will show up. By accepting this dialog crash will be reported to Mozilla crashstat servers. You can see list of submitted crashes on about:crashes page. If you want to report this crash to Fedora bugzilla you need to do few additional steps described in following subsections.

Installing debug info packages

Debug info packages which contains source files are required to create meaningful bug report. To install them you need to execute following command as root:

debuginfo-install firefox

for Firefox,

debuginfo-install thunderbird

for Thunderbird.

Running application in debugger

To run application in gnu debugger you need to run command:

firefox -g -d gdb

for Firefox,

thunderbird -g -d gdb

After debugger is started which is indicated by line:

(gdb)

To run program use command:

run

Obtain crash stack trace

Then bring application to crash. This should be indicated by (gdb) prompt. Type:

set logging on crash_bt
thread apply all bt full
print DumpJSStack()
set logging off

to store stack and Javascript trace into crash_bt. Don't forget to attach this file to bug report.

Application freeze

If you are able to reproduce freeze you can follow #Application crash steps. There is only one difference in #Obtain crash stack trace section where (gdb) prompt is missing. To get prompt you have to press Ctrl-C.

Attach debugger to running application

Before you can attach to running application you need to have debug symbols installed.

When the freeze occurs randomly and/or difficult to predict you can attach to running application when it freezes by:

gdb firefox `ps ax|grep firefox/firefox|grep -v grep|cut -d\  -f2`

for Firefox.

gdb thunderbird `ps ax|grep thunderbird|grep -v grep|cut -d\  -f2`

for Thunderbird.

Then you can continue by #Obtain crash stack trace

Figuring out what is responsible for crash

Some crashes and problems come from installed addons or 3rd party plugins. To determine if that's the case run application with -safe-mode parameter:

firefox -safe-mode

or

thunderbird -safe-mode

Then Disable all add-ons needs to be checked and Make Changes and Restart pressed.

Note.png
Note
This setting disables all your add-ons and plugins until you manually re-enable them.

If problem still persist it isn't most likely related to addons or plugins and you can just simply follow instructions in #Application crash. Otherwise continue to next section.

Reporting addons and plugins issues

Important.png
Reenable plugins and addons
At first don't forget to reenable all plugins and addons in Tools/Add-ons/Extensions and Plugins menu and restart application.

For Firefox set your location to about:plugins page. This page contains information about all installed plugins and it may help us in resolving your issue. Save it by File/Save Page As... to file and attach saved file to bug report.

For Thunderbird make screenshot of Tools/Addons/Extensions and Tools/Addons/Plugins, dialogs and attach images to bugzilla.

Attach also output of following commands:

rpm -q firefox xulrunner thunderbird flash-plugin gnash google-talkplugin nspluginwrapper thunderbird-lightning thunderbird-enigmail flash-plugin
ls -l /usr/lib64/mozilla/plugins/
ls -l /usr/lib/mozilla/plugins/
ls -l /usr/share/mozilla/extensions

You may also run Firefox or Thunderbird by strace. This help us to track which dynamic libraries are loaded during startup. Strace usage:

strace firefox &> strace_output

or in case of Thunderbird:

strace thunderbird &> strace_output

and don't forget to attach created strace_output file to bug report. If application crash or freeze stack trace is also very useful, for instructions see #Application crash section.

Bug report attachment in a nutshell

To make long story short, execute following commands and attach ~/bug-report file to bugzilla:

rpm -q firefox xulrunner thunderbird flash-plugin gnash google-talkplugin nspluginwrapper thunderbird-lightning thunderbird-enigmail flash-plugin > ~/bug-report
ls -l /usr/lib64/mozilla/plugins/   >> ~/bug-report
ls -l /usr/lib/mozilla/plugins/     >> ~/bug-report
ls -l /usr/share/mozilla/extensions >> ~/bug-report

For Firefox go to about:support and about:plugins pages, save them and attach to bug report.

For Thunderbird make screenshot of Tools/Addons/Extensions and Tools/Addons/Plugins, dialogs and attach images to bugzilla.

Continue in #Application crash if required.

Advanced debugging

TODO

Thanks for your time you spare to reporting bugs!