NetBSD Problem Report #56676
From gson@gson.org Sat Jan 29 10:10:03 2022
Return-Path: <gson@gson.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))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id BBD3B1A923D
for <gnats-bugs@gnats.NetBSD.org>; Sat, 29 Jan 2022 10:10:03 +0000 (UTC)
Message-Id: <20220129100955.7843F254379@guava.gson.org>
Date: Sat, 29 Jan 2022 12:09:55 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: Soekris net4801 panics running ATF tests
X-Send-Pr-Version: 3.95
>Number: 56676
>Category: port-i386
>Synopsis: Soekris net4801 panics running ATF tests
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-i386-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 29 10:15:00 +0000 2022
>Last-Modified: Sun Mar 16 09:30:01 +0000 2025
>Originator: Andreas Gustafsson
>Release: NetBSD-current, source date 2022.01.05.01.46.28
>Organization:
>Environment:
System: NetBSD
Architecture: i386
Machine: i386
>Description:
Running the ATF tests on -current/i386 on a Soekris net4801
(this has a Geode SC1100 CPU):
lib/libc/sys/t_ptrace_wait (332/915): 403 test cases
[...]
x86_cve_2018_8897: [0.525477s] Passed.
x86_fpregs_fpu_core: [ 7959.3047800] panic: fpu trap from kernel, trapframe 0xc9cfaf4c
[ 7959.3047800] cpu0: Begin traceback...
[ 7959.3047800] vpanic(c1299eb8,c9cfaeb4,c9cfaf40,c01243f7,c1299eb8,c9cfaf4c,c9cfaf68,c16212f4,c9cfaed8,c0d572e6) at netbsd:vpanic+0x13c
[ 7959.3047800] panic(c1299eb8,c9cfaf4c,c9cfaf68,c16212f4,c9cfaed8,c0d572e6,c9cfaed8,bfb8da54,4,0) at netbsd:panic+0x18
[ 7959.3047800] fputrap(c9cfaf4c,c1b60010,30,10,c9cf0010,c2a4a880,b97d03e8,c9cfaf9c,c9cf8000,0) at netbsd:fputrap+0xf6
[ 7959.3047800] Xtrap10(c2a4a880,18e00b3,18e00ab,1f,c010001f,b959bc00,b97d03e8,bfb8d970,b97d0000,0) at netbsd:Xtrap10+0x65
[ 7959.3047800] cpu0: End traceback...
[ 7959.3047800] dumping to dev 0,1 offset 759
[ 7959.3047800] dump 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 succeeded
[ 7959.3047800] rebooting...
>How-To-Repeat:
See above.
>Fix:
>Audit-Trail:
From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-i386/56676: Soekris net4801 panics running ATF tests
Date: Sun, 16 Mar 2025 11:26:37 +0200
A recent -current (source date 2025.03.15.12.11.09) still panics
in the same place but prints a more helpful panic message:
# cd /usr/tests/lib/libc/sys
# ./t_ptrace_wait x86_fpregs_fpu_core
t_ptrace_wait: WARNING: Running test cases without atf-run(1) is unsupported
t_ptrace_wait: WARNING: No isolation nor timeout control is being applied; you may get unexpected failures; see atf-test-case(4)
[ 4257.8535135] panic: fpu trap from kernel at netbsd:fpu_handle_deferred+0x32, trapframe 0xc902df4c
[ 4257.8535135] cpu0: Begin traceback...
[ 4257.8535135] vpanic(c1388c34,c902de30,c902df40,c0131945,c1388c34,c902deb0,c902df4c,41,0,c1e44a40) at netbsd:vpanic+0x176
[ 4257.8535135] panic(c1388c34,c902deb0,c902df4c,41,0,c1e44a40,c1f175c0,0,c1e44a40,c04d2f0c) at netbsd:panic+0x18
[ 4257.8535135] fputrap(c902df4c,c2b10010,30,c9020010,c16a0010,c1f175c0,ae0663c8,c902df9c,c902b080,0) at netbsd:fputrap+0x15c
[ 4257.8535135] Xtrap10(c1f175c0,19800b3,19800ab,1f,c010001f,ade15c00,ae0663c8,bfb0e130,ae065ff4,0) at netbsd:Xtrap10+0x66
[ 4257.8535135] cpu0: End traceback...
Looks like the trap happens in the frstor instruction at the end of this
disassembly:
# gdb /netbsd
[...]
(gdb) x/100i fpu_handle_deferred
0xc01311a0 <fpu_handle_deferred>: push %ebp
0xc01311a1 <fpu_handle_deferred+1>: mov %esp,%ebp
0xc01311a3 <fpu_handle_deferred+3>: push %ebx
0xc01311a4 <fpu_handle_deferred+4>: sub $0xc,%esp
0xc01311a7 <fpu_handle_deferred+7>: mov %fs:0x8c0,%ecx
0xc01311ae <fpu_handle_deferred+14>: mov 0xc16c3320,%eax
0xc01311b3 <fpu_handle_deferred+19>: mov 0xc16c3324,%edx
0xc01311b9 <fpu_handle_deferred+25>: mov 0x20(%ecx),%ebx
0xc01311bc <fpu_handle_deferred+28>: sub $0xffffff80,%ebx
0xc01311bf <fpu_handle_deferred+31>: clts
0xc01311c1 <fpu_handle_deferred+33>: mov 0xc16c332c,%ecx
0xc01311c7 <fpu_handle_deferred+39>: cmp $0x1,%ecx
0xc01311ca <fpu_handle_deferred+42>: je 0xc01311f4 <fpu_handle_deferred+84>
0xc01311cc <fpu_handle_deferred+44>: jg 0xc01311da <fpu_handle_deferred+58>
0xc01311ce <fpu_handle_deferred+46>: test %ecx,%ecx
0xc01311d0 <fpu_handle_deferred+48>: jne 0xc01311d4 <fpu_handle_deferred+52>
0xc01311d2 <fpu_handle_deferred+50>: frstor (%ebx)
[...]
--
Andreas Gustafsson, gson@gson.org
(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.