To create new wiki account, please join us on #znc at freenode and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Difference between revisions of "Debugging"

From ZNC
Jump to: navigation, search
(Mention how to attach gdb to existing processes)
(Reporting bugs: git)
Line 3: Line 3:
Steps to do when you think you found a bug:
Steps to do when you think you found a bug:
* verify the bug exists in the latest version [ (Git)]
* verify the bug exists in the [[Git|latest version]]
* report it at [ Github]
* report it at [ Github]
== Tracing crash bugs ==
== Tracing crash bugs ==

Revision as of 19:36, 10 April 2012

Reporting bugs

Steps to do when you think you found a bug:

Tracing crash bugs

Configure your ZNC version with --enable-debug.

./configure --enable-debug --enable-other-things-you-may-want
make install

Then you can run ZNC under gdb:

gdb ./znc
handle SIGPIPE nostop
run -D

If znc is already running, you can attach gdb to the already-running instance (where pid is znc's process id):

gdb ./znc
attach pid
handle SIGPIPE nostop

Now you use ZNC as you would always do and try to make it crash. Once it crashed, gdb will show you something like this:

Program received signal SIGSEGV, Segmentation fault.

Now we can get the useful info. This info, together with an explanation how the bug happened are then very useful to the developers.

bt full

Why use --enable-debug?

With this flag bt full shows much more info, which is needed to understand why the crash had happened. If you're interested in details, search the Web for "debug symbols" or just try with and without.