LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Alan Cox <alan@redhat.com>,
	Davide Libenzi <davidel@xmailserver.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] orphaned pgrp fixes
Date: Wed, 5 Mar 2008 19:48:46 +0300	[thread overview]
Message-ID: <20080305164846.GA6723@tv-sign.ru> (raw)
In-Reply-To: <20080305011117.60EAA27010A@magilla.localdomain>

On 03/04, Roland McGrath wrote:
>
> > However, SIGNAL_STOP_STOPPED doesn't relaible with ptrace. I mean, ptracer
> > doesn't clear SIGNAL_STOP_STOPPED. This is btw one of the problems which
> > complicates fixing do_wait(WSTOPPED).
> 
> We can clean that up too if you'd like to bring up the details.

Sorry! I was unclear.

Multiple reasons. Just for example,

	1:~$ strace -o /dev/null perl -e 'kill SIGSTOP,$$; for (;;) {}' &
	[1] 6714
	1:~$ kill -9 $!
	[1]+  Killed                  strace -o /dev/null perl -e 'kill SIGSTOP,$$; for (;;) {}'
	1:~$ grep State: /proc/`pidof perl`/status
	State:  R (running)

but its signal->flags = SIGNAL_STOP_STOPPED.

Please note that unless SIGCONT comes it will exit() with SIGNAL_STOP_STOPPED
set too, this complicates fixing do_wait(WSTOPPED). We can shadow this problem
though, do_wait() can first check TASK_ZOMBIE, and only then SIGNAL_STOP_STOPPED.
I am going to try to cook some patches soon.

> > As for SIGNAL_STOP_STOPPING... I am dreaming to find the way to eliminate
> > this lock-drop in get_signal_to_deliver(). Not sure this is possible, but
> > it is so nasty. For example, SIGNAL_STOP_DEQUEUED is racy, and I don't know
> > how to fix this. The patch we discussed some time ago doesn't really work
> > because dequeue_signal() drops the lock too. The latter is fixable afaics,
> > but needs very ugly changes.
>
> It all certainly deserves more careful thought.

Yes. Somehow the conception of orphaned pgrp doesn't fit in my brain, but I'd
like to at least try to think about this...

Oleg.


  reply	other threads:[~2008-03-05 16:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-02 18:44 Oleg Nesterov
2008-03-04 12:26 ` Roland McGrath
2008-03-04 15:51   ` Oleg Nesterov
2008-03-05  1:11     ` Roland McGrath
2008-03-05 16:48       ` Oleg Nesterov [this message]
2008-03-05 17:11   ` Oleg Nesterov
2008-03-06  1:14     ` Eric W. Biederman
2008-03-07  1:52       ` Oleg Nesterov
2008-03-07  3:53     ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080305164846.GA6723@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=alan@redhat.com \
    --cc=davidel@xmailserver.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [PATCH 0/3] orphaned pgrp fixes' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).