QutEcoacoustics/baw-server

BawAudioTools::Exceptions::AudioToolTimedOutError leaves zombie processes behind

Opened this issue · 0 comments

When BawAudioTools::Exceptions::AudioToolTimedOutError is raised the process runner is meant to clean up child processes.

Instead they're left behind as zombie processes.

The following code does not seem to be working:

# We need to kill the process, because killing the thread leaves
# the process alive but detached, annoyingly enough.
# Sending TERM (15) instead of KILL (9) to allow clean up rather than
# dirty exit
Process.kill('TERM', pid)

Samples taken from a recent incident on a server:

image

$ ps -aux | grep "<defunct>" | wc -l
3828