there's a race in ratrace: programs can escape. The reason is that the
parent forks a child and writes stop to its ctl file. But the child
can run any number of system calls -- even to completion -- before the
parent writes that stop command. I'm seeing this on arm.

The fix is simple, in the child, write "hang" to proc/getpid()/ctl.

Simple, right? Well, not so simple.

In the old ratrace, I can (e.g.)
ratrace -c /bin/rc
and I will trace all the rcs and their kids, foever and ever.

In the ratrace with the child process writing hang to its own ctl,
eventually, ratrace goes away. Not Broken, just gone, and the
symptom is that the first command in the traced rc is traced, but no
further commands are.

Anyway, if somebody is up for debugging fun, I can send you the
modified ratrace and you can see what I might have gotten wrong.

thanks

ron

Reply via email to