Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 785316

Summary: parted seg faults on a disk image
Product: Red Hat Enterprise Linux 6 Reporter: Brian Brock <bbrock>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-03 21:39:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
core dumped with parted segfault none

Description Brian Brock 2012-01-27 23:39:41 UTC
Description of problem:
parted seg faults on disk images

Version-Release number of selected component (if applicable):

parted-2.1-17.el6.x86_64
kernel 2.6.32-220.el6.x86_64
rhel 6.2


How reproducible:
reliably

Steps to Reproduce:
1. dd if=/dev/zero of=/root/disk.img bs=1k count=1k
2. parted [-s] /root/disk.img mklabel [further options yield same result]

  
Actual results:
# parted /root/disk.img mklabel gpt
Backtrace has 8 calls on stack:
  8: /lib64/libparted-2.1.so.0(ped_assert+0x31) [0x3c65211fb1]
  7: /lib64/libparted-2.1.so.0() [0x3c65242791]
  6: /lib64/libparted-2.1.so.0(ped_disk_new+0x75) [0x3c65219165]
  5: parted() [0x408e34]
  4: parted(non_interactive_mode+0x8c) [0x40c73c]
  3: parted(main+0x63) [0x40aaa3]
  2: /lib64/libc.so.6(__libc_start_main+0xfd) [0x3c64e1ecdd]
  1: parted() [0x404f49]
Aborted (core dumped)

there is no other error message.  No oops or panic.



Expected results:
parted to succeed or print an error message, not seg fault and dump core.

bug seems at least superficially similar to bz 587543 but that bug has errors that I'm not seeing, and a different backtrace.

Comment 1 Brian Brock 2012-01-27 23:41:50 UTC
Created attachment 557978 [details]
core dumped with parted segfault

Comment 2 Brian Brock 2012-01-27 23:42:35 UTC
I'm running the above commands as root, against /root/disk.img

Comment 4 Brian Lane 2012-01-28 00:25:41 UTC
I can't reproduce this. It works fine on rhel6.2 x86_64 for me.

It is hitting ped_assert so there should be more text there, including a message about reporting the bug.

[root@cameras ~]# dd if=/dev/zero of=disk.img bs=1k count=1k
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.0233233 s, 45.0 MB/s
[root@cameras ~]# parted -s disk.img mklabel gpt
[root@cameras ~]# parted -s disk.img u s p
Model:  (file)
Disk /root/disk.img: 2048s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

Comment 5 Brian Lane 2012-01-30 20:46:58 UTC
Can you reproduce this on another machine or in a virt?

Comment 6 Brian Brock 2012-01-31 20:16:56 UTC
I had a typo in my script.  dd using disk.img and parted using drive.img

So, the seg fault occurs on a disk image that was generated another way, or was somehow altered.  For starters, it's not a sparse file.  

I don't think it should seg fault, but it's also not as severe as I originally thought.

I'll find a reproducible case and post more info.

Comment 7 Brian Lane 2012-02-03 21:39:54 UTC
Feel free to reopen if you can find a consistent reproducer.