I have a system where some custom software is running, and then may receive a
SIGHUP. As a result of the
SIGHUP, the process does some cleanup and terminates, but it doesn't terminate its long running child processes.
After the system was running for several months (and in the course of that many of my processes had the misfortune of being hanged up on), I can see in my Ubuntu 12.04 server that I have many of the child processes that have init as their parent, but they are not running nor stopped or zombie - ps shows them in "sleep" state.
If I try to strace one of these processes, the process starts running then immediately sees that it trying to process files that are no longer there (temporary files that were created and deleted some months ago) and exits:
# strace -fp 16111 Process 16111 attached - interrupt to quit open("/tmp/some-file", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) write(2, "/tmp/some-file:"..., 59) = 59 close(3) = 0 exit_group(1) = ? Process 16111 detached
This also happens if I try to
kill -STOP <pid> (at least I guess it does - after I send the signal, the process disappears).
Any idea what's going on?