public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: systemtap@sources.redhat.com
Subject: Re: [Bug uprobes/11672] utrace_report_syscall_exit crash
Date: Mon, 14 Jun 2010 21:32:00 -0000	[thread overview]
Message-ID: <1276537368.9961.31.camel@hermans.wildebeest.org> (raw)
In-Reply-To: <20100614165856.C16DF408C3@magilla.sf.frob.com>

On Mon, 2010-06-14 at 09:58 -0700, Roland McGrath wrote:
> > This is called from the task finder cleanup code and the utrace probe
> > exit code before the module tries to unload. 
> 
> From a quick glance I'm still not really clear on the important question:
> what thread is current when calling into this code?

I think it depends on which method of exiting/unloading is being used.
As far as I understand the code this is called from the proc transport
on response to an exit packet being writen to our .cmd file. Otherwise
it is done through DECLARE_DELAYED_WORK, but I am not completely sure
how that works. Maybe someone who hacked on the transport layer can
explain the precise interactions.

> > Busy-waiting is bad, so if there is an alternative that would be nice.
> > All we need is that if after a utrace_control UTRACE_DETACH we get an
> > -EINPROGRESS that we can wait till we are sure any pending handlers have
> > finished and that the detach fully succeeded.
> 
> As I said, utrace_barrier is that except that it's a busy-wait if
> signal_pending().  The alternative requires changing your model such that
> any waiting is via your own synchronization with your ops->release
> function.

OK, thanks. The current solution seems to make things more stable (I am
unable to trigger any crashes anymore). Lets not rewrite the whole
synchronization just for this small possibility of a busy wait. Unless
someone else wants to of course.

Cheers,

Mark

  reply	other threads:[~2010-06-14 17:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 11:07 [Bug uprobes/11672] New: " mjw at redhat dot com
2010-06-08 11:49 ` [Bug uprobes/11672] " fche at redhat dot com
2010-06-08 15:51 ` mjw at redhat dot com
2010-06-08 15:54 ` mjw at redhat dot com
2010-06-09 22:26 ` mjw at redhat dot com
2010-06-14 14:08   ` Roland McGrath
2010-06-14 14:49     ` Mark Wielaard
2010-06-14 21:06       ` Roland McGrath
2010-06-14 21:32         ` Mark Wielaard [this message]
2010-06-14 19:53     ` Frank Ch. Eigler
2010-06-16 14:30 ` mjw 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=1276537368.9961.31.camel@hermans.wildebeest.org \
    --to=mjw@redhat.com \
    --cc=roland@redhat.com \
    --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).