Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] UST Hanging at Tracepoint
Date: Tue, 12 Jun 2012 20:21:28 -0400	[thread overview]
Message-ID: <20120613002128.GE21966@Krystal> (raw)
In-Reply-To: <20120613000950.GD21966@Krystal>

* Mathieu Desnoyers (mathieu.desnoyers at efficios.com) wrote:
> * Burton, Michael (mburton at ciena.com) wrote:
> > Mathieu,
> > 
> > I think there is a deadlock scenario in UST, which has been causing my problem.
> 
> Good catch !
> 
> > 
> > sessiond is started as root:
> >     - creates global sockets ONLY
> >     - DOES NOT CREATE shm in $HOME/lttng-ust-wait-<uid>
> > 
> > application linked against ust is run as root:
> >   - in lttng_ust_init constructor
> >   - ust_listener_thread  (local_apps)
> >     - fails to connect to local_apps in $HOME/.lttng (as expected)
> >     - prev_connect_failed=1
> >     - ust_unlock()
> >     - restart
> >     - wait_for_sessiond()
> >  -->  - ust_lock()
> >  |      - get_map_shm()
> >  |        - get_wait_shm()
> > DEADLOCK    - shm_open() FAILS (not created by sessiond when run by root)
> >  |            - fork() (trying to create shared memory itself)
> >  |              - ust_before_fork()
> >  ------------>    - ust_lock()
> > 
> > 
> > You should be able to create this with an empty main, with no
> > tracepoints.  As long as sessiond is started as root so
> > $HOME/lttng-ust-wait-<uid> is not created.  You can also make the
> > lttng-ust constructor (lttng_ust_init) wait forever and then you'll be
> > able to see the deadlock in gdb without even leaving the
> > lttng_ust_init constructor.
> 
> Ah, I see. This deadlock is caused by the interaction between
> liblttng-ust-libc-wrapper and liblttng-ust (the fork override is
> performed by liblttng-ust-libc-wrapper). I'll have to look into this
> issue further. More on that soon.

Actually, I meant that it comes from interaction between
liblttng-ust-fork and liblttng-ust (sorry about the confusion above).
I'll see if I can provide a direct access to the fork() symbol to
liblttng-ust, using a weak symbol so it is defined even when
liblttng-ust-fork is not linked.

More on that soon...

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



  reply	other threads:[~2012-06-13  0:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07 18:16 Burton, Michael
2012-06-08 20:29 ` Burton, Michael
2012-06-09  1:38   ` Mathieu Desnoyers
2012-06-11 15:08     ` Burton, Michael
2012-06-12  2:48     ` Burton, Michael
2012-06-12 14:09       ` Mathieu Desnoyers
2012-06-12 14:13         ` Mathieu Desnoyers
2012-06-12 15:44           ` Burton, Michael
2012-06-12 16:09             ` Burton, Michael
2012-06-12 16:25               ` Mathieu Desnoyers
2012-06-12 18:24                 ` Burton, Michael
2012-06-12 22:25                 ` Burton, Michael
2012-06-13  0:09                   ` Mathieu Desnoyers
2012-06-13  0:21                     ` Mathieu Desnoyers [this message]
2012-06-13  8:29                       ` Mathieu Desnoyers
2012-06-12 15:51         ` David Goulet

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=20120613002128.GE21966@Krystal \
    --to=mathieu.desnoyers@efficios.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