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/300] pthread_cond_timedwait does not reacquire the mutex on cancelation Date: Mon, 09 Aug 2004 21:42:00 -0000 [thread overview] Message-ID: <20040809214230.26592.qmail@sourceware.org> (raw) In-Reply-To: <20040805081906.300.sebastien.decugis@ext.bull.net> ------- Additional Comments From jakub at redhat dot com 2004-08-09 21:42 ------- This seems to be a bug on the GCC side. The test only seems to fail if SIGCANCEL signal interrupts the worker thread on the very first instruction of __pthread_disable_asynccancel function (FYI compiled with -fasynchronous-unwind-tables), called from pthread_cond_timedwait.S. MD_FALLBACK_FRAME_STATE_FOR sets (FS)->regs.reg[8].loc.offset to address where __pthread_disable_asynccancel+0 is stored, during uw_update_context this results in context->ra being set to __pthread_disable_asynccancel+0. The problem is that next uw_frame_state_for will fde = _Unwind_Find_FDE (context->ra - 1, &context->bases); but context->ra - 1 is __pthread_disable_asynccancel-1 which isn't covered by .eh_frame (and if it would, it would be for a different function). So, to me it looks like MD_FALLBACK_FRAME_STATE_FOR should ensure that context->ra will be set to pctx->uc_mcontext.gregs[REG_IP] + 1, not just pctx->uc_mcontext.gregs[REG_IP]. Richard, do you agree? If so, the question is how to ensure it. I remember MD_FALLBACK_FRAME_STATE_FOR used to have ugly hacks to store an incremented address somewhere and point (FS)->regs.reg[8].loc.offset to it. But the hacks can't be too ugly, since they need to be used in both MD_FALLBACK_FRAME_STATE_FOR and in kernel vDSO's sigreturn .eh_frame description too. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |rth at gcc dot gnu dot org http://sources.redhat.com/bugzilla/show_bug.cgi?id=300 ------- 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:[~2004-08-09 21:42 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-08-05 8:19 [Bug nptl/300] New: " sebastien dot decugis at ext dot bull dot net 2004-08-05 8:23 ` [Bug nptl/300] " sebastien dot decugis at ext dot bull dot net 2004-08-06 8:26 ` sebastien dot decugis at ext dot bull dot net 2004-08-06 15:13 ` jakub at redhat dot com 2004-08-09 21:42 ` jakub at redhat dot com [this message] 2004-08-11 18:51 ` rth at redhat dot com 2004-08-11 20:25 ` jakub at redhat dot com 2004-08-11 21:07 ` rth at gcc dot gnu dot org 2005-09-26 0:02 ` drepper at redhat dot com 2006-02-21 17:55 ` jakub at redhat dot com 2006-04-23 17:59 ` drepper at redhat dot com
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=20040809214230.26592.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).