From: Jakub Jelinek <jakub@redhat.com>
To: Thorsten Kukuk <kukuk@suse.de>
Cc: libc-hacker@sources.redhat.com
Subject: Re: deadlock in signal handler with NPTL
Date: Tue, 22 Jun 2004 22:07:00 -0000 [thread overview]
Message-ID: <20040622195237.GK5191@sunsite.ms.mff.cuni.cz> (raw)
In-Reply-To: <20040622215059.GA1204@suse.de>
On Tue, Jun 22, 2004 at 11:50:59PM +0200, Thorsten Kukuk wrote:
>
> Hi,
>
> I got the following test program. I know, it is very ugly and there
> are a lot of things somebody should not do, but this is something
> what programs like sshd are doing.
Then they should be fixed. Neither syslog, nor printf, nor fflush
are supposed to be async-signal safe, nor they actually are in glibc.
> The problem is: This program deadlocks very fast in a FUTEX_WAIT
> call. This does not happen with LinuxThreads.
Try linking the program with -lpthread and retry with LinuxThreads.
It will hang the same way.
The thing is that NPTL uses locking (on IA-32/x86-64 without lock prefix)
even when -lpthread has not been linked in.
Jakub
next prev parent reply other threads:[~2004-06-22 22:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-22 21:51 Thorsten Kukuk
2004-06-22 22:07 ` Jakub Jelinek [this message]
2004-06-23 4:26 ` Thorsten Kukuk
2004-06-23 4:41 ` Steve Munroe
2004-06-23 6:56 ` Thorsten Kukuk
2004-06-23 8:23 ` Jakub Jelinek
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=20040622195237.GK5191@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=kukuk@suse.de \
--cc=libc-hacker@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).