How to disable the builtin SIGSEGV handler in ROOT


ROOT Version: 6.26/00
Platform: linuxx8664gcc
Compiler: g++ (GCC) 12.0.1 20220308 (Red Hat 12.0.1-0)


I am writing some small program that is using and linked to ROOT, I noticed a mechanism that when program (linked to ROOT) gets a SIGSEGV, it will spawn a GDB and print backtrace, instead of just crashing and letting kernel/systemd-coredumpd to kick in to grab a coredump file. (Nevertheless to say the backtrace printing is broken on my Fedora 36 machine, but this specific problem should be reported to Fedora maintainers I think.)

While the built in SIGSEGV handler can be distrubing when I want to get a coredump from systemd-coredumpd for further debugging, is there anyway to disable/bypass it?

Maybe:
Fedora Project Wiki β†’ Automatic Bug Reporting Tool
Fedora Project Wiki β†’ StackTraces
Fedora Project Wiki β†’ Features β†’ CrashHandling
Fedora Project Wiki β†’ Features β†’ Apport

Yes, this will help for me to report about the problem that the builtin straceback generator from ROOT shipped with Fedora. While I wanted to disable the mechanism of the builtin straceback completely, could it be possible?

Hi @karuboniru,
if there is a way to disable it (without patching ROOT, that is), @pcanal will know, let’s ping him.

On the other hand, if it can help, please note that you can attach a debugger to the process and it will work as usual.

Cheers,
Enrico

It is:

gSystem->ResetSignal(kSigBus);
gSystem->ResetSignal(kSigSegmentationViolation);
gSystem->ResetSignal(kSigIllegalInstruction);
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.