NetBSD Problem Report #58748
From www@netbsd.org Sat Oct 12 21:24:57 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 834A41A923D
for <gnats-bugs@gnats.NetBSD.org>; Sat, 12 Oct 2024 21:24:57 +0000 (UTC)
Message-Id: <20241012212456.1CB5C1A923E@mollari.NetBSD.org>
Date: Sat, 12 Oct 2024 21:24:56 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: atf should have a background process supervisor
X-Send-Pr-Version: www-1.0
>Number: 58748
>Category: toolchain
>Synopsis: atf should have a background process supervisor
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Oct 12 21:25:00 +0000 2024
>Last-Modified: Thu Nov 06 15:30:01 +0000 2025
>Originator: Taylor R Campbell
>Release: current
>Organization:
The NetBSD Foundatfzombies
>Environment:
>Description:
We have a lot of tests that:
1. run a daemon in the background, such as a rump server or an http server;
2. do various tests that interact with the daemon; and then
3. on cleanup, kill the daemon via pidfile or something.
And we have some long-standing PRs about tests that fail to clean up after themselves because this process is not actually very reliable:
https://gnats.netbsd.org/48892 some tests will not clean up rump server processes
https://gnats.netbsd.org/56770 rump threxec test randomly hangs the rump server process
We should
>How-To-Repeat:
write and diagnose broken tests that use daemons
>Fix:
Teach atf-run to spawn subprocesses on request (in a process group or session or whatever), with an intermediate process whose only job is to send SIGKILL to the subprocesses on exit.
There should be a new ATF API call in C that works like posix_spawn, and a new ATF API call in sh that takes a command line and executes it as a daemon. It should also have some way to coordinate with daemon processes so that it doesn't return until the daemon has finished setup, e.g. binding to sockets.
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58748 CVS commit: src/lib/libc/arch
Date: Thu, 6 Nov 2025 10:25:19 -0500
Module Name: src
Committed By: christos
Date: Thu Nov 6 15:25:19 UTC 2025
Modified Files:
src/lib/libc/arch/i386/sys: __clone.S __syscall.S __vfork14.S brk.S
ptrace.S sbrk.S syscall.S
src/lib/libc/arch/x86_64/sys: __clone.S __vfork14.S brk.S ptrace.S
sbrk.S
Log Message:
PR/58748: Use '_SYSCALL_ERR' instead of 'jmp CERROR' for the hand-crafted
system calls (the regular system calls do this already). This is a noop
for amd64 and it is done for cosmetic reasons, but for i386 it produces
correct pic code.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/i386/sys/__clone.S
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/i386/sys/__syscall.S
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/i386/sys/__vfork14.S
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/arch/i386/sys/brk.S
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/arch/i386/sys/ptrace.S
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/arch/i386/sys/sbrk.S
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/i386/sys/syscall.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/x86_64/sys/__clone.S \
src/lib/libc/arch/x86_64/sys/brk.S src/lib/libc/arch/x86_64/sys/sbrk.S
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/x86_64/sys/__vfork14.S
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/x86_64/sys/ptrace.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.