[DragonFlyBSD - Bug #3463] (Resolved) kgdb shows no threads and kvm(3) tools fail on crash dumps since nlist(3) sync
liweitianux
bugtracker-admin at leaf.dragonflybsd.org
Sun Nov 8 05:53:44 PST 2026
Issue #3463 has been updated by liweitianux.
Status changed from New to Resolved
Patch merged. Thanks.
----------------------------------------
Bug #3463: kgdb shows no threads and kvm(3) tools fail on crash dumps since nlist(3) sync
http://bugs.dragonflybsd.org/issues/3463#change-14949
* Author: tuxillo
* Status: Resolved
* Priority: Normal
* Target version: 6.6
* Start date: 2026-11-07
----------------------------------------
Since 49479ff7b7 ("nlist(3): Sync with FreeBSD"), nlist(3) matches
symbol names exactly and no longer treats "_foo" as "foo". When reading
a kernel image, kvm_nlist() passes the names to __fdnlist() unchanged,
and almost every consumer in base still asks for a.out-style "_foo"
names. As a result, nothing that reads a crash dump works any more:
<pre>
# kgdb kern.0 vmcore.0
No registers.
# ps -M vmcore.0 -N kern.0
ps: _nprocs: no such symbol
# vmstat -M vmcore.0 -N kern.0
vmstat: undefined symbols: _boottime _nchstats _kmemstatistics ...
</pre>
fstat, pstat, dmesg, netstat, ipcs and nfsstat fail the same way with
-M/-N, and crashinfo's core.txt has no backtrace. Live systems are not
affected, because the kldsym(2) path in kvm_nlist() strips one leading
underscore.
FreeBSD hit the same problem after its nlist(3) rework and fixed the
callers in cdfc673811ac ("various: Fix nlist invocations"). Our sync
did not include that commit.
Proposed fix: drop the leading underscore in all base consumers
(libkvm, libkcore, kgdb, the -M/-N tools, test/debug), as FreeBSD did.
The patch is ready (44 files, name changes only). Tested against a
real vmcore: kgdb lists the threads and backtraces the panic, and the
tools above work with -M/-N.
Version: 6.5-DEVELOPMENT, master since 2026-10-07.
---Files--------------------------------
nlist.diff (24.8 KB)
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list