I have a process - a perl script - that does:
while true
check a POP account on a server on the lan
process any email found
write logs - messages found, actions taken, errors
sleep for 15 seconds
It's running on a redhat 7.3 server (I inherited it, I'm not happy about the age of that box). It's run out of /etc/inittab like:
spop:2345:respawn:/usr/local/gw/bin/popdmn
If it dies, init restarts it.
In the last couple of days, the process will no longer work unless it's straced. When it's just running, it never logs into the pop server. As soon as it's straced (via "strace -Ff -p cat /usr/local/gw/var/popdmn.pid
"), it works flawlessly.
As a workaround, I'm running screen on the server with an strace running. Obviously this is less than ideal.
Why would a process do this? I haven't seen this happen before.
CONT
signal to the process?cat popdmn.pid
", it unfreezes. I've never seen that before, what's happening under the hood here? Also, thanks :)strace
somehow made use ofSTOP
andCONT
signalling. I don't remember the details though. But somehow it was possible to leave the traced processed in stopped state, needing aCONT
signal to continue. Now the question is, was the processed stopped with aSTOP
signal before you attachedstrace
command the first time? Either the original problem was that aSTOP
signal had been sent, and usingstrace
made it continue temporarily. Or the original problem has gone away, but in the meantime usingstrace
has introduced the new problem.