Bug 138065 - gpart(8) dumps core
Summary: gpart(8) dumps core
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 7.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-geom mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-22 13:20 UTC by Oliver Lehmann
Modified: 2009-08-25 03:05 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 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