NetBSD Problem Report #58503
From bad@bsd.de Sun Jul 28 17:05:30 2024
Return-Path: <bad@bsd.de>
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 A14891A923C
for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Jul 2024 17:05:30 +0000 (UTC)
Message-Id: <20240728170522.GX9440@irregular-apocalypse.k.bsd.de>
Date: Sun, 28 Jul 2024 19:05:22 +0200
From: Christoph Badura <bad@bsd.de>
Reply-To:
To: gnats-bugs@NetBSD.org
Subject: gdb error rerunning tests/fs/nullfs/t_basic
X-Send-Pr-Version: 3.95
>Number: 58503
>Category: toolchain
>Synopsis: restarting the progamm triggers an error in gdb
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 28 17:10:00 +0000 2024
>Last-Modified: Tue Jul 30 20:15:02 +0000 2024
>Originator: Christoph Badura <bad@bsd.de>
>Release: NetBSD 10.99.11
>Organization:
Bozotic Software Testing Labs
<organization of PR author (multiple lines)>
>Environment:
<The following information is extracted from your kernel. Please>
<append output of "ldd", "ident" where relevant (multiple lines).>
System: NetBSD netbsd10 10.99.11 NetBSD 10.99.11 (GENERIC) #3: Sun Jul 28 18:09:37 CEST 2024 bad@inspiral-coalescence-ringdown:/Users/bad/netbsd-gsoc/obj/obj.amd64/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
restarting/rerunning the program caauses a gdb error:
I first noticed this in a NetBSD 10.0 VM. But a VM with -current from
sources as of 2024-07-27 show the same behaviour.
Script started on Sun Jul 28 16:37:22 2024
netbsd10$ cd /usr/tests/fs/nullfs
netbsd10$ gdb t_basic
GNU gdb (GDB) 11.0.50.20200914-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from t_basic...
(No debugging symbols found in t_basic)
(gdb) b main
Breakpoint 1 at 0x19ea
(gdb) r basic
Starting program: /usr/tests/fs/nullfs/t_basic basic
Breakpoint 1, 0x00000000cec019ea in main ()
(gdb) c
Continuing.
t_basic: WARNING: Running test cases without atf-run(1) is unsupported
t_basic: WARNING: No isolation nor timeout control is being applied; you may get unexpected failures; see atf-test-case(4)
[ 1.0000000] entropy: ready
[New LWP 581 of process 671]
[New LWP 582 of process 671]
[New LWP 1474 of process 671]
[New LWP 1644 of process 671]
[New LWP 1443 of process 671]
[New LWP 1483 of process 671]
[New LWP 1642 of process 671]
[New LWP 1450 of process 671]
[New LWP 1440 of process 671]
[New LWP 1472 of process 671]
[New LWP 1640 of process 671]
[New LWP 1441 of process 671]
[New LWP 1442 of process 671]
[New LWP 1460 of process 671]
[New LWP 1446 of process 671]
[New LWP 1468 of process 671]
[New LWP 1462 of process 671]
[New LWP 1342 of process 671]
[New LWP 1616 of process 671]
passed
[Inferior 1 (process 671) exited normally]
(gdb) r
Starting program: /usr/tests/fs/nullfs/t_basic basic
Breakpoint 1, 0x00000001848019ea in main ()
(gdb) c
Continuing.
t_basic: WARNING: Running test cases without atf-run(1) is unsupported
t_basic: WARNING: No isolation nor timeout control is being applied; you may get unexpected failures; see atf-test-case(4)
[ 1.0000000] entropy: ready
[New LWP 1348 of process 1617]
[New LWP 1627 of process 1617]
[New LWP 1626 of process 1617]
[New LWP 1623 of process 1617]
[New LWP 1613 of process 1617]
[New LWP 1608 of process 1617]
[New LWP 1628 of process 1617]
[New LWP 1622 of process 1617]
[New LWP 1467 of process 1617]
[New LWP 1387 of process 1617]
[New LWP 1579 of process 1617]
[New LWP 1445 of process 1617]
[New LWP 1609 of process 1617]
[New LWP 1615 of process 1617]
[New LWP 1463 of process 1617]
[New LWP 1337 of process 1617]
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infrun.c:7221: internal-error: [LWP 1617 of process 1617] has inconsistent state: trap_expected=1
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
This is a bug, please report it. For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infrun.c:7221: internal-error: [LWP 1617 of process 1617] has inconsistent state: trap_expected=1
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
[ 1572.9776388] sorry, pid 1617 was killed: orphaned traced process
[1] Abort trap gdb t_basic
netbsd10$ exit
Script done on Sun Jul 28 16:37:56 2024
>How-To-Repeat:
cd /usr/tests/fs/nullfs
gdb t_basic
b main
r basic
c
r
c
>Fix:
yes please.
>Audit-Trail:
From: Christoph Badura <bad@bsd.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: toolchain/58503: gdb error rerunning tests/fs/nullfs/t_basic
Date: Tue, 30 Jul 2024 22:11:05 +0200
riastradh@ asked if this possibly depends on debug information being
available.
I installed the debug set on both the -current and the 10.0 VM.
In -current the symptoms go away.
In 10.0 they persist. Also gdb bekommst unresponsive to signals.
On -current I could at least suspend gdb and then kill -9 it.
On 10.0 I need to kill -9 it from a separate terminal.
Script started on Tue Jul 30 19:51:39 2024
netbsd10$ ls /etc/mtree
NetBSD.dist set.comp set.etc set.man set.tests
set.base set.debug set.gpufw set.modules special
netbsd10$ cd /usr/tests/fs/nullfs
netbsd10$ gdb t_basic
GNU gdb (GDB) 11.0.50.20200914-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from t_basic...
Reading symbols from /usr/libdata/debug//usr/tests/fs/nullfs/t_basic.debug...
(gdb) b main
Breakpoint 1 at 0x19ea: file /usr/src/tests/fs/nullfs/t_basic.c, line 167.
(gdb) b atfu_basic_body
Breakpoint 2 at 0x1649: file /usr/src/tests/fs/nullfs/t_basic.c, line 74.
(gdb) r basic
Starting program: /usr/tests/fs/nullfs/t_basic basic
Breakpoint 1, main (argc=2, argv=0x7f7fff203ff8)
at /usr/src/tests/fs/nullfs/t_basic.c:167
167 /usr/src/tests/fs/nullfs/t_basic.c: No such file or directory.
(gdb) c
Continuing.
t_basic: WARNING: Running test cases without atf-run(1) is unsupported
t_basic: WARNING: No isolation nor timeout control is being applied; you may get unexpected failures; see atf-test-case(4)
Breakpoint 2, atfu_basic_body (tc=0x81003198 <atfu_basic_tc>)
at /usr/src/tests/fs/nullfs/t_basic.c:74
74 in /usr/src/tests/fs/nullfs/t_basic.c
(gdb) c
Continuing.
[ 1.0000000] entropy: ready
[New LWP 10093 of process 10273]
[New LWP 9947 of process 10273]
[New LWP 10476 of process 10273]
[New LWP 9894 of process 10273]
[New LWP 7883 of process 10273]
[New LWP 9668 of process 10273]
[New LWP 10148 of process 10273]
[New LWP 9181 of process 10273]
[New LWP 10179 of process 10273]
[New LWP 7915 of process 10273]
[New LWP 10301 of process 10273]
[New LWP 9639 of process 10273]
[New LWP 10449 of process 10273]
[New LWP 10445 of process 10273]
[New LWP 1346 of process 10273]
[New LWP 1374 of process 10273]
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infrun.c:7221: internal-error: [LWP 10273 of process 10273] has inconsistent state: trap_expected=1
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n
This is a bug, please report it. For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infrun.c:7221: internal-error: [LWP 10273 of process 10273] has inconsistent state: trap_expected=1
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.
(gdb) info inf
Num Description Connection Executable
* 1 process 10273 1 (native) /usr/tests/fs/nullfs/t_basic
(gdb) kill inf 1
(gdb) info inf
Num Description Connection Executable
* 1 <null> /usr/tests/fs/nullfs/t_basic
(gdb) r
Starting program: /usr/tests/fs/nullfs/t_basic basic
*hang*
^C^\^Z
#kill gdb from other session
[ 80149.1391520] sorry, pid 1512 was killed: orphaned traced process
[1] Killed gdb t_basic
netbsd10$
netbsd10$ gdb t_basic
GNU gdb (GDB) 11.0.50.20200914-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from t_basic...
Reading symbols from /usr/libdata/debug//usr/tests/fs/nullfs/t_basic.debug...
(gdb) b main
Breakpoint 1 at 0x19ea: file /usr/src/tests/fs/nullfs/t_basic.c, line 167.
(gdb) b atfu_basic_body
Breakpoint 2 at 0x1649: file /usr/src/tests/fs/nullfs/t_basic.c, line 74.
(gdb) r basic
Starting program: /usr/tests/fs/nullfs/t_basic basic
Breakpoint 1, main (argc=2, argv=0x7f7fffa090f8)
at /usr/src/tests/fs/nullfs/t_basic.c:167
167 /usr/src/tests/fs/nullfs/t_basic.c: No such file or directory.
(gdb) c
Continuing.
t_basic: WARNING: Running test cases without atf-run(1) is unsupported
t_basic: WARNING: No isolation nor timeout control is being applied; you may get unexpected failures; see atf-test-case(4)
Breakpoint 2, atfu_basic_body (tc=0xfd003198 <atfu_basic_tc>)
at /usr/src/tests/fs/nullfs/t_basic.c:74
74 in /usr/src/tests/fs/nullfs/t_basic.c
(gdb) c
Continuing.
[ 1.0000000] entropy: ready
[New LWP 10457 of process 10403]
[New LWP 6986 of process 10403]
[New LWP 10027 of process 10403]
[New LWP 10423 of process 10403]
[New LWP 10574 of process 10403]
[New LWP 7497 of process 10403]
[New LWP 7103 of process 10403]
[New LWP 10405 of process 10403]
[New LWP 8028 of process 10403]
[New LWP 10400 of process 10403]
[New LWP 10410 of process 10403]
[New LWP 10577 of process 10403]
[New LWP 8016 of process 10403]
[New LWP 10573 of process 10403]
[New LWP 1474 of process 10403]
[New LWP 9767 of process 10403]
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infrun.c:7221: internal-error: [LWP 10403 of process 10403] has inconsistent state: trap_expected=1
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n
This is a bug, please report it. For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infrun.c:7221: internal-error: [LWP 10403 of process 10403] has inconsistent state: trap_expected=1
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/tests/fs/nullfs/t_basic basic
*hang*
^C^\^Z
#kill gdb from other session
[ 80229.2985986] sorry, pid 8043 was killed: orphaned traced process
[1] Killed gdb t_basic
netbsd10$
netbsd10$ ^D
Script done on Tue Jul 30 19:54:50 2024
--chris
>Unformatted:
<Please check that the above is correct for the bug being reported,>
<and append source date of snapshot, if applicable (one line).>
(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-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.