[MDEV-26949] --debug-gdb installs redundant signal handlers Created: 2021-11-01 Updated: 2021-11-01 Resolved: 2021-11-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server, Tests |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7 |
| Fix Version/s: | 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | affects-tests, rr-profile-analyzed | ||
| Description |
|
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 (of the current thread only, with no values of function parameters, and often not with correct names of symbols) 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. 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’d better avoid hitting the problem by simply not installing those signal handlers:
With this patch, the signal handler (with the stack trace output) will still be used in normal ./mtr invocations. I tested it with a test case of
|