• Vladislav Vaintroub's avatar
    MDEV-29951 server hang in crash handler · 92be8d20
    Vladislav Vaintroub authored
    When trying to output stacktrace, and addr2line is not installed, the
    child process forked by start_addr2line_fork() will fail to do exec(),
    and finish with exit(1).
    
    There is a problem with exit() though - it runs exit handlers,
    and for the forked copy of crashing process, it is a bad idea.
    
    In 10.5+ code for example, exit handlers include
    tpool::task_group static destructors, and it will hang infinitely
    waiting for completion of the outstanding tasks.
    
    The fix is to use _exit() instead, which skips the execution of exit
    handlers
    92be8d20
my_addr_resolve.c 7.34 KB