This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Why is cancellation enabled in start_thread?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]