Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1009 Bytes

File metadata and controls

33 lines (22 loc) · 1009 Bytes

kpcdumper - a mechanism to dump core files from within an application without killing it

It consist of a kernel module which will run gdb gcore on demand from the application.

Usage:

  • build
  • insert the kernel module
  • create the dump device
  • link the app with the static library
  • call dump_core() as needed. NOT to be called from signal handlers.

Build

  • Needs a C11 compiler
  • Change the makefile and the header as needed
  • make

Caveats

  • The thread calling dump_core will wait until the dump completes. Other threads in the application will continue running for a few jiffies after that call is entered, until the module SIGSTOPs the program.
  • Uses a custom signal handler (default: SIGUSR1)
  • YMMV with different kernel versions.
  • Secure Boot, selinux and such might interfere with.

Similar tools & various links