public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/26275] New: abort(3) is not signal-safe
@ 2020-07-22 4:31 yd-huang at outlook dot com
2020-07-22 4:43 ` [Bug libc/26275] " yd-huang at outlook dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: yd-huang at outlook dot com @ 2020-07-22 4:31 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26275
Bug ID: 26275
Summary: abort(3) is not signal-safe
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: yd-huang at outlook dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
abort(3) is required to be signal-safe by POSIX, but it's not, according to:
1.
https://www.gnu.org/software/libc/manual/html_node/Aborting-a-Program.html#Aborting-a-Program
2.
https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/abort.c;h=df98782dd7ea6c1476184a365bd9f3954f481a18;hb=refs/heads/master#l54
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libc/26275] abort(3) is not signal-safe
2020-07-22 4:31 [Bug libc/26275] New: abort(3) is not signal-safe yd-huang at outlook dot com
@ 2020-07-22 4:43 ` yd-huang at outlook dot com
2020-08-11 17:30 ` yd-huang at outlook dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: yd-huang at outlook dot com @ 2020-07-22 4:43 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26275
hyd-dev <yd-huang at outlook dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libc/26275] abort(3) is not signal-safe
2020-07-22 4:31 [Bug libc/26275] New: abort(3) is not signal-safe yd-huang at outlook dot com
2020-07-22 4:43 ` [Bug libc/26275] " yd-huang at outlook dot com
@ 2020-08-11 17:30 ` yd-huang at outlook dot com
2020-08-11 22:45 ` jistone at redhat dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: yd-huang at outlook dot com @ 2020-08-11 17:30 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26275
--- Comment #1 from hyd-dev <yd-huang at outlook dot com> ---
In addition to POSIX
(https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03_03),
it's also required to be signal-safe by ISO C and ISO C++ 17
(https://github.com/cplusplus/draft/blob/n4659/source/support.tex#L1643-L1644).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libc/26275] abort(3) is not signal-safe
2020-07-22 4:31 [Bug libc/26275] New: abort(3) is not signal-safe yd-huang at outlook dot com
2020-07-22 4:43 ` [Bug libc/26275] " yd-huang at outlook dot com
2020-08-11 17:30 ` yd-huang at outlook dot com
@ 2020-08-11 22:45 ` jistone at redhat dot com
2020-08-12 0:26 ` carlos at redhat dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jistone at redhat dot com @ 2020-08-11 22:45 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26275
Josh Stone <jistone at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jistone at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libc/26275] abort(3) is not signal-safe
2020-07-22 4:31 [Bug libc/26275] New: abort(3) is not signal-safe yd-huang at outlook dot com
` (2 preceding siblings ...)
2020-08-11 22:45 ` jistone at redhat dot com
@ 2020-08-12 0:26 ` carlos at redhat dot com
2020-08-12 7:24 ` yd-huang at outlook dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: carlos at redhat dot com @ 2020-08-12 0:26 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26275
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
The manual is wrong and needs fixing.
Since glibc 2.27 we've been AS-safe in that we no longer flush.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libc/26275] abort(3) is not signal-safe
2020-07-22 4:31 [Bug libc/26275] New: abort(3) is not signal-safe yd-huang at outlook dot com
` (3 preceding siblings ...)
2020-08-12 0:26 ` carlos at redhat dot com
@ 2020-08-12 7:24 ` yd-huang at outlook dot com
2020-09-24 21:46 ` carlos at redhat dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: yd-huang at outlook dot com @ 2020-08-12 7:24 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26275
--- Comment #3 from hyd-dev <yd-huang at outlook dot com> ---
But what about the lock:
https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/abort.c;h=df98782dd7ea6c1476184a365bd9f3954f481a18;hb=refs/heads/master#l54?
Holding that lock is not signal-safe, even it is recursive. For example, a
thread is calls abort(3) and acquires the lock. Then another thread fork(2),
and the child process calls abort(3) and tries to lock the lock, leading to
deadlock.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libc/26275] abort(3) is not signal-safe
2020-07-22 4:31 [Bug libc/26275] New: abort(3) is not signal-safe yd-huang at outlook dot com
` (4 preceding siblings ...)
2020-08-12 7:24 ` yd-huang at outlook dot com
@ 2020-09-24 21:46 ` carlos at redhat dot com
2020-09-27 14:21 ` carlos at redhat dot com
2020-09-27 16:38 ` yd-huang at outlook dot com
7 siblings, 0 replies; 9+ messages in thread
From: carlos at redhat dot com @ 2020-09-24 21:46 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26275
--- Comment #4 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to hyd-dev from comment #3)
> But what about the lock:
> https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/abort.c;
> h=df98782dd7ea6c1476184a365bd9f3954f481a18;hb=refs/heads/master#l54?
> Holding that lock is not signal-safe, even it is recursive. For example, a
> thread is calls abort(3) and acquires the lock. Then another thread fork(2),
> and the child process calls abort(3) and tries to lock the lock, leading to
> deadlock.
You are correct. I missed the local lock to make abort MT-safe. In this case we
to extend the lock to coordinate with fork like we do with malloc and the stdio
locks. Let me test a quick fix.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libc/26275] abort(3) is not signal-safe
2020-07-22 4:31 [Bug libc/26275] New: abort(3) is not signal-safe yd-huang at outlook dot com
` (5 preceding siblings ...)
2020-09-24 21:46 ` carlos at redhat dot com
@ 2020-09-27 14:21 ` carlos at redhat dot com
2020-09-27 16:38 ` yd-huang at outlook dot com
7 siblings, 0 replies; 9+ messages in thread
From: carlos at redhat dot com @ 2020-09-27 14:21 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26275
--- Comment #5 from Carlos O'Donell <carlos at redhat dot com> ---
Posted for review:
https://sourceware.org/pipermail/libc-alpha/2020-September/117934.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libc/26275] abort(3) is not signal-safe
2020-07-22 4:31 [Bug libc/26275] New: abort(3) is not signal-safe yd-huang at outlook dot com
` (6 preceding siblings ...)
2020-09-27 14:21 ` carlos at redhat dot com
@ 2020-09-27 16:38 ` yd-huang at outlook dot com
7 siblings, 0 replies; 9+ messages in thread
From: yd-huang at outlook dot com @ 2020-09-27 16:38 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26275
hyd-dev <yd-huang at outlook dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yd-huang at outlook dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-09-27 16:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 4:31 [Bug libc/26275] New: abort(3) is not signal-safe yd-huang at outlook dot com
2020-07-22 4:43 ` [Bug libc/26275] " yd-huang at outlook dot com
2020-08-11 17:30 ` yd-huang at outlook dot com
2020-08-11 22:45 ` jistone at redhat dot com
2020-08-12 0:26 ` carlos at redhat dot com
2020-08-12 7:24 ` yd-huang at outlook dot com
2020-09-24 21:46 ` carlos at redhat dot com
2020-09-27 14:21 ` carlos at redhat dot com
2020-09-27 16:38 ` yd-huang at outlook dot com
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).