public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/28612] New: pthread_exit breaks signal mask at thread termination.
@ 2021-11-22 5:46 fryasu at yahoo dot co.jp
2021-11-22 8:48 ` [Bug nptl/28612] " schwab@linux-m68k.org
2021-11-23 0:48 ` fryasu at yahoo dot co.jp
0 siblings, 2 replies; 3+ messages in thread
From: fryasu at yahoo dot co.jp @ 2021-11-22 5:46 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28612
Bug ID: 28612
Summary: pthread_exit breaks signal mask at thread termination.
Product: glibc
Version: 2.34
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: fryasu at yahoo dot co.jp
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Created attachment 13801
--> https://sourceware.org/bugzilla/attachment.cgi?id=13801&action=edit
Test code for reproduction
pthread_exit() breaks the signal mask in glibc of Fedora 35
(glibc-2.34-8.fc35).
The signal might be catch at termination of thread even when signal mask is
set.
This behavior is reproduced with attached test code:
$ gcc -O2 pthread_sigblock_test.c -o a.out -pthread && ./a.out
:
NG, signal was caught
At least in CentOS 7 (glibc 2.17), it works as expected.
Parhaps, the below change is caused this behavior.
- [RFC PATCH glibc 3/8] nptl: Start new threads with all signals blocked [BZ
#25098]
https://sourceware.org/pipermail/libc-alpha/2020-March/112035.html
'__libc_signal_restore_set(&pd->sigmask)' seems be called at also end of thread
in the case of pthread_exit() called.
When use no pthread_exit(), signal mask is kept at termination of thread as
expected.
$ gcc -DWITHOUT_PTHREAD_EXIT -O2 pthread_sigblock_test.c -o a.out -pthread
&& ./a.out
:
OK, signal was blocked
I'm sorry if I misunderstood the code.
Best regards,
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug nptl/28612] pthread_exit breaks signal mask at thread termination.
2021-11-22 5:46 [Bug nptl/28612] New: pthread_exit breaks signal mask at thread termination fryasu at yahoo dot co.jp
@ 2021-11-22 8:48 ` schwab@linux-m68k.org
2021-11-23 0:48 ` fryasu at yahoo dot co.jp
1 sibling, 0 replies; 3+ messages in thread
From: schwab@linux-m68k.org @ 2021-11-22 8:48 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28612
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
dup
*** This bug has been marked as a duplicate of bug 28607 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug nptl/28612] pthread_exit breaks signal mask at thread termination.
2021-11-22 5:46 [Bug nptl/28612] New: pthread_exit breaks signal mask at thread termination fryasu at yahoo dot co.jp
2021-11-22 8:48 ` [Bug nptl/28612] " schwab@linux-m68k.org
@ 2021-11-23 0:48 ` fryasu at yahoo dot co.jp
1 sibling, 0 replies; 3+ messages in thread
From: fryasu at yahoo dot co.jp @ 2021-11-23 0:48 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28612
--- Comment #2 from fryasu at yahoo dot co.jp ---
Thanks for replying.
And sorry that my confirmation was not enough.
But I'm glad to know this issue will be resolved because I was in this problem.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-23 0:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 5:46 [Bug nptl/28612] New: pthread_exit breaks signal mask at thread termination fryasu at yahoo dot co.jp
2021-11-22 8:48 ` [Bug nptl/28612] " schwab@linux-m68k.org
2021-11-23 0:48 ` fryasu at yahoo dot co.jp
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).