cirrus-ci-docs
cirrus-ci-docs copied to clipboard
Set a consistent and useful core_pattern for amd64 and arm containers
Set a useful core_pattern for amd64/aarch64 containers. E.g. something like /tmp/cores/%e-%s-%p.%t.core
Right now arm containers have /proc/sys/kernel/core_pattern
set to just core
(but due to /proc/sys/kernel/core_uses_pid=1
that's essentially core.%p
) and amd64 containers have it set to /core.%e.%p.%t
.
Neither is good to analyze core dumps automatically. The amd64 one means that only tasks run by root can core dump. The arm one has the problem that one needs to search the entire directory tree for core files (and it's harder to see what command is responsible, but that's not that important) and that core files can only be produced if CWD is writable for the current user.
I did a quick research and it seems it's not that easy to change it for the managed services like GKE and EKS that we use for containers. Seems core dump location is a node level configuration and these services don't provide much flexibility to configure it (here are GKE options).
It seems there is no easy way to support it for containers for now. On the bright side core_pattern
seems to be already a namespaced option so it might be added sooner then later,