LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Roland McGrath <roland@redhat.com>,
	Davide Libenzi <davidel@xmailserver.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RFC] fix missed SIGCONT cases
Date: Thu, 28 Feb 2008 18:32:45 +0300	[thread overview]
Message-ID: <20080228153245.GB11484@tv-sign.ru> (raw)
In-Reply-To: <Pine.LNX.4.64.0802281238550.3391@jikos.suse.cz>

On 02/28, Jiri Kosina wrote:
>
> On Thu, 28 Feb 2008, Roland McGrath wrote:
> 
> > [PATCH] clean up and fix SIGCONT
> > This reorganizes some of the signals code, replacing handle_stop_signal()
> > with prepare_signal() and finish_signal(), called as a pair before and
> > after generating any signal.  The CLD_CONTINUED notification to parent is
> > moved into finish_signal(), taking place after the signal is made pending
> > and siglock dropped.  This fixes a race where a process waking from SIGCONT
> > could resume application code without running its SIGCONT handler first.
> 
> Hi Roland,
> 
> I haven't tested what is the behavior with my patch, or without any 
> patches at all (will do), but with your patch applied, when I run the test 
> program under strace, it resumes immediately ... doesn't look particularly 
> OK to me:
> 
> $ strace -o /dev/null ./a.out | head -10
> finished (without SIGCONT)
> finished (without SIGCONT)
> finished (without SIGCONT)
> finished (without SIGCONT)
> finished (without SIGCONT)
> finished (without SIGCONT)
> finished (without SIGCONT)
> finished (without SIGCONT)
> finished (without SIGCONT)
> finished (without SIGCONT)

This is different, you can try this trivial program,

	int main(int argc, char **argv)
	{
		kill(getpid(), SIGSTOP);
		printf("I'm running, SIGSTOP doesn't really work with strace.\n");
		return 0;
	}

Oleg.


  reply	other threads:[~2008-02-28 15:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-27 15:22 Jiri Kosina
2008-02-27 21:00 ` Roland McGrath
2008-02-27 22:04   ` Jiri Kosina
2008-02-28 10:26     ` Roland McGrath
2008-02-28 11:42       ` Jiri Kosina
2008-02-28 15:32         ` Oleg Nesterov [this message]
2008-02-28 15:32           ` Jiri Kosina
2008-02-28 15:30       ` Oleg Nesterov
2008-02-28 15:40         ` Jiri Kosina
2008-02-28 16:08           ` Oleg Nesterov
2008-02-28 16:13             ` Jiri Kosina
2008-02-28 16:45               ` [PATCH] handle_stop_signal: don't wake up the stopped task until it sees SIGCONT Oleg Nesterov
2008-02-28 16:56                 ` Jiri Kosina
2008-02-29  2:39         ` [PATCH] [RFC] fix missed SIGCONT cases Roland McGrath
2008-02-29 12:01           ` Oleg Nesterov
2008-02-29 13:20             ` Oleg Nesterov
2008-03-01  1:59             ` Roland McGrath
2008-03-01 16:41               ` Oleg Nesterov
2008-03-03 13:25                 ` Oleg Nesterov
2008-03-06 10:50                   ` Roland McGrath
2008-03-06  9:05                 ` 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=20080228153245.GB11484@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    --subject='Re: [PATCH] [RFC] fix missed SIGCONT cases' \
    /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).