Why do strace/truss sometimes 'fix' stuck processes?
Posted
by Emmel
on Super User
See other posts from Super User
or by Emmel
Published on 2010-04-23T05:48:53Z
Indexed on
2010/04/23
5:53 UTC
Read the original article
Hit count: 445
Sometimes you have a stuck process that's been stuck for a while, and as soon as you go to poke at it with strace/truss just to see what's going on, it gets magically unstuck and continues to run! So from merely 'observing' these programs have some impact in the running of the stuck programs .. what's happening here? Did strace (I guess via ptrace(2)?) send a signal, causing the program to cease blocking, or such?
I've seen this several times -- most recently on Linux RHEL 4 (and a Perl script mucking with processes and doing some network IO in that case), but in a few other contexts as well. Unfortunately, I can't reproduce this, as it times to happen ... in times of crisis. But my curiosity remains. :-)
Any elucidation appreciated.
© Super User or respective owner