Bug 961818

Summary: parted not able to partition flash media, throws backtrace error and stops
Product: Red Hat Enterprise Linux 5 Reporter: Andrew R <andy>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED WONTFIX QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.9CC: andy
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-10 14:13:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew R 2013-05-10 13:33:37 UTC
Description of problem:Receiving unexpected backtrace bugs when repartitioning/reformating flash media via parted on RHEL 5.9/CentOS 5.9


Version-Release number of selected component (if applicable): 1.8.1
rpm -qa | egrep 'parted' 
parted-1.8.1-30.el5
parted-devel-1.8.1-30.el5

How reproducible: EVERY TIME


Steps to Reproduce:
1.Insert USB flash media device into USB port
2./sbin/parted -s /dev/sdb mkpart primary fat32
3.receive error
  
Actual results:
/sbin/parted -s /dev/sdb mkpart primary fat32

Backtrace has 14 calls on stack:

  14: /usr/lib/libparted-1.8.so.0(ped_assert+0x3b) [0x10af3b]

  13: /usr/lib/libparted-1.8.so.0 [0x146194]

  12: /usr/lib/libparted-1.8.so.0 [0x146f4d]

  11: /usr/lib/libparted-1.8.so.0 [0x1483c7]

  10: /usr/lib/libparted-1.8.so.0 [0x1103e7]

  9: /usr/lib/libparted-1.8.so.0(ped_disk_add_partition+0x295) [0x112e65]

  8: /usr/lib/libparted-1.8.so.0 [0x14a2c3]

  7: /usr/lib/libparted-1.8.so.0 [0x14a505]

  6: /usr/lib/libparted-1.8.so.0(ped_disk_new+0xa3) [0x113c23]

  5: /sbin/parted [0x804e2ef]

  4: /sbin/parted(non_interactive_mode+0x7c) [0x8052c9c]

  3: /sbin/parted(main+0x58) [0x8050f58]

  2: /lib/libc.so.6(__libc_start_main+0xdc) [0x94cebc]

  1: /sbin/parted [0x804b521]

You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.

Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking

the last version of GNU Parted that you can find at:

http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check,

please visit the GNU Parted website:

http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (1.8.1)

along with the error message below, the output of

parted DEVICE unit co print unit s print

and additional information about your setup you consider important.

Assertion (head_size <= 63) at dos.c:623 in function
probe_partition_for_geom()

failed.

Backtrace has 15 calls on stack:

  15: /usr/lib/libparted-1.8.so.0(ped_assert+0x3b) [0x10af3b]

  14: /usr/lib/libparted-1.8.so.0 [0x146194]

  13: /usr/lib/libparted-1.8.so.0 [0x146f4d]

  12: /usr/lib/libparted-1.8.so.0 [0x1483c7]

  11: /usr/lib/libparted-1.8.so.0 [0x1103e7]

  10: /usr/lib/libparted-1.8.so.0(ped_disk_add_partition+0x295) [0x112e65]

  9: /usr/lib/libparted-1.8.so.0 [0x14a2c3]

  8: /usr/lib/libparted-1.8.so.0 [0x14a505]

  7: /usr/lib/libparted-1.8.so.0 [0x14a7a5]

  6: /usr/lib/libparted-1.8.so.0(ped_disk_new+0xa3) [0x113c23]

  5: /sbin/parted [0x804e2ef]

  4: /sbin/parted(non_interactive_mode+0x7c) [0x8052c9c]

  3: /sbin/parted(main+0x58) [0x8050f58]

  2: /lib/libc.so.6(__libc_start_main+0xdc) [0x94cebc]

  1: /sbin/parted [0x804b521]

You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.

Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking

the last version of GNU Parted that you can find at:

http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check,

please visit the GNU Parted website:

http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (1.8.1)

along with the error message below, the output of

parted DEVICE unit co print unit s print

and additional information about your setup you consider important.

Assertion (head_size <= 63) at dos.c:623 in function
probe_partition_for_geom()

failed.

 

Output of parted /dev/sdb unit co print unit s print:

 

parted /dev/sdb unit co print unit s print

Backtrace has 14 calls on stack:

  14: /usr/lib/libparted-1.8.so.0(ped_assert+0x3b) [0x10af3b]

  13: /usr/lib/libparted-1.8.so.0 [0x146194]

  12: /usr/lib/libparted-1.8.so.0 [0x146f4d]

  11: /usr/lib/libparted-1.8.so.0 [0x1483c7]

  10: /usr/lib/libparted-1.8.so.0 [0x1103e7]

  9: /usr/lib/libparted-1.8.so.0(ped_disk_add_partition+0x295) [0x112e65]

  8: /usr/lib/libparted-1.8.so.0 [0x14a2c3]

  7: /usr/lib/libparted-1.8.so.0 [0x14a505]

  6: /usr/lib/libparted-1.8.so.0(ped_disk_new+0xa3) [0x113c23]

  5: parted [0x804d21b]

  4: parted(non_interactive_mode+0x7c) [0x8052c9c]

  3: parted(main+0x58) [0x8050f58]

  2: /lib/libc.so.6(__libc_start_main+0xdc) [0x94cebc]

  1: parted [0x804b521]

You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.

Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking

the last version of GNU Parted that you can find at:

http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check,

please visit the GNU Parted website:

http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (1.8.1)

along with the error message below, the output of

parted DEVICE unit co print unit s print

and additional information about your setup you consider important.

Assertion (head_size <= 63) at dos.c:623 in function
probe_partition_for_geom()

failed.

parted: invalid token: unit

Ignore/Cancel?

 

Model: Kingston DT 100 G2 (scsi)

Disk /dev/sdb: 3927MB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

 

Number  Start   End     Size    Type     File system  Flags

1      4129kB  3927MB  3923MB  primary  fat32        boot, lba


Expected results:
No message, successful partitioning

Additional info:
Originally found on CentOS 5.9. Tested on RHEL 5.9 + full updates and receiving same results. Works fine for physical hard drives with proper C/H/S geometry

Comment 1 Andrew R 2013-05-10 13:36:43 UTC
Actual error that is thrown (hidden in middle of debug information):
Assertion (head_size <= 63) at dos.c:623 in function probe_partition_for_geom()failed.

Most likely because flash media doesn't have actual C/H/S geometry

Comment 2 Brian Lane 2013-05-10 14:13:20 UTC
parted, up until about v2.3, had problems with the default partitioning on some USB devices. If you wipe the default partition table using dd if=/dev/zero of=/dev/<whatever> bs=1M count=1 it should work fine.