public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at redhat dot com" <sourceware-bugzilla@sources.redhat.com> To: glibc-bugs@sources.redhat.com Subject: [Bug nptl/654] Cancelling nptl thread on dlclose() leads to application hangup Date: Thu, 13 Jan 2005 13:15:00 -0000 [thread overview] Message-ID: <20050113131512.4164.qmail@sourceware.org> (raw) In-Reply-To: <20050112104719.654.alexei.khlebnikov@datacon.at> ------- Additional Comments From jakub at redhat dot com 2005-01-13 13:15 ------- This is the same deadlock as has been fixed by: 2004-07-07 Ulrich Drepper <drepper@redhat.com> * elf/dl-fini.c (_dl_fini): Move the unlock of the ld.so lock before the loop running the destructors. for destructors that are run at exit time. ATM ld.so holds dl_load_lock when running shared library destructors and the same lock is used indirectly by libgcc_s.so when unwinding. If you call pthread_cancel in a shared library destructor that is run during dlclose, dl_load_lock is held in the thread calling pthread_cancel, but the cancelled thread needs to be unwound. As you also call pthread_join in the same destructor that waits for the cancelled thread and the cancelled thread is waiting until dl_load_lock is released (this would happen when dlclose is about to return), they are deadlocking. The fix is avoid running shared library destructors with dl_load_lock held, but that's certainly not trivial. -- http://sources.redhat.com/bugzilla/show_bug.cgi?id=654 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
next prev parent reply other threads:[~2005-01-13 13:15 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-01-12 10:47 [Bug nptl/654] New: " alexei dot khlebnikov at datacon dot at 2005-01-12 10:49 ` [Bug nptl/654] " alexei dot khlebnikov at datacon dot at 2005-01-13 12:31 ` alexei dot khlebnikov at datacon dot at 2005-01-13 12:52 ` alexei dot khlebnikov at datacon dot at 2005-01-13 13:15 ` jakub at redhat dot com [this message] 2005-01-17 12:43 ` alexei dot khlebnikov at datacon dot at 2005-01-17 12:47 ` alexei dot khlebnikov at datacon dot at 2006-05-02 22:03 ` drepper at redhat dot com [not found] <bug-654-131@http.sourceware.org/bugzilla/> 2010-12-10 3:43 ` r0bertz at gentoo dot org 2010-12-10 12:51 ` r0bertz at gentoo dot org 2012-05-06 9:04 ` aj at suse dot de
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=20050113131512.4164.qmail@sourceware.org \ --to=sourceware-bugzilla@sources.redhat.com \ --cc=glibc-bugs@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: linkBe 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).