This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug nptl/654] Cancelling nptl thread on dlclose() leads to application hangup
- From: "alexei dot khlebnikov at datacon dot at" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 13 Jan 2005 12:52:26 -0000
- Subject: [Bug nptl/654] Cancelling nptl thread on dlclose() leads to application hangup
- References: <20050112104719.654.alexei.khlebnikov@datacon.at>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From alexei dot khlebnikov at datacon dot at 2005-01-13 12:52 -------
I've investigated the problem further.
I've found a (not very precise) place in the libc where the hangup takes place.
It's the file nptl/pthread_join.c, line 86, which looks like
---
/* Wait for the child. */
lll_wait_tid (pd->tid);
---
lll_wait_tid is a macro with assembler code which I don't understand so far:
---
/* The kernel notifies a process with uses CLONE_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards.
The macro parameter must not have any side effect. */
#define lll_wait_tid(tid) \
do { \
int __ignore; \
register __typeof (tid) _tid asm ("edx") = (tid); \
if (_tid != 0) \
__asm __volatile (LLL_EBX_LOAD \
"1:\tmovl %1, %%eax\n\t" \
LLL_ENTER_KERNEL \
"cmpl $0, (%%ebx)\n\t" \
"jne,pn 1b\n\t" \
LLL_EBX_LOAD \
: "=&a" (__ignore) \
: "i" (SYS_futex), LLL_EBX_REG (&tid), "S" (0), \
"c" (FUTEX_WAIT), "d" (_tid), \
"i" (offsetof (tcbhead_t, sysinfo))); \
} while (0)
---
--
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.