Re: FYI: fix 2 tests when glibc debuginfo is installed

Pedro Alves
2011-10-14T21:42:06Z

On Friday 14 October 2011 22:25:10, Jan Kratochvil wrote:
> On Fri, 14 Oct 2011 23:19:09 +0200, Pedro Alves wrote:
> > On Friday 14 October 2011 20:37:05, Jan Kratochvil wrote:
> > > thanks; although these testcases are broken anyway, they should be updated for
> > > Linux kernels 3.1.x which always keep inferior stopped if it was stopped
> > > during PTRACE_ATTACH; probably to XFAIL older kernels.
> >
> > Urgh. Even if you SIGCONT the process before PTRACE_DETACH?
>
> Yes. But I do not think it is problem, one can SIGCONT it safely after
> PTRACE_DETACH. Just it may be (T)-stopped for a moment but why not.

So,

no debugger:

$ kill -SIGSTOP PID
*stop*
$ kill -SIGCONT PID
*continue*

with debugger:

$ kill -SIGSTOP PID
*stop*
$ strace/gdb -p PID
...
$ kill -SIGCONT PID
^C/detach
*stop*

Oleg, do you have a pointer to a discussion or description of the
change? Why doesn't at least the SIGCONT cancel the stop on detach?

> The opposite - the upstream 2.6.x kernel state - was IMO worse, it was resumed
> and one could not safely keep it stopped.
>
>
> > Why was the behavior changed incompatibly if we're having the all new
> > PTRACE_SEIZE? Do you have a lkml reference to the change?
>
> I do not have anything specific, AFAIK it just happened as part of all the
> changes incl. PTRACE_SEIZE. I have updated the behavior into two new *-3x.c
> tests with Oleg Nesterov ~review/check/approval in:
> http://sourceware.org/systemtap/wiki/utrace/tests

--
Pedro Alves