Bug 718363

Summary: parted gpt crash on /dev/vda
Product: [Fedora] Fedora Reporter: Joshua Daniel Franklin <joshuadfranklin>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 15CC: bcl, hdegoede
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-07 18:03:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
output of parted crash none

Description Joshua Daniel Franklin 2011-07-01 23:47:54 UTC
Created attachment 510953 [details]
output of parted crash

Description of problem:
Attempting to create a gpt label on /dev/vda results core dump. Sounds like a big deal but in fact /dev/vda should not exist which may be a separate kernel bug. I discovered due to a errant "pre" section in my kickstart file referring to /dev/vda but in any case it's tickling some minor gpt bug in parted.


Version-Release number of selected component (if applicable):
parted 2.3 in Fedora 15 boot.iso (from e.g. http://ftp.osuosl.org/pub/fedora/linux/releases/15/Fedora/x86_64/os/images/ )

How reproducible:


Steps to Reproduce:
1. Boot Fedora 15 installer in a KVM virtual machine (I used virt-manager)
2. When installer starts, switch to shell (Ctrl-Alt-F2)
3. Run these commands:
dd if=/dev/urandom of=/dev/vda bs=512 count=64
parted -s /dev/vda mklabel gpt
parted -s /dev/vda unit mb print free

  
Actual results:
Core dump and errors including:
"Assertion (last_usable > first_usable) at gpt.c:713 in function _parse_header() failed.":


Expected results:
"No such file or directory" or anything other than a core dump.

Additional info:

Comment 1 Brian Lane 2011-07-07 18:03:11 UTC
writing random data to the device is guaranteed to cause problems. Use /dev/zero to initialize devices, not /dev/urandom