Assertion (max_size > 0) failed while selecting partition

Bug #1644779 reported by asdqweasd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
New
Undecided
Unassigned

Bug Description

The following commands lead to crash:
1. sudo parted
2. print
3. print devices
4. select /dev/sdb

All steps in the same order are required to reproduce the crash. However, it doesn't matter, which valid device to choose in step 4 (selecting /dev/sda also leads to crash).

Ubuntu 16.10
parted 3.2-15build1

Output from terminal:

$ sudo parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA ST320LT012-1DG14 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
 1 1049kB 106MB 105MB fat32 EFI system partition boot, esp
 2 106MB 1050MB 944MB ntfs Basic data partition hidden, diag
 3 1050MB 1184MB 134MB Microsoft reserved partition msftres
 4 1184MB 199GB 198GB ntfs Basic data partition msftdata
 6 199GB 294GB 95,7GB ext4
 7 294GB 299GB 4176MB linux-swap(v1)
 5 299GB 320GB 21,5GB ntfs Basic data partition hidden, diag

(parted) print devices
/dev/sda (320GB)
/dev/sdb (8195MB)
(parted) select /dev/sdb
Backtrace has 14 calls on stack:
  14: /lib/x86_64-linux-gnu/libparted.so.2(ped_assert+0x45) [0x7f3e9700de55]
  13: /lib/x86_64-linux-gnu/libparted.so.2(ped_constraint_init+0xd0) [0x7f3e970149c0]
  12: /lib/x86_64-linux-gnu/libparted.so.2(ped_constraint_new+0x56) [0x7f3e97014a76]
  11: /lib/x86_64-linux-gnu/libparted.so.2(ped_constraint_exact+0xa8) [0x7f3e97015338]
  10: /lib/x86_64-linux-gnu/libparted.so.2(+0x22cb7) [0x7f3e97025cb7]
  9: /lib/x86_64-linux-gnu/libparted.so.2(+0x22d86) [0x7f3e97025d86]
  8: /lib/x86_64-linux-gnu/libparted.so.2(+0xf88a) [0x7f3e9701288a]
  7: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_delete_all+0x62) [0x7f3e97013442]
  6: /lib/x86_64-linux-gnu/libparted.so.2(+0x22079) [0x7f3e97025079]
  5: parted(+0x6afb) [0x5612aa2d6afb]
  4: parted(interactive_mode+0x120) [0x5612aa2dd0b0]
  3: parted(main+0x142b) [0x5612aa2d61eb]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f3e967e93f1]
  1: parted(_start+0x2a) [0x5612aa2d624a]

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 (3.2)
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 (max_size > 0) at ../../libparted/cs/constraint.c:71 in function
ped_constraint_init() failed.

Aborted (core dumped)

asdqweasd (asdqweasd)
affects: gparted (Ubuntu) → parted (Ubuntu)
Revision history for this message
asdqweasd (asdqweasd) wrote :

$ sudo parted /dev/sda unit co print unit s print
Model: ATA ST320LT012-1DG14 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
 1 1049kB 106MB 105MB fat32 EFI system partition boot, esp
 2 106MB 1050MB 944MB ntfs Basic data partition hidden, diag
 3 1050MB 1184MB 134MB Microsoft reserved partition msftres
 4 1184MB 199GB 198GB ntfs Basic data partition msftdata
 6 199GB 294GB 95,7GB ext4
 7 294GB 299GB 4176MB linux-swap(v1)
 5 299GB 320GB 21,5GB ntfs Basic data partition hidden, diag

Model: ATA ST320LT012-1DG14 (scsi)
Disk /dev/sda: 625142448s
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
 1 2048s 206847s 204800s fat32 EFI system partition boot, esp
 2 206848s 2050047s 1843200s ntfs Basic data partition hidden, diag
 3 2050048s 2312191s 262144s Microsoft reserved partition msftres
 4 2312192s 388197303s 385885112s ntfs Basic data partition msftdata
 6 388198400s 575021055s 186822656s ext4
 7 575021056s 583178239s 8157184s linux-swap(v1)
 5 583178240s 625141759s 41963520s ntfs Basic data partition hidden, diag

Revision history for this message
asdqweasd (asdqweasd) wrote :

$ sudo parted /dev/sdb unit co print unit s print
Model: SanDisk Cruzer Contour (scsi)
Disk /dev/sdb: 8195MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
 1 1049kB 8195MB 8194MB primary fat32 boot

Model: SanDisk Cruzer Contour (scsi)
Disk /dev/sdb: 16006797s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
 1 2048s 16006796s 16004749s primary fat32 boot

Revision history for this message
Thorsten Goetzke (th-goetzke) wrote :

Ran into exactly the same thing.
parted is able to work with the disk, but you can not use the "select" command.
instead just specify the device at the commandline.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.