NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/58112: daemonized rump conceals output on crash
>Number: 58112
>Category: bin
>Synopsis: daemonized rump conceals output on crash
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 04 17:20:01 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, 8, ...
>Organization:
The TestBSD Rumpdation
>Environment:
growing more extreme weather as we toast the planet
>Description:
rumpuser_daemonize -- e.g., rump_server without -s -- sends all output to /dev/null:
122 fd = open(_PATH_DEVNULL, O_RDWR);
123 if (fd == -1) {
124 error = errno;
125 goto out;
126 }
127 dup2(fd, STDIN_FILENO);
128 dup2(fd, STDOUT_FILENO);
129 dup2(fd, STDERR_FILENO);
130 if (fd > STDERR_FILENO)
131 close(fd);
https://nxr.netbsd.org/xref/src/lib/librumpuser/rumpuser_daemonize.c?r=1.8#122
That means output from kernel printf also goes to /dev/null, because with librumpuser it is printed via putchar.
That means running a rump_server in, e.g., automatic tests, such as https://nxr.netbsd.org/xref/src/tests/rump/rumpkern/t_sp.sh?r=1.17, conceals all output when it crashes, as it has been frequently doing for the t_sp:sigsafe test.
>How-To-Repeat:
cd /usr/tests/rump/rumpkern && atf-run t_sp
repeat until it fails, in some appropriate environment where it fails, e.g.:
https://releng.netbsd.org/b5reports/i386/2024/2024.04.04.09.19.42/test.html#rump_rumpkern_t_sp_sigsafe
>Fix:
Maybe we could have environment variables RUMP_STDOUT=/path/to/outfile RUMP_STDERR=/path/to/errfile which rumpuser_daemonize_begin redirects fds 1 and 2 to, if set, so that the output is captured somewhere.
Home |
Main Index |
Thread Index |
Old Index