Thunderbird:Testing:Get A Debug Thunderbird Hang Stack: Difference between revisions

m
added ref to backtraces page
('cont', if TB stops)
m (added ref to backtraces page)
 
Line 1: Line 1:
<small>[[Thunderbird:Testing|<< Back to Thunderbird Testing]]</small>
<small>[[Thunderbird:Testing|<< Back to Thunderbird Testing]]</small>


=== How to get a debug Thunderbird hang stack using gdb ===
=== How to get a debug Thunderbird hang stack using gdb ===


(from [https://bugzilla.mozilla.org/show_bug.cgi?id=494849#c3 bug 494849 comment 3], tested in Leopard 10.5)
(from [https://bugzilla.mozilla.org/show_bug.cgi?id=494849#c3 bug 494849 comment 3], tested in Leopard 10.5)  


'''Only use this with debug Thunderbird, which produces valid debug symbols.'''
'''Only use this with debug Thunderbird, which produces valid debug symbols.'''  


If you are running debug Thunderbird, either clicking Sample Process in activity
If you are running debug Thunderbird, either clicking Sample Process in activity manager will get a sample, or follow the following instructions&nbsp;:  
manager will get a sample, or follow the following instructions :


0) Change to the debug Thunderbird directory:
0) Change to the debug Thunderbird directory:  


   cd /path/to/Thunderbird
   cd /path/to/Thunderbird


1) Run Shredder:
1) Run Shredder:  


   ./thunderbird-bin
   ./thunderbird-bin


And repeat steps to reproduce to get the hang.
And repeat steps to reproduce to get the hang.  


2) At a Terminal prompt, find its process id:
2) At a Terminal prompt, find its process id:  


   ps ax | grep thunderbird-bin
   ps ax | grep thunderbird-bin


(The pid will be listed in the first column to the left. Let's assume it's '123'.)
(The pid will be listed in the first column to the left. Let's assume it's '123'.)  


3) Attach to the Shredder process:
3) Attach to the Shredder process:  


   gdb thunderbird-bin 123
   gdb thunderbird-bin 123


4) If TB stops, then continue it:
4) If TB stops, then continue it:  


   cont
   cont


5) Next, get a backtrace of all running TB threads:
5) Next, get a backtrace of all running TB threads:  


   thread apply all bt
   thread apply all bt


6) Finally, save the output to a text file and attach it to your bug report.
6) Finally, save the output to a text file and attach it to your bug report.  


[https://bug494849.bugzilla.mozilla.org/attachment.cgi?id=379647 A sample all-thread backtrace]
[https://bug494849.bugzilla.mozilla.org/attachment.cgi?id=379647 A sample all-thread backtrace]  


Credit Steven Michaud from [https://bugzilla.mozilla.org/show_bug.cgi?id=470001#c23 bug 470001 comment 23] for the original instructions.
Credit Steven Michaud from [https://bugzilla.mozilla.org/show_bug.cgi?id=470001#c23 bug 470001 comment 23] for the original instructions.  
 
<br>
 
=== See Also:<br>  ===
 
[https://wiki.mozilla.org/Thunderbird:Backtraces_On_OS_X Backtraces on OS X]<br>
[https://developer.mozilla.org/en/Using_the_Mozilla_symbol_server Using the Mozilla symbol server]
12

edits