<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://test.amule.szerverem.hu/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=217.237.149.162</id>
		<title>AMule Project FAQ - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://test.amule.szerverem.hu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=217.237.149.162"/>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Special:Contributions/217.237.149.162"/>
		<updated>2026-04-05T08:57:38Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>http://test.amule.szerverem.hu/wiki/Backtraces</id>
		<title>Backtraces</title>
		<link rel="alternate" type="text/html" href="http://test.amule.szerverem.hu/wiki/Backtraces"/>
				<updated>2005-07-29T12:29:38Z</updated>
		
		<summary type="html">&lt;p&gt;217.237.149.162: according to Kry's post this is neccessary for kad-enabled aMule&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Well, not hard to guess, this is about backtraces.&lt;br /&gt;
&lt;br /&gt;
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 [http://www.gnu.org/software/cvs CVS] which can also be unstable sometimes.&lt;br /&gt;
This is where the backtraces come in: if [[aMule]] crashes, and you get an &amp;quot;OOPS - aMule crashed&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
== The GNU Debugger ==&lt;br /&gt;
&lt;br /&gt;
First of all, you need the [http://www.gnu.org/software/gdb/gdb.html 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:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
$ which gdb&lt;br /&gt;
/usr/bin/gdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
If you don't have [http://www.gnu.org/software/gdb/gdb.html GDB] installed, you will get a message like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
$ which gdb&lt;br /&gt;
which: no gdb in (/bin:/usr/bin:[etc])&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
If that is the case, the [http://www.gnu.org/software/gdb/gdb.html GNU Debugger] is most likely not installed on your system and you should install it before you proceed.&lt;br /&gt;
&lt;br /&gt;
If your OS is [http://www.gentoo.org Gentoo Linux] you have just to type this:&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
# emerge -av gdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
== Compiling [[aMule]] ==&lt;br /&gt;
&lt;br /&gt;
Then, compile [[aMule]] with debugging information:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./configure --enable-debug --disable-optimize --prefix=/where/to/install/aMule&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
If you do not want to overwrite you old copy of [[aMule]], simply do this instead:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./configure --enable-debug --disable-optimize&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
[[aMule]] can then be run by going into the dir ''src'' and typing ''./amule''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create a backtrace ==&lt;br /&gt;
&lt;br /&gt;
Now create in your home directory the file ''.gdbinit'' and put these lines into it (or you can type them in at the ''(gdb)'' prompt later):&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
ha SIGPIPE nostop noprint pass&lt;br /&gt;
ha SIG32 nostop noprint pass&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
For those who want to know the meaning of the previous lines:&lt;br /&gt;
the first one avoid [http://www.gnu.org/software/gdb/gdb.html GDB] stopping at broken pipes;&lt;br /&gt;
the second one avoid [http://www.gnu.org/software/gdb/gdb.html GDB] stopping at new thread.&lt;br /&gt;
&lt;br /&gt;
To create a backtrace, open a console and do the following:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gdb /where/to/install/aMule/bin/amule&lt;br /&gt;
(gdb) run&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
Now use [[aMule]] normally until it crashes. If it crashes do the following:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;pre&amp;gt;&lt;br /&gt;
(gdb) bt&lt;br /&gt;
(gdb) bt full&lt;br /&gt;
(gdb) thread apply all bt&lt;br /&gt;
&amp;lt;/pre&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
Post the output of the last three commands in the [http://www.amule.org/amule/board.php?boardid=33 backtraces forum] with some additional comment about the circumstances the segfault happened and what [[aMule]] version you used (or checkout time for [http://www.gnu.org/software/cvs CVS]).&lt;br /&gt;
&lt;br /&gt;
== The core file ==&lt;br /&gt;
&lt;br /&gt;
If your [[aMule]] executable has been compiled with debug information (''--enable-debug'' configure flag), but you were not running it from within [http://www.gnu.org/software/gdb/gdb.html GDB], there is still a way to generate a backtrace, if your system was configured to generate '''core files'''.&lt;br /&gt;
&lt;br /&gt;
Core files are the full memory image of a process that crashed. Your session must be properly configured, so that the system generates core files. Add the following command to ''~/.bashrc'':&lt;br /&gt;
&lt;br /&gt;
''ulimit -c unlimited''&lt;br /&gt;
&lt;br /&gt;
Now, when a program crashes, suppose it generate the file ''core.1234'' (this name can be different, but usually will start with 'core') you can enter [http://www.gnu.org/software/gdb/gdb.html GDB] like that:&lt;br /&gt;
&lt;br /&gt;
''$ gdb /path/to/amule /path/to/core/file/core.1234''&lt;br /&gt;
&lt;br /&gt;
and then proceed as in the last session and issue 'bt' and 'bt full'.&lt;br /&gt;
&lt;br /&gt;
So, that's it, have fun with [[aMule]]&lt;br /&gt;
&lt;br /&gt;
Greetings, [[User:Citroklar|Citroklar]] &amp;amp; [[User:Phoenix|Phoenix]]&lt;br /&gt;
&lt;br /&gt;
(Most of the above shamelessly stolen from pure_ascii's post in backtraces forum, thanks, pure!)&lt;br /&gt;
&lt;br /&gt;
Please read [[Using_gdb_and_valgrind|this]] to learn more about [http://www.gnu.org/software/gdb/gdb.html GDB] and [http://valgrind.kde.org Valgrind].&lt;/div&gt;</summary>
		<author><name>217.237.149.162</name></author>	</entry>

	</feed>