Hide Forgot
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.
Created attachment 557978 [details] core dumped with parted segfault
I'm running the above commands as root, against /root/disk.img
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
Can you reproduce this on another machine or in a virt?
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.
Feel free to reopen if you can find a consistent reproducer.