Bug 190784 - gpart crash after drive removed
Summary: gpart crash after drive removed
Status: New
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 mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-08 04:06 UTC by ari
Modified: 2015-12-13 22:50 UTC (History)
1 user (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?