Bug 138065

Summary: gpart(8) dumps core
Product: Base System Reporter: Oliver Lehmann <oliver>
Component: binAssignee: freebsd-geom mailing list <geom>
Status: Closed FIXED    
Severity: Affects Only Me CC: oliver
Priority: Normal    
Version: 7.2-STABLE   
Hardware: Any   
OS: Any   

Description Oliver Lehmann freebsd_committer 2009-08-22 13:20:06 UTC
when trying to create a partition on an empty disk using gpart it segfaults
when /dev/ is added in front of the device name:

# gpart create -s GPT /dev/da2
da2 created
# gpart add -t freebsd-ufs /dev/da2
Segmentation fault (core dumped)
# gpart add -t freebsd-ufs da2
da2p1 added

it also happens when I use MBR:

# gpart delete -i 1 da2
da2p1 deleted
# gpart destroy da2
da2 destroyed
# gpart create -s MBR da2
da2 created
# gpart add -t freebsd /dev/da2
Segmentation fault (core dumped)
# gpart add -t freebsd da2
da2s1 added


This seems not occur for gmirror devices:

# swapoff /dev/mirror/gm0s1b
# gpart delete -i 2 mirror/gm0s1
mirror/gm0s1b deleted
# gpart add -b 1572864 -s 262144 -t freebsd-swap -i 2 /dev/mirror/gm0s1
mirror/gm0s1b added
# swapon /dev/mirror/gm0s1b

How-To-Repeat: - add a new single empty disk to your system
- configure this disk with gpart, prepend /dev to your devicenames
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-08-22 21:19:41 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-geom

Over to maintainer(s).
Comment 2 Marcel Moolenaar freebsd_committer 2009-08-25 03:04:51 UTC
State Changed
From-To: open->closed

Fixed in 9-CURRENT and 8.0-BETA3