This is the mail archive of the glibc-bugs@sourceware.org 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]

[Bug nptl/2748] New: Cancel from printf not calling the cancel handler


Found this problem debug failure reported by our cluster team. If we are
PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DEFERRED and pthread_cancel is called
while a thread is waiting on a pthread_rwlock the cancelation will be defered
until the threads wakes up (whoever is holding the lock does
pthread_rwlock_unlock(). 

In this case the thread holding the lock is signaled, runs its cancle handler
and unlocks. One of the waiting threads wakes up and calls printf (which is a
cancellation point). We expect printf (vfprintf) to detect that cancellation is
pending and initiate cancel handling (including calling this threads cancel
handler).

Instead we that thread exiting prematurely (from start_thread,
__exit_thread_inline(0). This leave other threads hung waiting on the
pthread_rwlock and the main thread waiting on pthread_join.

-- 
           Summary: Cancel from printf not calling the cancel handler
           Product: glibc
           Version: 2.4
            Status: NEW
          Severity: critical
          Priority: P1
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: sjmunroe at us dot ibm dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i568-unknown-linux-gnu, powerpc64-unknown-linux-gnu,
                    powerpc32-u
  GCC host triplet: i568-unknown-linux-gnu, powerpc64-unknown-linux-gnu,
                    powerpc32-u
GCC target triplet: i568-unknown-linux-gnu, powerpc64-unknown-linux-gnu,
                    powerpc32-u


http://sourceware.org/bugzilla/show_bug.cgi?id=2748

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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