[MDEV-24217] Add --invoke-on-crash option to mysqld allowing better and non-failing debugging traces Created: 2020-11-16  Updated: 2020-11-17

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Roel Van de Paar Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-24199 MariaDB Server fails to write a core ... Stalled

 Description   
  • Consider replacing current in-error-log stacktracing/demangling with a custom --invoke-on-crash option to mysqld
  • The option could have allow further auto-filling parameters like %p for the pid, etc.
  • Allow debuggers (e.g gdb, cdb, etc.) to print out all-threads stacktraces etc. (to stdout/error log)


 Comments   
Comment by Roel Van de Paar [ 2020-11-16 ]

Further research shows that this may not work as ptrace privilege (echo 0 > /proc/sys/kernel/yama/ptrace_scope as root) is required, and setting this opens the door to same-user exploits by other rogue processes.

Comment by Vladislav Vaintroub [ 2020-11-16 ]

not %p for pid. %d should be enough

Comment by Daniel Black [ 2020-11-16 ]

Is this for testing and/or production? What does it offer over the piping core_pattern to program? It it intended to continue with a live program, or just post-mortem?

Generated at Thu Feb 08 09:28:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.