From: Andreas Schwab <schwab@suse.de>
To: Roland McGrath <roland@hack.frob.com>
Cc: Ernie Petrides <petrides@redhat.com>,
Andrew Morton <akpm@osdl.org>, Jakub Jelinek <jakub@redhat.com>,
"Ulrich Drepper \<drepper.fsp\@gmail.com\>\,
Ingo Molnar" <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix for zeroed user-space tids in multi-threaded core dumps
Date: Thu, 20 Aug 2015 16:48:35 +0200 [thread overview]
Message-ID: <mvmegiy9fss.fsf@hawking.suse.de> (raw)
In-Reply-To: <20061027015930.40C67180057@magilla.sf.frob.com> (Roland McGrath's message of "Thu, 26 Oct 2006 18:59:30 -0700 (PDT)")
Roland McGrath <roland@redhat.com> writes:
> [PATCH] Disable CLONE_CHILD_CLEARTID for abnormal exit.
>
> The CLONE_CHILD_CLEARTID flag is used by NPTL to have its threads
> communicate via memory/futex when they exit, so pthread_join can
> synchronize using a simple futex wait. The word of user memory where NPTL
> stores a thread's own TID is what it passes; this gets reset to zero at
> thread exit.
>
> It is not desireable to touch this user memory when threads are dying due
> to a fatal signal. A core dump is more usefully representative of the
> dying program state if the threads live at the time of the crash have their
> NPTL data structures unperturbed. The userland expectation of
> CLONE_CHILD_CLEARTID has only ever been that it works for a thread making
> an _exit system call.
This breaks nscd. It uses CLONE_CHILD_CLEARTID to clear the
nscd_certainly_running flag in the shared databases, so that the clients
are notified when nscd is restarted. Now, when nscd uses a
non-persistent database, the clients that have it mapped keep thinking
the database is being updated by nscd, when in fact nscd has created a
new (anonymous) one (for non-persistent databases it uses an unlinked
file as backend).
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
prev parent reply other threads:[~2015-08-20 14:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 1:41 Ernie Petrides
2006-10-27 1:59 ` Roland McGrath
2015-08-20 14:48 ` Andreas Schwab [this message]
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=mvmegiy9fss.fsf@hawking.suse.de \
--to=schwab@suse.de \
--cc=akpm@osdl.org \
--cc=jakub@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=petrides@redhat.com \
--cc=roland@hack.frob.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
Powered by JetHome