Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Different Linux distributions and versions change the way core dumps are handled, to rely on systemd etc, by providing a different setting for kernel.core_pattern and (maybe) other related settings.
For MariaDB Sever historically the core dump was written to the current working directory, datadir. It makes sense to have a way to force server to do this without changes to the global OS level settings like kernel.core_pattern. We do try to get backtraces before writing cores, so looks like custom signal handlers are already in place and all the need to do it is to create a core (given the permissions, surely) based on own setting like this:
core_file = /mariadb/backup/core_file/core.*
that should refer to a core.%p (PID) and datadir by default.
This way we can guarantee the location of the core files during OS upgrade or independence from the global changes at the OS level done for other programs.
I am not 100% sure it is possible to do this, but is seems so based on some sources like https://code.google.com/archive/p/google-coredumper/wikis/WriteCoreDump.wiki