Project

General

Profile

Actions

Bug #4098

closed

GNU parted "crash" (well, sort of)

Added by Erik Larsson over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
OS/Net (Kernel and Userland)
Target version:
-
Start date:
2013-09-02
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
parted

Description

When running parted on my eSATA-connected hard drive I get the following output:
---

$ sudo parted /dev/dsk/c5d0
GNU Parted 1.8.8
Using /dev/dsk/c5d0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
print
Backtrace has 7 calls on stack:
  7: /usr/lib/libparted.so.8'ped_assert+0x33 [0xfeef5be7]
  6: /usr/lib/libparted.so.8'gpt_read+0x13a [0xfef31546]
  5: /usr/lib/libparted.so.8'ped_disk_new+0x93 [0xfeef9d8f]
  4: /usr/sbin/parted'do_print+0x84 [0x8056fe8]
  3: /usr/sbin/parted'interactive_mode+0xe3 [0x805c0a3]
  2: /usr/sbin/parted'main+0x56 [0x805959a]
  1: /usr/sbin/parted'_start+0x7d [0x8054d0d]

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.8)
along with the error message below, the output of

        parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Assertion ((PedSector) PED_LE64_TO_CPU (gpt->AlternateLBA) <= disk->dev->length
- 1) at unknown:0 in function unknown() failed.

Ignore/Cancel? i                                                          
i
Backtrace has 8 calls on stack:
  8: /usr/lib/libparted.so.8'ped_assert+0x33 [0xfeef5be7]
  7: /usr/lib/libparted.so.8'_parse_header+0x171 [0xfef30e61]
  6: /usr/lib/libparted.so.8'gpt_read+0x179 [0xfef31585]
  5: /usr/lib/libparted.so.8'ped_disk_new+0x93 [0xfeef9d8f]
  4: /usr/sbin/parted'do_print+0x84 [0x8056fe8]
  3: /usr/sbin/parted'interactive_mode+0xe3 [0x805c0a3]
  2: /usr/sbin/parted'main+0x56 [0x805959a]
  1: /usr/sbin/parted'_start+0x7d [0x8054d0d]

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.8)
along with the error message below, the output of

        parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Assertion (last_usable <= disk->dev->length) at unknown:0 in function unknown()
failed.

Ignore/Cancel? i                                                          
i
Error: Can't have a partition outside the disk!                           
Error: Can't have a partition outside the disk!                           
(parted) q                                                                
q

---

"iostat -E" says the following about the attached disk:
---
cmdk0     Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Model: WDC WD3200BEVT- Revision:  Serial No:      WD-WXE508N Size: 320,07GB <320070352896 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 0 

---

The kernel can apparently read the GPT partition table properly, as evidenced by the output of a small utility that I wrote myself, which simply issues the DKIOCEXTPARTINFO IOCTL and displays the result:
---

$ sudo bin/getpartinfo /dev/rdsk/c5d0
p_start: 0
p_length: 625142448
$ sudo bin/getpartinfo /dev/rdsk/c5d0s0
p_start: 40
p_length: 409600
$ sudo bin/getpartinfo /dev/rdsk/c5d0s1
p_start: 409640
p_length: 272629761
$ sudo bin/getpartinfo /dev/rdsk/c5d0s2
p_start: 273301545
p_length: 104857601
$ sudo bin/getpartinfo /dev/rdsk/c5d0s3
p_start: 378421290
p_length: 104857601
$ sudo bin/getpartinfo /dev/rdsk/c5d0s4
p_start: 483541035
p_length: 104857601
$ sudo bin/getpartinfo /dev/rdsk/c5d0s5
p_start: 588398636
p_length: 1954
$ sudo bin/getpartinfo /dev/rdsk/c5d0s6
p_start: 588400590
p_length: 35115235

---

This disk has the hybrid MBR/GPT partition scheme that Apple uses (formatted on a Mac), but I'm not sure that has anything to do with the bug.

The parted version is very recent (system was 'pkg update':ed to oi_151a8 a few days ago):
---

$ pkg info parted
          Namn: system/storage/parted
       Sammanfattning: GNU Parted - Partition Editor
   Beskrivning: GNU Parted is for the display and manipulation of disk
                partitions
      Kategori: System/Administration and Configuration
        Status: Installerat
      Utgivare: openindiana.org
       Version: 1.8.8
Kompilering släppt: 5.11
          Gren: 0.151.1.8
Paketeringsdatum: 21 juli 2013 13:38:59 
       Storlek: 898.65 kB
          FMRI: pkg://openindiana.org/system/storage/parted@1.8.8,5.11-0.151.1.8:20130721T133859Z

---
(Apologies for the Swedish localization, but you probably understand.)

I do not know if this is a regression since I didn't ever attach this hard drive to OI until now.
This is the first time I report a bug here, so please get back to me if more info is needed. I put this category kernel/userland, which seemed to be the best match.

Actions

Also available in: Atom PDF