Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Roachprod makes it easy to collect a Go core dump. Steps 1 and 2 are already complete by default, and the core files are written to /mnt/data1/cores. So all you have to do is send -SIGSEGV to a cockroach that was invoked via roachprod start, and it’ll dump core.

Alternate approach: gcore

Instead of killing the process, you can use gcore/gdb to get the core dump. To do this:

  1. Install gdb with sudo apt-get install gdb

  2. Look up the pid of the cockroach process.

  3. sudo gcore -o /mnt/data1/cores $PID

Run Viewcore

Now you’re ready to viewcore! Invoke it like this to get the interactive prompt (and remember to make sure your core was generated with the passed in binary! You will get opaque errors otherwise):