NVIDIA / enroot

A simple yet powerful tool to turn traditional container/OS images into unprivileged sandboxes.
Apache License 2.0
649 stars 95 forks source link

Unable to set kernel.core_pattern #85

Closed indhub closed 3 years ago

indhub commented 3 years ago

Hi,

I'm trying to collect coredump from a crashing process and I'm not able to set kernel.core_pattern. Is there a way to collect coredump of processes crashing inside enroot?

# sysctl -w kernel.core_pattern=/tmp/crashes/core-%e.%p.%h.%t
sysctl: permission denied on key 'kernel.core_pattern'
3XX0 commented 3 years ago

No unfortunately there is no way to set it inside the container as it is a privileged operation and global for the system. You can set it once as root outside of the container to a well known location and have all container mount the directory (e.g. automatically through a mount config).