[MDEV-15051] signal handler - output information about the core generation Created: 2018-01-24  Updated: 2022-01-26  Resolved: 2019-05-01

Status: Closed
Project: MariaDB Server
Component/s: Server
Fix Version/s: 10.2.24, 10.3.15, 10.4.5

Type: Task Priority: Critical
Reporter: Sergey Vojtovich Assignee: Daniel Black
Resolution: Fixed Votes: 1
Labels: contribution, foundation

Issue Links:
Duplicate
duplicates MDEV-15775 Miss-leading message in error log whe... Closed
Relates
relates to MDEV-15775 Miss-leading message in error log whe... Closed

 Description   

monty , when I saw you add 08ff39d I thought "that's not always true - about the core file being in the current directory" and extended this information to cover core locations for Linux and FreeBSD and any rlimits that may be in effect.

I thought this was odd to be in just the with the test_flags. So what was the purpose?

I've made this output this information for all fatal signal handling despite including functions not in the explicitly allowed list.

Is this acceptable enough assuming getrlimit and sysctlbyname are safe within a signal handler?



 Comments   
Comment by Sergei Golubchik [ 2018-01-28 ]

I don't like getrlimit and sysctlbyname in a signal handler, and I'd prefer to avoid my_getcwd either.

Why not to get the core location on startup and just print the buffer from the signal handler?

Comment by Daniel Black [ 2018-04-14 ]

avoided non-signal safe functions by reading /proc filesystem entries as per updated PR.

Core location/pattern are global and can change over the course of a long running process so I've stuck with a signal time detection. Resource limits could of been altered by any plugin along the way so I'm grabbing them at signal time too.

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