When a data node crashes lots of information goes into the error log, trace files and out log. However, it makes sometimes sense when you can repeat the crash, to run the data node in debug mode, or using gdb.
First, using RPMs and a Linux distribution, make sure you have the ‘debuginfo’ package installed. For example, for Red Hat or Oracle Enterprise Linux on a 64-bit machine, this package would be called:
Create a file with the following commands, we will name it
set pagination off set logging overwrite on set logging file ndbd_gdb_backtrace.txt set logging on run --foreground -c <YourMGM:1186> --ndb-nodeid=<YourID> thread apply all bt set logging off
Note line 5: pass the options to ‘run’ which you usually pass when starting ndbd, but leave the
Note line 3: you can save of course the logging file wherever you want to.
Then all you need to do is run gdb with the commands file and the ndbd binary you just created:
$ gdb /usr/sbin/ndbd -x ndbd.gdb
A full backtrace of threads will be available in the logging file when ndbd crashes. This you can then upload when reporting bugs.
There are probably more options and things you can do, please post them in the comments!
If you like to leave a comment, but don't like to use Disqus, please send an email instead. Comments by email might end up as a FAQ here under.