I would like to collect coredumps from a C++ binary running inside a docker container in GitHub workflows in order to first print a backtrace immediately and second store it as an artifact (together with the binary) to debug later.
I have set:
ulimit -c unlimited
I’ve tried to set the path where core files are written:
/cores/core.%e.%p | /proc/sys/kernel/core_pattern
but it fails because this is read only.
Similarly, this doesn’t seem to have any effect:
sysctl -w kernel.core_pattern=core
In the default core dump location
is nothing to be found after a crash.
From reading about this my guess is that the docker container would have to run with
in order to allow changing the path that but supposedly that’s not possible.