• Marko Mäkelä's avatar
    MDEV-26949 --debug-gdb installs redundant signal handlers · 026984c3
    Marko Mäkelä authored
    There is a server startup option --gdb a.k.a. --debug-gdb that requests
    signals to be set for more convenient debugging. Most notably, SIGINT
    (ctrl-c) will not be ignored, and you will be able to interrupt the
    execution of the server while GDB is attached to it.
    
    When we are debugging, the signal handlers that would normally display
    a terse stack trace are useless.
    
    When we are debugging with rr, the signal handlers may interfere with
    a SIGKILL that could be sent to the process by the environment, and ruin
    the rr replay trace, due to a Linux kernel bug
    https://lkml.org/lkml/2021/10/31/311
    
    To be able to diagnose bugs in kill+restart tests, we may really need
    both a trace before the SIGKILL and a trace of the failure after a
    subsequent server startup. So, we had better avoid hitting the problem
    by simply not installing those signal handlers.
    026984c3
mysqld.cc 353 KB