Bug 479588 - parted-1.8.8-8.fc10 crashes trying to print GPT disk label
parted-1.8.8-8.fc10 crashes trying to print GPT disk label
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Joel Andres Granados
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-01-11 14:37 EST by Debarshi Ray
Modified: 2009-06-12 08:15 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-12 08:15:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Debarshi Ray 2009-01-11 14:37:53 EST
Description of problem:

Parted crashes when trying to print out a GPT disk label on a pen drive. This is not encountered on other disk labels (eg., msdos, sun).

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


Steps to Reproduce:

1. Create a GPT disk label using parted's mklabel command.
2. Try to print out the newly created disk label using parted's print command.

Actual results:

[root@ginger ~]# gdb parted
GNU gdb Fedora (6.8-29.fc10)
Copyright (C) 2008 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"...
(gdb) run /dev/sdc
Starting program: /sbin/parted /dev/sdc
GNU Parted 1.8.8
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
*** glibc detected *** /sbin/parted: double free or corruption (out): 0x000000000083a2c0 ***
======= Backtrace: =========
======= Memory map: ========
Program received signal SIGABRT, Aborted.
0x0000003221632f05 in raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
Missing separate debuginfos, use: debuginfo-install device-mapper-libs-1.02.27-7.fc10.x86_64 libgcc-4.3.2-7.x86_64
(gdb) bt
#0  0x0000003221632f05 in raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x0000003221634a73 in abort () at abort.c:88
#2  0x0000003221672438 in __libc_message (do_abort=2, 
    fmt=0x322173c428 "*** glibc detected *** %s: %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:170
#3  0x0000003221677ec8 in malloc_printerr (action=2, 
    str=0x322173c510 "double free or corruption (out)", 
    ptr=<value optimized out>) at malloc.c:5994
#4  0x000000322167a486 in __libc_free (mem=0x3221732880) at malloc.c:3625
#5  0x000000322224077f in pth_free (pth=0x83a250) at gpt.c:328
#6  0x00000032222414e3 in gpt_read (disk=0x838570) at gpt.c:954
#7  0x0000003222215aea in ped_disk_new (dev=0x833920) at disk.c:209
#8  0x0000000000406c2c in do_print (dev=0x7fffffffe638) at parted.c:1279
#9  0x000000000040d50c in interactive_mode (dev=0x7fffffffe638, 
    cmd_list=<value optimized out>) at ui.c:1502
#10 0x000000000040a7cf in main (argc=0, argv=0x7fffffffe728) at parted.c:2482

Expected results:

The GPT disk label should be printed.

Additional info:

The current Git master correctly prints out the GPT disk label:

[rishi@ginger parted-hacking]$ sudo parted/parted /dev/sdc
[sudo] password for rishi: 
GNU Parted
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: CCore Flash Disk (scsi)
Disk /dev/sdc: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  2048MB  2048MB  fat16        usbdisk  boot 

Comment 1 Joel Andres Granados 2009-06-12 08:15:38 EDT
Upstream parted will be in rawhide in the next couple of days.  This issue will be address in the new parted 1.9.0.  If you want to test :  http://koji.fedoraproject.org/koji/taskinfo?taskID=1405593

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