Description of problem: Create a disk with a zero-length partition, eg run this command as non-root: $ guestfish -N disk -- \ part-init /dev/sda mbr : \ part-add /dev/sda p 1 8191 : \ part-add /dev/sda p 8192 8192 The output is a disk image called "test1.img" in the current directory. Note that the second partition starts and ends on the same sector, thus has zero length. fdisk correctly interprets this disk image: $ fdisk -l test1.img Disk test1.img: 104 MB, 104857600 bytes 255 heads, 63 sectors/track, 12 cylinders, total 204800 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00029d91 Device Boot Start End Blocks Id System test1.img1 1 8191 4095+ 83 Linux test1.img2 8192 8192 0+ 83 Linux The 'parted /dev/vda print' command fails with a stack trace on this image: $ parted test1.img print WARNING: You are not superuser. Watch out for permissions. Backtrace has 14 calls on stack: 14: /lib64/libparted.so.1(ped_assert+0x2e) [0x30c760d07e] 13: /lib64/libparted.so.1(ped_geometry_read+0x80) [0x30c7613920] 12: /lib64/libparted.so.1(ped_geometry_read_alloc+0x54) [0x30c76139b4] 11: /lib64/libparted.so.1(nilfs2_probe+0x6a) [0x30c761ceea] 10: /lib64/libparted.so.1(ped_file_system_probe_specific+0x53) [0x30c760e543] 9: /lib64/libparted.so.1(ped_file_system_probe+0x4d) [0x30c760e61d] 8: /lib64/libparted.so.1() [0x30c762080c] 7: /lib64/libparted.so.1() [0x30c7621545] 6: /lib64/libparted.so.1(ped_disk_new+0x58) [0x30c76125c8] 5: parted() [0x4069c1] 4: parted(non_interactive_mode+0x8c) [0x40ba6c] 3: parted(main+0xe0f) [0x4059bf] 2: /lib64/libc.so.6(__libc_start_main+0xed) [0x335c42150d] 1: parted() [0x405a89] I also checked and it fails in the same way if you attach the disk image to a VM and run parted as root inside the VM. Version-Release number of selected component (if applicable): parted-3.0-2.fc16.x86_64 How reproducible: 100% Steps to Reproduce: 1. As above. 2. 3.
Was there an assertion print included with the traceback? It is calling ped_assert so it should be printing why along with the block of text about how to file a parted bug.
There was nothing else printed except what is above. However I have compiled parted from git (99f9c6a), and here is the full stack trace from gdb: $ libtool --mode=execute gdb --args ./parted/parted /tmp/test1.img print GNU gdb (GDB) Fedora (7.2.90.20110525-38.fc15) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/rjones/d/parted/parted/.libs/lt-parted...done. (gdb) run Starting program: /home/rjones/d/parted/parted/.libs/lt-parted /tmp/test1.img print warning: the debug information found in "/usr/lib/debug//lib64/libuuid.so.1.3.0.debug" does not match "/lib64/libuuid.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/lib64/libuuid.so.1.3.0.debug" does not match "/lib64/libuuid.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/libdevmapper.so.1.02.debug" does not match "/lib64/libdevmapper.so.1.02" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/lib64/libdevmapper.so.1.02.debug" does not match "/lib64/libdevmapper.so.1.02" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/libblkid.so.1.1.0.debug" does not match "/lib64/libblkid.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/lib64/libblkid.so.1.1.0.debug" does not match "/lib64/libblkid.so.1" (CRC mismatch). [Thread debugging using libthread_db enabled] WARNING: You are not superuser. Watch out for permissions. Backtrace has 14 calls on stack: 14: /home/rjones/d/parted/libparted/.libs/libparted.so.1(ped_assert+0x2e) [0x7ffff7dbfe7e] 13: /home/rjones/d/parted/libparted/.libs/libparted.so.1(ped_geometry_read+0x80) [0x7ffff7dc66c0] 12: /home/rjones/d/parted/libparted/.libs/libparted.so.1(ped_geometry_read_alloc+0x54) [0x7ffff7dc6754] 11: /home/rjones/d/parted/libparted/.libs/libparted.so.1(nilfs2_probe+0x6a) [0x7ffff7dcfa2a] 10: /home/rjones/d/parted/libparted/.libs/libparted.so.1(ped_file_system_probe_specific+0x53) [0x7ffff7dc1323] 9: /home/rjones/d/parted/libparted/.libs/libparted.so.1(ped_file_system_probe+0x4d) [0x7ffff7dc13fd] 8: /home/rjones/d/parted/libparted/.libs/libparted.so.1(+0x207c4) [0x7ffff7dd37c4] 7: /home/rjones/d/parted/libparted/.libs/libparted.so.1(+0x21035) [0x7ffff7dd4035] 6: /home/rjones/d/parted/libparted/.libs/libparted.so.1(ped_disk_new+0x58) [0x7ffff7dc5368] 5: /home/rjones/d/parted/parted/.libs/lt-parted() [0x4068e1] 4: /home/rjones/d/parted/parted/.libs/lt-parted(non_interactive_mode+0x8c) [0x40b7fc] 3: /home/rjones/d/parted/parted/.libs/lt-parted(main+0xe0f) [0x4058ef] 2: /lib64/libc.so.6(__libc_start_main+0xed) [0x335c42150d] 1: /home/rjones/d/parted/parted/.libs/lt-parted() [0x4059b5] Program received signal SIGABRT, Aborted. 0x000000335c436305 in raise () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install device-mapper-libs-1.02.65-3.fc16.x86_64 glibc-2.14.90-1.x86_64 libblkid-2.19.1-2.fc16.x86_64 libuuid-2.19.1-2.fc16.x86_64 ncurses-libs-5.9-2.20110716.fc16.x86_64 (gdb) bt #0 0x000000335c436305 in raise () from /lib64/libc.so.6 #1 0x000000335c437c1b in abort () from /lib64/libc.so.6 #2 0x00007ffff7dbff31 in ped_assert (cond_text=0x7ffff7de711a "offset >= 0", file=0x7ffff7de70f4 "cs/geom.c", line=295, function=0x7ffff7de7340 "ped_geometry_read") at debug.c:111 #3 0x00007ffff7dc66c0 in ped_geometry_read (geom=<optimized out>, buffer=<optimized out>, offset=<optimized out>, count=<optimized out>) at cs/geom.c:295 #4 0x00007ffff7dc6754 in ped_geometry_read_alloc (geom=0x634e68, buffer=0x7fffffffdaf8, offset=-8, count=1) at cs/geom.c:316 #5 0x00007ffff7dcfa2a in nilfs2_probe (geom=0x634e68) at nilfs2.c:122 #6 0x00007ffff7dc1323 in ped_file_system_probe_specific ( fs_type=0x7ffff7ff76e0, geom=0x634e68) at filesys.c:208 #7 0x00007ffff7dc13fd in ped_file_system_probe (geom=0x634e68) at filesys.c:278 #8 0x00007ffff7dd37c4 in read_table (disk=0x62c650, sector=0, is_extended_table=0) at dos.c:1015 #9 0x00007ffff7dd4035 in msdos_read (disk=0x62c650) at dos.c:1071 #10 0x00007ffff7dc5368 in ped_disk_new (dev=0x62b740) at disk.c:199 #11 0x00000000004068e1 in do_print (dev=0x7fffffffdf48) at parted.c:944 #12 0x000000000040b7fc in non_interactive_mode (dev=0x7fffffffdf48, cmd_list=<optimized out>, argc=<optimized out>, argv=0x7fffffffe078) at ui.c:1608 ---Type <return> to continue, or q <return> to quit--- #13 0x00000000004058ef in main (argc=1, argv=0x7fffffffe078) at parted.c:1999
Created attachment 517264 [details] test1.img.xz Attached is the disk image which causes the error. You will have to uncompress it first using the 'unxz' command.
Thanks. Looks like the nilfs2_probe doesn't deal with partitions shorter than 8 blocks very well.
*** Bug 734440 has been marked as a duplicate of this bug. ***
I am seeing this as well: [anaconda root@(none) root]# parted -l /dev/sda Error: /dev/sda: unrecognised disk label Model: AIX VDASD (scsi) Disk /dev/sda: 32.2GB Sector size (logical/physical): 512B/512B Partition Table: unknown Model: Linux device-mapper (snapshot) (dm) Disk /dev/mapper/live-rw: 2147MB Sector size (logical/physical): 512B/512B Partition Table: loop Number Start End Size File system Flags 1 0.00B 2147MB 2147MB ext4 Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only. Warning: The driver descriptor says the physical block size is 512 bytes, but Linux says it is 2048 bytes. Ignore/Cancel? i Backtrace has 13 calls on stack: 13: /lib64/libparted.so.1(ped_assert-0x56d48) [0xfff9801b850] 12: /lib64/libparted.so.1(ped_geometry_read-0x4e670) [0xfff98024908] 11: /lib64/libparted.so.1(ped_geometry_read_alloc-0x4e5d0) [0xfff980249b8] 10: /lib64/libparted.so.1(nilfs2_probe-0x43e84) [0xfff9802fb14] 9: /lib64/libparted.so.1(ped_file_system_probe_specific-0x55154) [0xfff9801d6e4] 8: /lib64/libparted.so.1(ped_file_system_probe-0x55064) [0xfff9801d7e4] 7: /lib64/libparted.so.1(+0x3dd5c) [0xfff9803dd5c] 6: /lib64/libparted.so.1(ped_disk_new-0x4fe90) [0xfff98022f48] 5: parted() [0x100076a8] 4: parted() [0x10008284] 3: parted(main-0x2a9b0) [0x100061a0] 2: /lib64/libc.so.6(+0x51ec8) [0xfff97db1ec8] 1: /lib64/libc.so.6(__libc_start_main-0x16ebf4) [0xfff97db20bc] Aborted (core dumped) [anaconda root@(none) root]# fdisk -l /dev/sda Disk /dev/sda: 32.2 GB, 32212254720 bytes 64 heads, 32 sectors/track, 30720 cylinders, total 62914560 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sda doesn't contain a valid partition table
[anaconda root@(none) root]# parted /dev/sda print Error: /dev/sda: unrecognised disk label Model: AIX VDASD (scsi) Disk /dev/sda: 32.2GB Sector size (logical/physical): 512B/512B Partition Table: unknown
Created attachment 526297 [details] First few sectors of sda dd if=/dev/sda of=disk.img bs=512 count=34
The following kickstart file will certainly reproduce it. It doesn't if the system has successfully installed during a previous manual install or not. # Kickstart file automatically generated by anaconda. #version=DEVEL install #cdrom url --url=http://ppc.koji.fedoraproject.org/mash/16/ppc64/os/ lang en_US.UTF-8 keyboard us network --onboot yes --device eth0 --bootproto=static --ip=9.5.250.145 --netmask=255.255.255.0 --gateway=9.5.250.1 --nameserver=9.10.244.100 --hostname=sharpie.rchland.ibm.com --noipv6 timezone --utc America/Chicago rootpw --iscrypted password selinux --enforcing authconfig --enableshadow --passalgo=sha512 firewall --service=ssh --service=http # The following is the partition information you requested # Note that any partitions you deleted are not expressed # here so unless you clear all partitions first, this is # not guaranteed to work clearpart --all --drives=sda part pv.008003 --grow --size=500 volgroup VolGroup --pesize=32768 pv.008003 logvol swap --name=lv_swap --vgname=VolGroup --grow --size=1024 --maxsize=6096 logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup --grow --size=1024 --maxsize=51200 part /boot --fstype=ext4 --size=500 part prepboot --fstype=prepboot --size=4 bootloader --location=partition --timeout=5 %packages @base @core %end
Could you give this scratch build a try? http://koji.fedoraproject.org/koji/taskinfo?taskID=3409804
(In reply to comment #10) > Could you give this scratch build a try? > > http://koji.fedoraproject.org/koji/taskinfo?taskID=3409804 This works for us, Brian! Thanks.
I'm super-busy, but happy to go with comment 11's confirmation. Even better if it works with the disk image in comment 3, which is what I would do to test it anyway.
parted-3.0-3.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/parted-3.0-3.fc16
parted-3.0-3.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.