How to debug a segfault within DirectAdmin


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » TroubleShooting
Top Level » DirectAdmin

How to debug a segfault within DirectAdminLast Modified: Dec 28, 2007, 1:10 pm
If you get a message "A segmentation fault has occurred", this is a program error generally due to either incompatible binaries for your OS, or incorrect handling of data.

The first thing you should do is go to:
Admin Level -> Licenses/Updates
and check to ensure that the OS the binaries were compiled for match the OS you're using.

To debug it, the first thing you should do is check your:
/var/log/directadmin/error.log
to see what the problem is.  There will be a segfault message with a program location.

To further debug the error, mainly for reporting to us, you'd need to install "gdb" to debug the binary.
You'll also need to be able to reliably dulicate the segfault.

1) Login to DA normally, and go the page such that you're one click away from generating the segfault.

2) Login to ssh as root and type:

cd /usr/local/directadmin
killall -9 directadmin
gdb directadmin
run s

This will have loaded up a single process non-forked copy of DirectAdmin.  It only gets 1 call to it, then it will quit.

3) Go back to your "1 click away" browser, and submit the form to generate the segfault.  You'll probably not get any output which is fine.

4) Back to ssh again, gdb should have pointed out that the program sefaulted.  Type

bt full

to dump the memory for the programs location.  Copy/paste that entire output and send it to us.
 
Related Helpfiles
Which OS am I using?

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST