aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: How to post useful backtraces  (Read 5854 times)

pure_ascii

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
How to post useful backtraces
« on: November 29, 2003, 11:29:25 PM »

Hi everyone,

first thanks for your help in debugging aMule by providing a backtrace(BT). But I'm sorry to say that the BTs aMule produces on normal execution

Code: [Select]
OOPS! - Seems like aMule crashed
--== BACKTRACE FOLLOWS: ==--
[...]

are not very useful.

To produce a useful BT you need to follow these steps:
[list=1]
  • Make sure you have installed "gdb" and the needed libs to compile aMule.
  • Compile aMule with debugging information:
  • ./configure --enable-debug --disable-optimise --prefix=/where/to/install/aMule
  • make
  • make install
  • 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 here with some additional comment about the circumstances the segfault happened and what aMule version you used (checkout time for CVS).

A good BT should look like this (shortened):
Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 30619)]
0x080ec7a1 in CEMSocket::DisableDownloadLimit() (this=0x0) at EMSocket.cpp:228
228             limitenabled = false;
(gdb) bt
#0  0x080ec7a1 in CEMSocket::DisableDownloadLimit() (this=0x0) at EMSocket.cpp:228
#1  0x0816fb73 in CPartFile::Process(unsigned) (this=0x8a73a58, reducedownload=131) at PartFile.cpp:1111
[...]
#18 0x406054c2 in __libc_start_main () from /lib/i686/libc.so.6

(gdb) bt full
#0  0x080ec7a1 in CEMSocket::DisableDownloadLimit() (this=0x0) at EMSocket.cpp:228
No locals.
#1  0x0816fb73 in CPartFile::Process(unsigned) (this=0x8a73a58, reducedownload=131) at PartFile.cpp:1111
        cur_datarate = 0
        cur_src = (CUpDownClient *) 0x9e09668
        sl = 0
        old_trans = 1
        dwCurTick = 565584034
        pos1 = (_POSITION *) 0x9f05498
        pos2 = (_POSITION *) 0x9cfc000
[...]
#18 0x406054c2 in __libc_start_main () from /lib/i686/libc.so.6
No symbol table info available.

Thank you for obeying these tips.

Bye, pure_ascii.
Logged

thepolish

  • Hero Member
  • *****
  • Karma: 2
  • Offline Offline
  • Posts: 896
Re: How to post useful backtraces
« Reply #1 on: April 06, 2004, 07:06:08 PM »

Hi,

You also can add Enter "ha SIG32 nostop noprint pass" after (gdb) prompt (to avoid gdb stopping at new thread).

and eventualy "set height 0" to disable prompting

the polish
Logged
Only after the last tree has been cut down
Only after the last river has been poisoned
Only after the last fish has been caught
Only then you will find out that money cannot be eaten
(Cree Prophecy)