Bug 785316 - parted seg faults on a disk image
Summary: parted seg faults on a disk image
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: parted
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Brian Lane
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-27 23:39 UTC by Brian Brock
Modified: 2012-02-03 21:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-03 21:39:54 UTC
Target Upstream Version:


Attachments (Terms of Use)
core dumped with parted segfault (668.00 KB, application/octet-stream)
2012-01-27 23:41 UTC, Brian Brock
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.