NetBSD Problem Report #59321
From www@netbsd.org Fri Apr 18 19:42:27 2025
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)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 286B61A9239
for <gnats-bugs@gnats.NetBSD.org>; Fri, 18 Apr 2025 19:42:27 +0000 (UTC)
Message-Id: <20250418194225.D73771A923D@mollari.NetBSD.org>
Date: Fri, 18 Apr 2025 19:42:25 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: t_npf tests are failing
X-Send-Pr-Version: www-1.0
>Number: 59321
>Category: port-sparc
>Synopsis: t_npf tests are failing
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-sparc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Apr 18 19:45:00 +0000 2025
>Last-Modified: Tue Apr 22 01:35:01 +0000 2025
>Originator: Taylor R Campbell
>Release: current
>Organization:
The NpfBSparcD Garbage Collection
>Environment:
>Description:
Test case: net/npf/t_npf/npf_gc
Duration: 1.301332 seconds
Termination reason
FAILED: atf-check failed; see the output of the test for details
Standard output stream
Executing command [ npfctl debug -c /usr/tests/net/npf/npftest.conf -o ./npf.plist ]
Executing command [ npftest -c npf.plist -T gc ]
Standard error stream
Fail: program did not exit cleanly
stdout:
[ 1.0000000] entropy: ready
[ 1.1400050] panic: kernel diagnostic assertion "((uintptr_t)(__al_ptr) & (sizeof(*(__al_ptr)) - 1)) == 0" failed: file "/tmp/build/2025.04.17.20.02.32-sparc/src/usr.sbin/npf/npftest/libnpftest/../../../../sys/rump/../sys/atomic.h", line 499
[ 1.1400050] rump kernel halting...
halted
stderr:
https://releng.netbsd.org/b5reports/sparc/2025/2025.04.17.20.02.32/test.html#net_npf_t_npf_npf_gc
Unfortunately, there is no stack trace. Should maybe teach t_npf.sh to check for npfctl.core and get a stack trace with gdb if it exists.
This has been failing for at least a month -- I didn't check to see how far back it goes (likely it goes back to the introduction of the assertion in atomic_load_*, or the use of atomic_load_* in npf, but the underlying bug goes back further and was only unearthed by those changes):
https://releng.netbsd.org/b5reports/sparc/2025/2025.03.01.18.21.49/test.html#net_npf_t_npf_npf_gc
>How-To-Repeat:
cd /usr/tests/net/npf
atf-run t_npf | atf-report
>Fix:
Yes, please!
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59321 CVS commit: src/tests/net/npf
Date: Fri, 18 Apr 2025 20:06:39 +0000
Module Name: src
Committed By: riastradh
Date: Fri Apr 18 20:06:39 UTC 2025
Modified Files:
src/tests/net/npf: t_npf.sh
Log Message:
t_npf: Print a stack trace with gdb if it dumps core.
Based on net_common.sh.
PR port-sparc/59321: t_npf tests are failing
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/net/npf/t_npf.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59321 CVS commit: src/sys/sys
Date: Tue, 22 Apr 2025 01:34:38 +0000
Module Name: src
Committed By: riastradh
Date: Tue Apr 22 01:34:38 UTC 2025
Modified Files:
src/sys/sys: atomic.h
Log Message:
sys/atomic.h: Fix hashlocked atomic stores, e.g. on sparc and hppa.
Casting (uint32_t *)p does not actually round p down to a mulitple of
sizeof(uint32_t)! Oops.
Likely fix for:
PR port-sparc/59321: t_npf tests are failing
and probably various other sparc and hppa issues. (I have not been
able to reproduce this failure, but the evidence from the assertion
output is that the atomic_load_* calls are coming from inside the
atomic.h house -- and there are only two of those outside macro
expansions, and they're both in __do_atomic_store.)
Now it would be nice if the stack trace went a little further than
the kern_assert call so I didn't have to puzzle over that one to
figure out where it was coming from...
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/atomic.h
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.