Why is cancellation enabled in start_thread?
Daniel Jacobowitz
drow@false.org
Sat Feb 12 05:30:00 GMT 2005
I'm trying to debug an (unrelated) problem in tst-cancel17.c on the
MIPS NPTL port. When I run the test under a debugger,
pd->stopped_start is set so that the thread creation event can be
reported. This means that the test might go to sleep in lll_lock,
with async cancellation enabled.
So now the thread be cancelled before the thread function runs - and
before it calls pthread_barrier_wait. The test program hangs in
do_wait because the early cancellation of tf prevented it from calling
pthread_barrier_wait before it exited.
Why enable cancellation here? The thread handle hasn't been returned
to the application yet, so nothing could cancel it.
--
Daniel Jacobowitz
CodeSourcery, LLC
More information about the Libc-alpha
mailing list