public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "jistone at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sources.redhat.com
Subject: [Bug runtime/10575] occasional stapio hangs for -c CMD
Date: Mon, 31 Aug 2009 17:40:00 -0000	[thread overview]
Message-ID: <20090831174033.10806.qmail@sourceware.org> (raw)
In-Reply-To: <20090829202719.10575.fche@redhat.com>


------- Additional Comments From jistone at redhat dot com  2009-08-31 17:40 -------
(In reply to comment #1)
> In one scenario, the initial SIGUSR1 sent to the target_cmd-executing
> stapio process appears to be lost (either not received, or sent before
> the child program was listening for it, or perhaps not sent at all?!).

Do your scripts have lots of output?  It could be related to #10189, where
STP_START gets lost in the overflow...

We also fork the child process before setting up signals, so we wouldn't see the
SIGCHLD if the it died to soon (i.e. before the SIGUSR1/exec stuff, but that
would be an abnormal termination).  The fix here is to prepare for SIGCHLD
before starting the child.

Another race I see is if the main process sent the SIGUSR1 before the child had
setup its handler -- this would cause the child to abort.  We should get a
SIGCHLD in this case though, so while not desirable, it wouldn't cause your
hang.  We should probably set SIGUSR1 blocked before forking anyway.

There's a tighter race between the child's calls to sigaction-ignore-SIGUSR1 and
then pause -- the signal could be lost in-between.  I believe sigsuspend would
handle this more atomically.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10575

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

  parent reply	other threads:[~2009-08-31 17:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-29 20:27 [Bug runtime/10575] New: " fche at redhat dot com
2009-08-31 17:03 ` [Bug runtime/10575] " fche at redhat dot com
2009-08-31 17:40 ` jistone at redhat dot com [this message]
2009-09-08  9:51 ` mjw at redhat dot com
2009-09-08  9:54 ` mjw at redhat dot com
2009-10-13 14:06 ` dsmith at redhat dot com

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=20090831174033.10806.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sources.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).