public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/19366] returning from a thread should disable cancellation
       [not found] <bug-19366-131@http.sourceware.org/bugzilla/>
@ 2021-06-09 18:22 ` adhemerval.zanella at linaro dot org
  0 siblings, 0 replies; only message in thread
From: adhemerval.zanella at linaro dot org @ 2021-06-09 18:22 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=19366

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.34
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg
           Assignee|unassigned at sourceware dot org   |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The issue is fixed on 2.34 (8fe503f74e0a2ab41eec9bbae1e0ea8f5203716b), although
it does fully follow the POSIX XSH 2.9.5 Thread Cancellation under the heading
Thread Cancellation Cleanup Handlers that states that when a cancellation
request is acted upon, or when a thread calls pthread_exit(), the thread first
disables cancellation by setting its  cancelability state to
PTHREAD_CANCEL_DISABLE and its cancelability type to PTHREAD_CANCEL_DEFERRED.  

The issue is _pthread_enable_asynccancel' explicit enabled asynchronous
cancellation, so an interrupted syscall within the cancellation cleanup
handlers might see an invalid cancelling type.  To fully fix it we will need to
rewrite how cancellation is done (as my proposed solution to BZ#12683).

I will send a second part for this bug where a cancellation callback should see
the expected cancellation state and type (although changing the cancellation
state/type on cancellation callback is undefined).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-09 18:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19366-131@http.sourceware.org/bugzilla/>
2021-06-09 18:22 ` [Bug nptl/19366] returning from a thread should disable cancellation adhemerval.zanella at linaro dot org

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).