I have some perl script which executes some commands on remote gerrit server via SSH. It's running on a Debian lenny virtual machin. During several monthes it was executed in the following way:
./script.pl &>~/script.log &
disown
and everything was working well. However from the last friday this script and its child processes ("sh -c ssh ...." and "ssh ...") hangs at some moment exactly during remote command execution. "ps x" shows status T (sTopped) for all of them. Sending SIGCONT dosen't really helps. They recive SIGSTOP immediatelly after it.
I can't see such wired behaviour when runing this script interactivelly (now it works in screen without any problems).
I have tried to use strace to investigate what happens but I can't catch this bug since this scripts works well when started interactively. I don't know who can send SIGSTOP and I don't know which process exactly recives this signal first. Can I find out this information somehow? How can such issue be investigated?
P.S. My scope of responsibility is limited to monitor and restart (if needed) this script. I don't know which changes were made on this server or on remote gerrit server by responsible people.
strace -f -o /tmp/script.strace ./script.pl ...