[MDEV-23186] mysqld doesn't create core dump if crashing while backtracing or dumping memory Created: 2020-07-15 Updated: 2021-03-31 Resolved: 2020-07-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.4.13 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Rick Pizzi | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
When a 2nd crash happens in the crash handling routine, the core dump function doesn't get called. As a result, no core file can be obtained and crash can't be analyzed. Let's create a config file or command line option to go straight to core dumping in case of crash. |
| Comments |
| Comment by Daniel Black [ 2020-07-16 ] | ||||||||||||||||||||||||||||||||||||||||||
|
To skip the stack trace you can use --skip-stack-trace on command line or as config option. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Rick Pizzi [ 2020-07-16 ] | ||||||||||||||||||||||||||||||||||||||||||
|
danblack will this also skip memory dump? | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Rick Pizzi [ 2020-07-16 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Perusing the source code, I see that in case of a double segfault, core dump is skipped by default, regardless the value of that command line option. This explains why we aren't getting a core file....
| ||||||||||||||||||||||||||||||||||||||||||
| Comment by Rick Pizzi [ 2020-07-16 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Following the code, it appears that the crash is indeed inside my_print_backtrace() and the actual memory dump is from the system library and not from MariaDB. We will try to run with the option you have mentioned. Thanks. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2020-07-16 ] | ||||||||||||||||||||||||||||||||||||||||||
|
You're welcome. It did look like your other MDEV crashed in my_print_backtrace. It doesn't quite eliminate the entire signal handler, however as you've seen its quite minimal with ---skip-stack-trace enabled.. Best wishes resolving the initial crash. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-03-19 ] | ||||||||||||||||||||||||||||||||||||||||||
|
I suspect that |