NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/59289: atf should report more detailed signal info on crash
>Number: 59289
>Category: bin
>Synopsis: atf should report more detailed signal info on crash
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Apr 13 15:00:00 +0000 2025
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetATF Foundasignal
>Environment:
>Description:
When a test program terminates on a signal, atf just prints the signal number, e.g.:
Test case: lib/libc/regex/t_exhaust/regcomp_too_big
Duration: 26.751680 seconds
Termination reason
FAILED: Test program received signal 9
https://releng.netbsd.org/b5reports/evbarm-aarch64/2025/2025.04.11.23.57.21/test.html#lib_libc_regex_t_exhaust_regcomp_too_big
It would be nice if it additionally printed:
- the identifier of the signal (SIGKILL, in this case, for those of us who can't remember the numbers -- OK, I remember 9 is SIGKILL, but not the other ones)
- the short description of the signal (SIGKILL is `Killed'; SIGFPE is `Floating-point exception'; &c.)
- relevant information from the siginfo_t
>How-To-Repeat:
browse atf reports with terse signal termination information
>Fix:
Yes, please!
The identifier is available (minus the `SIG' prefix) via signalname(3) in NetBSD, or via sig2str in POSIX.1-2024 (not yet implemented in NetBSD):
https://man.NetBSD.org/signalname.3
https://pubs.opengroup.org/onlinepubs/9799919799/functions/sig2str.html
The short description is available via the array sys_siglist of length sys_nsiglist, indexed by the signal number, in NetBSD. Not sure if there's any portable analogue of this.
https://man.netbsd.org/sys_siglist.3
The siginfo_t is more elaborate and documentd in the siginfo(3) man page:
https://man.netbsd.org/siginfo.2
This is helpful for quickly identifying types of crashes, like alignment errors vs hardware mapping errors, unmapped access vs forbidden access, &c., and at what address the error happened.
Home |
Main Index |
Thread Index |
Old Index