[Bug 283101] pthread_cancel() doesn't cancel a thread that's currently in pause()
Date: Thu, 19 Dec 2024 16:39:13 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283101 --- Comment #14 from Konstantin Belousov <kib@FreeBSD.org> --- So the victim (would be cancelled) thread has cancel_pending = 1, which mean that the main thread successfully executed _thr_cancel() against it. The actions of _thr_cancel() are setting cancel_pending, and sending SIGCANCEL to the target using thr_kill(2). Since the victim is happily sleeping in sigsuspend(), either SIGCANCEL was not delivered at all, or delivered but ignored due to convoluted threaded handler. I tried to find any point where SIGCANCEL could be lost, but so far I do not see it. Can you please apply the debugging patch below and repeat the same data gathering? I want to see if the victim thread' userspace got SIGCANCEL at all. -- You are receiving this mail because: You are the assignee for the bug.