unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Douglas Jacobsen <dmjacobsen@lbl.gov>
To: Andreas Schwab <schwab@suse.de>
Cc: libc-alpha@sourceware.org
Subject: Re: glibc 2.26 deadlock with __resolv_conf_detach
Date: Thu, 19 Sep 2019 05:40:19 -0700	[thread overview]
Message-ID: <CAHaWJFH96O65101OssWBMOysPGOaOnCdebNs0g06_TE0O8UOvQ@mail.gmail.com> (raw)
In-Reply-To: <mvmftksof9v.fsf@suse.de>

On Thu, Sep 19, 2019 at 1:34 AM Andreas Schwab <schwab@suse.de> wrote:
>
> On Sep 19 2019, Douglas Jacobsen <dmjacobsen@lbl.gov> wrote:
>
> > The scenario we've uncovered is that some vendor software runs a
> > multithreaded daemon, which then fork()s, and spawns a thread,
>
> In the forked child?  If a multi-threaded process calls fork, the child
> may only call async-signal-safe functions.
>

Yes, the forked child is generating and joining a thread prior to
execve(), and then the child deadlocks.  This code was not generating
problems in SLES12sp3 so it has the appearance of a new problem, but I
do understand what you're saying about async-signal-safe here.  Would
the mechanism of failure here be that the lock variable in
glibc/resolv/resolv_conf.c is already locked in the parent process at
the time of fork() - or whenever the lookup is initially done from the
parent memory?

Thanks,
Doug

  reply	other threads:[~2019-09-19 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19  7:55 glibc 2.26 deadlock with __resolv_conf_detach Douglas Jacobsen
2019-09-19  8:34 ` Andreas Schwab
2019-09-19 12:40   ` Douglas Jacobsen [this message]
2019-09-19 13:02     ` Andreas Schwab
2019-09-19 14:27       ` Douglas Jacobsen

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHaWJFH96O65101OssWBMOysPGOaOnCdebNs0g06_TE0O8UOvQ@mail.gmail.com \
    --to=dmjacobsen@lbl.gov \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@suse.de \
    /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).