NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/55967: savecore(8) needs a ``-D dumpdev'' option
>Number: 55967
>Category: bin
>Synopsis: savecore(8) needs a ``-D dumpdev'' option
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Jan 31 20:45:00 +0000 2021
>Originator: Paul Goyette
>Release: NetBSD 9.99.79
>Organization:
+--------------------+--------------------------+-----------------------+
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost |
+--------------------+--------------------------+-----------------------+
>Environment:
System: NetBSD speedy.whooppee.com 9.99.79 NetBSD 9.99.79 (SPEEDY 2021-01-25 22:34:21 UTC) #0: Tue Jan 26 07:24:41 UTC 2021 paul%speedy.whooppee.com@localhost:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/SPEEDY amd64
Architecture: x86_64
Machine: amd64
>Description:
When using savecore(8) to copy a kernel core dump created by a
version of NetBSD other than the current running kernel, it can
fail to determine the correct dump device.
When the kernel that created the core dump has no ``dump on dev''
clause in its configuration file's config line, and you use the
``-N kernel'' option, savecore reads the dumpdev's major/minor
from the kernel file and gets 0/0. It then attempts to look-up
that major/minor and finds /dev/console !!! Subsequent checks
explicity disallow this, and produce an error message instructing
the user to "override kernel" (even though the kernel has already
been overridden with the -N option).
>How-To-Repeat:
1. Build an old-kernel (ie, 9.99.78) with ``config netbsd root on
? type ffs''
2. Build a new-kernel (ie, 9.99.79)
3. Boot old-kernel, and install a dumpdev (with ``swapctl -D ...'')
4. Force the old-kernel to crash, and write a core dump
5. Reboot, this time using new-kernel.
6. Attempt to grab the core-dump using
savecore -f -N new-kernel
7. Observe the error message
Note that the core dump can still be retrieved by rebooting with
the old-kernel in single-user mode, and then execute savecore(8)
without the -N option.
>Fix:
I started to look into this, and got as far as reading the
dump header, but then it always seemed to get the dumpbytes
counter as zero, so did not copy any dump content. :( I
got lost trying to figure it out.
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index