[MDEV-32550] Provide a way to control core dump location and disregard system-wide setting like kernel.core_pattern Created: 2023-10-23  Updated: 2023-10-23

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

Type: Task Priority: Major
Reporter: Valerii Kravchuk Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: 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


Generated at Thu Feb 08 10:32:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.