Re: [PATCHSET RFC] ptrace,signal: clean transition between STOPPED and TRACED

Roland McGrath
2011-02-02T05:39:36Z

> Also, the first test of xcheck seems to enter infinite loop.

It's a test for race-condition bugs, where the original test was to run the
infinite loop until it crashed. As now written, it runs the loop until
$TESTTIME seconds have passed, defaulting to 10. With various buggy
kernels in various configurations and on various machines, the time it
takes to get to a crash has varied widely.

> I see. Yeah, if there are users which expect /proc/pid/status to be
> certain value, we can either emulate it or delay TRACED transition to
> the next PTRACE call *after* ATTACH/wait(2) sequence, but I think both
> are quite ugly and would like to avoid if at all possible.

I agree. We just need to be more clearly sure about userland requirements
before we make changes. I hope the answer is that nothing other than these
synthetic test cases actually relies on which one /proc/pid/status reports.
(That is, if they do check it, they only notice the "T".)

Thanks,
Roland