snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

[Bug] snarkOS client has no SIGTERM/SIGINT handlers

Open jimpo opened this issue 2 years ago • 0 comments

🐛 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

  1. Run the snarkOS client in a Docker container
  2. Run docker stop -t 60
  3. Twiddle your thumbs for 60 seconds while your container happily chugs along

Expected Behavior

The snarkOS process should gracefully exit immediately

Your Environment

jimpo avatar Oct 28 '22 00:10 jimpo