Difference between revisions of "Backtraces"

From AMule Project FAQ
Jump to: navigation, search
Line 2: Line 2:
  
 
Usually, it should not be necessary for the normal user to do this. However, we might have a bad day and release a somewhat buggy version or you are running CVS which can also be unstable sometimes.
 
Usually, it should not be necessary for the normal user to do this. However, we might have a bad day and release a somewhat buggy version or you are running CVS which can also be unstable sometimes.
This is where the backraces come in: if aMule crashes, and you get an "OOPS - aMule crashed" and so on, we like to know. The backtrace aMule provides is not always very usefull as it contains little information, but, as usual, there's a better way: a *real* backtrace.
+
This is where the bactraces come in: if aMule crashes, and you get an "OOPS - aMule crashed" and so on, we'd like to know. The backtrace aMule provides is not always very usefull as it contains little information, but, as usual, there's a better way: A *real* backtrace.
First of all, you need the GNU Debugger installed. It's called gdb and you could check for that by typing
+
gdb --version
+
  
you should see something like that:
 
  
$ gdb --version
+
First of all, you need the GNU Debugger installed. It's called gdb and you could check for that by typing 'which gdb' in a console window. You should see something like this:
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
+
 
Copyright 2003 Free Software Foundation, Inc.
+
$ which gdb
GDB is free software, covered by the GNU General Public License, and you are
+
/usr/bin/gdb
welcome to change it and/or distribute copies of it under certain conditions.
+
 
Type "show copying" to see the conditions.
+
If you dont have gdb installed, you will get a message like this:
There is absolutely no warranty for GDB.  Type "show warranty" for details.
+
$ which gdb
This GDB was configured as "i386-redhat-linux-gnu".
+
which: no gdb in (/bin:/usr/bin:[sic])
 +
 
 +
If that is the case, the GNU Debugger is most likely not installed on your system and you should install it before you proceed.
  
If you get the "file not found" or "command not found" error, it's most likely that you don't have the GNU Debugger installed. Install it!
 
  
 
Then, compile aMule with debugging information:
 
Then, compile aMule with debugging information:
  ./configure --enable-debug --disable-optimise --prefix=/where/to/install/aMule
+
  $ ./configure --enable-debug --disable-optimise --prefix=/where/to/install/aMule
  make
+
  $ make
  make install
+
  $ make install
 +
 
 +
 
 +
If you do not want to overwrite you old copy of aMule, simply do this instead:
 +
$ ./configure --enable-debug --disable-optimise
 +
$ make
 +
 
 +
aMule can then be run by cd'ing to the dir 'src' and typing ./amule
  
(or leave that step out if you have crashes with a *.rpm version, but that backtraces are not as usefull as these with --enable-debug.)
 
  
 +
If you are unable or unwilling to recompile, or are running a *.rpm version, proceed anyway, but be aware that backtraces from debugging enabled builds are much more useful to us.
  
Run "gdb /where/to/install/aMule/bin/amule".
 
Enter "ha SIGPIPE nostop noprint pass" after (gdb) prompt (to avoid gdb stopping at broken pipes).
 
Enter "run".
 
Use aMule normally until it segfaults.
 
Enter "bt".
 
Enter "bt full".
 
Post the output of the last two steps in the backtraces forum http://www.amule.org/amule/board.php?boardid=33&sid= with some additional comment about the circumstances the segfault happened and what aMule version you used (checkout time for CVS).
 
  
 +
To create a backtrace, do the following:
 +
<ol>
 +
<li>Run "gdb /where/to/install/aMule/bin/amule".
 +
<li>Enter "ha SIGPIPE nostop noprint pass" after (gdb) prompt (to avoid gdb stopping at broken pipes).
 +
<li>Enter "ha SIG32 nostop noprint pass" (to avoid gdb stopping at new thread).
 +
<li>Enter "run".
 +
<li>Use aMule normally until it crashes.
 +
<li>Enter "bt".
 +
<li>Enter "bt full".
 +
<li>Post the output of the last two steps in the [http://www.amule.org/amule/board.php?boardid=33&sid= backtraces forum] with some additional comment about the circumstances the segfault happened and what aMule version you used (or checkout time for CVS).
 +
</ol>
  
If you get SIG32 events, you should add a handle before the "run" command:
 
Enter "ha SIG32 nostop noprint pass" (to avoid gdb stopping at new thread).
 
  
 
So, that's it, have fun with aMule
 
So, that's it, have fun with aMule

Revision as of 15:07, 30 April 2004

Well, not hard to guess, this is about backtraces.

Usually, it should not be necessary for the normal user to do this. However, we might have a bad day and release a somewhat buggy version or you are running CVS which can also be unstable sometimes. This is where the bactraces come in: if aMule crashes, and you get an "OOPS - aMule crashed" and so on, we'd like to know. The backtrace aMule provides is not always very usefull as it contains little information, but, as usual, there's a better way: A *real* backtrace.


First of all, you need the GNU Debugger installed. It's called gdb and you could check for that by typing 'which gdb' in a console window. You should see something like this:

$ which gdb
/usr/bin/gdb

If you dont have gdb installed, you will get a message like this:

$ which gdb
which: no gdb in (/bin:/usr/bin:[sic])

If that is the case, the GNU Debugger is most likely not installed on your system and you should install it before you proceed.


Then, compile aMule with debugging information:

$ ./configure --enable-debug --disable-optimise --prefix=/where/to/install/aMule
$ make
$ make install


If you do not want to overwrite you old copy of aMule, simply do this instead:

$ ./configure --enable-debug --disable-optimise
$ make

aMule can then be run by cd'ing to the dir 'src' and typing ./amule


If you are unable or unwilling to recompile, or are running a *.rpm version, proceed anyway, but be aware that backtraces from debugging enabled builds are much more useful to us.


To create a backtrace, do the following:

  1. Run "gdb /where/to/install/aMule/bin/amule".
  2. Enter "ha SIGPIPE nostop noprint pass" after (gdb) prompt (to avoid gdb stopping at broken pipes).
  3. Enter "ha SIG32 nostop noprint pass" (to avoid gdb stopping at new thread).
  4. Enter "run".
  5. Use aMule normally until it crashes.
  6. Enter "bt".
  7. Enter "bt full".
  8. Post the output of the last two steps in the backtraces forum with some additional comment about the circumstances the segfault happened and what aMule version you used (or checkout time for CVS).


So, that's it, have fun with aMule

greetings, Citroklar

(most of the above shamelessly stolen from pure_ascii's post in backtraces forum, thanks, pure!)