From: Oleg Nesterov <oleg@tv-sign.ru>
To: Joe Korty <joe.korty@ccur.com>
Cc: Roland McGrath <roland@redhat.com>, Jiri Kosina <jkosina@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [BUG, TEST PATCH] stallout race between SIGCONT and SIGSTOP
Date: Tue, 23 Sep 2008 20:35:30 +0400 [thread overview]
Message-ID: <20080923163530.GA656@tv-sign.ru> (raw)
In-Reply-To: <20080923155331.GA20380@tsunami.ccur.com>
Sorry! I have to run avay right now, and I will be completely offline
tomorrow. I'll return on Thursday.
On 09/23, Joe Korty wrote:
>
> Since 2.6.25-git16, the Open POSIX Test Suite test sigaction/10-1 on
> occasion stalls out. A ^C breaks the test out of the stall.
>
> To see the problem, one must run the test in a loop. The stallout happens
> anywhere from 3 to approximately 60 iterations. To make the test runtime
> more bearable, I've been using a custom version that is 8x faster than
> the original, s/sleep/usleep/g + new sleep constants.
>
> The test in essence does 10 SIGSTOPs and SIGCONTs, interleaved, with a
> short delay between each SIGSTOP and SIGCONT, but none (other than the
> small delay of a printf) between each SIGCONT and SIGSTOP:
>
> for(i=0; i<10; i++) {
> printf("--> Sending SIGSTOP #%d\n", i);
> kill (pid, SIGSTOP);
> usleep(125000);
> printf("--> Sending SIGCONT #%d\n", i);
> kill (pid, SIGCONT);
> // usleep(125000); /* this is missing from the real 10-1 */
> }
>
> When the above commented-out usleep is enabled, the stallout disappears.
> If instead of adding a usleep, the printf's are removed, the test stalls
> out immediately.
Could you clarify? Do you mean that the task hangs in sys_kill() ?
Better yet, to avoid a possible confusion, could you please send me
the (modified) source code to re-produce the stall ?
> Therefore the problem has something to do with a SIGSTOP
> being issued 'too soon' after the issuance of a SIGCONT.
>
> Bisection shows that the problem was introduced by
>
> commit e442055193e4584218006e616c9bdce0c5e9ae5c
> Author: Oleg Nesterov <oleg@tv-sign.ru>
> Date: Wed Apr 30 00:52:44 2008 -0700
>
> This commit adds code that solves serious race problems by deferring the
> actual processing of SIGSTOP and SIGCONT to a later time. I suspect it
> is this deferring that is making SIGCONT sensitive to a SIGSTOP coming
> in too close on its heels.
>
> The following patch, not to be considered seriously,
Yes, the patch is not for production, but thanks a lot! I am sure it will
help to diagnose the problem.
Thanks Joe!
Oleg.
next prev parent reply other threads:[~2008-09-23 16:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-23 15:53 Joe Korty
2008-09-23 16:35 ` Oleg Nesterov [this message]
2008-09-24 15:05 ` Oleg Nesterov
2008-09-24 15:19 ` Joe Korty
2008-09-24 15:56 ` Oleg Nesterov
2008-09-24 17:11 ` Joe Korty
2008-09-24 17:34 ` Oleg Nesterov
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=20080923163530.GA656@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=jkosina@suse.cz \
--cc=joe.korty@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®