Bug 239053 - devel/gdb: kgdb -n ... does not work automatically with compressed core dumps
Summary: devel/gdb: kgdb -n ... does not work automatically with compressed core dumps
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-08 21:21 UTC by Navdeep Parhar
Modified: 2022-09-27 22:25 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Navdeep Parhar freebsd_committer freebsd_triage 2019-07-08 21:21:26 UTC
When compressed core dumps are enabled the vmcore file is generated with a
.zst extension.  kgdb -n seems to have problems dealing with this.

# grep dump /etc/rc.conf
dumpdev="AUTO"
dumpon_flags="-Z"

# ls -l /var/crash
total 374612
-rw-r--r--  1 root  wheel          2 Jul  1 15:25 bounds
-rw-r--r--  1 root  wheel      81324 Jul  1 15:26 core.txt.3
-rw-------  1 root  wheel        449 Jul  1 15:25 info.3
lrwxr-xr-x  1 root  wheel          6 Jul  1 15:25 info.last@ -> info.3
-rw-r--r--  1 root  wheel          5 May 24 00:12 minfree
drwxr-xr-x  2 root  wheel          2 May 31 21:36 procs/
-rw-------  1 root  wheel  426533590 Jul  1 15:25 vmcore.3.zst
lrwxr-xr-x  1 root  wheel         12 Jul  1 15:25 vmcore.last.zst@ -> vmcore.3.zst

# kgdb -n last
kgdb: /var/crash/vmcore.last: No such file or directory
# kgdb -n 3
kgdb: /var/crash/vmcore.3: No such file or directory
# kgdb -n last.zst
kgdb: /var/crash/info.last.zst: No such file or directory
kgdb: couldn't find a suitable kernel image
Comment 1 Miroslav Lachman 2022-09-13 07:24:54 UTC
Even if this issue is 3 years old I can confirm this problem. I tried to debug kernel today and compressed vmcore files with zst extension cannot be debug in an usual way
Comment 2 Mitchell Horne freebsd_committer freebsd_triage 2022-09-13 14:47:59 UTC
kgdb(1) now exists outside of the base system, so moving this to Ports & Packages.

From what I see this is a feature request. You are expected to decompress the core before it will be usable by kgdb. As far as I'm aware, regular gdb(1) doesn't support reading from gzipped or zstd compressed core files.