Subject: Re: 2.6.30-rc6: Reported regressions from 2.6.29

From: Oleg Nesterov <[email-masked]>
Date: Mon, 18 May 2009 17:31:15 +0200

On 05/18, Ingo Molnar wrote:
>
> * Oleg Nesterov <[email-masked]> wrote:
>
> > On 05/17, Ingo Molnar wrote:
> > >
> > > > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=13107
> > > > Subject		: LTP 20080131 causes defunct processes w/2.6.30-rc1
> > > > Submitter	: Kumar Gala <[email-masked]>
> > > > Date		: 2009-04-09 15:43 (38 days old)
> > > > First-Bad-Commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b3bfa0cba867f23365b81658b47efd906830879b
> > > > References	: http://marc.info/?l=linux-kernel&m=123929187208953&w=4
> > > > 		  http://lkml.org/lkml/2009/4/10/193
> > > > Handled-By	: Sukadev Bhattiprolu <[email-masked]>
> > >
> > > Oleg says in that thread that it's as-designed, and followup
> > > questions were not replied to (yet).
> >
> > Yes, I think this is false alarm. Perhaps I missed something, and
> > I am waiting for more info from Kumar, but it looks like ltp was
> > already changed to skip the "{ PTRACE_ATTACH, 1, EPERM }" test on
> > kernels after 2.6.25
>
> Btw., why did the patch (and the revert) make any difference to the
> test? Timing differences look improbable.

Because before this series /sbin/init always ignored SIGSTOP. Now,
ptracer does PTRACE_ATTACH and exits without clearing the pending
SIGSTOP. init dequeues this signal and becomes TASK_STOPPED.

Consider:

	$ sleep 1000 &
	[1] 875

	$ grep State: /proc/`pidof sleep`/status
	State:  S (sleeping)

	$ perl -e 'syscall 101, 16, 0+shift, 0,0' `pidof sleep`    # just PTRACE_ATTACH + exit

	[1]+  Stopped                 sleep 1000

	$ grep State: /proc/`pidof sleep`/status
	State:  T (stopped)

This is the "normal" behaviour, afaics the same happens with init now.

Oleg.