From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Sun, 13 Feb 2011 16:32:27 -0800 Message-ID: From: ron minnich To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: [9fans] ratrace problem; debuggers welcome Topicbox-Message-UUID: adf0a4c4-ead6-11e9-9d60-3106f5b1d025 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