Bug 190784 - gpart crash after drive removed
Summary: gpart crash after drive removed
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-08 04:06 UTC by ari
Modified: 2023-12-06 15:51 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ari 2014-06-08 04:06:18 UTC
This is reproducible by me on three different RELEASE-10.0 systems. How to reproduce:

--> Remove a disk (eg. by unplugging SATA)
# gpart show
Segmentation fault (core dumped)

# gdb /sbin/gpart /tmp/gpart.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `gpart'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libgeom.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libgeom.so.5
Reading symbols from /lib/libsbuf.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libsbuf.so.6
Reading symbols from /lib/libbsdxml.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libbsdxml.so.4
Reading symbols from /lib/libutil.so.9...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.9
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /lib/geom/geom_part.so...(no debugging symbols found)...done.
Loaded symbols for /lib/geom/geom_part.so
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000801160623 in strtoimax_l () from /lib/libc.so.7


I don't have src on these machines to easily rebuild gpart in debug, so hopefully the above reference is enough to locate the bug.

The above dump was from a machine on 10.0-RELEASE-p4 using freebsd-update binary release mechanism.
Comment 1 heliocentric 2015-12-13 22:50:39 UTC
Can you reproduce this on 10.2? If so can you attach the dmesg containing the boot messages, the dmesg after device removal, and the output of sysctl -b kern.geom.confxml?
Comment 2 Ed Maste freebsd_committer freebsd_triage 2023-12-06 15:51:27 UTC
I am sorry that this issue was not resolved while it was current. FreeBSD 10.x is now well past EOL and additional requested information was not provided, so closing.

If this issue occurs again please open a new PR with the additional diagnostic information.