snarkOS
snarkOS copied to clipboard
[Bug] snarkOS client has no SIGTERM/SIGINT handlers
🐛 Bug Report
snarkOS client does not respond to SIGTERM/SIGKILL when running as the root process in a Docker container. This is because in Linux, a process running with PID 1 will ignore SIGTERM/SIGINT unless a signal handler is installed. This means that running docker stop
takes longer than necessary because it waits until the process exit timeout before sending SIGKILL. This gives the process no chance for graceful shutdown.
Steps to Reproduce
- Run the snarkOS client in a Docker container
- Run
docker stop -t 60
- Twiddle your thumbs for 60 seconds while your container happily chugs along
Expected Behavior
The snarkOS process should gracefully exit immediately