Subject: bug#25198: closed (Re: bug#25198: bug: assertion (metadata_length > 0) failed)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 18 Apr 2017 15:16:02 +0000

Your bug report

#25198: bug: assertion (metadata_length > 0) failed

which was filed against the parted package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
25198: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25198
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#25198: bug: assertion (metadata_length > 0) failed
From: Phil Susi <[email-masked]>
To: Rauno Viskus <[email-masked]>, [email-masked]
Date: Tue, 18 Apr 2017 11:17:05 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On 12/13/2016 6:09 PM, Rauno Viskus wrote:
> As much as I found searching aroud mentioned about partitions needing at
> least a sector in between eachother for metadata - is that it? Weird thing
> is that everything worked before I removed my Windows partition from the
> gap in between sda1 and sda3.
> 
> Output of fdisk -l:
> 
> 
> Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 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
> Disklabel type: dos
> Disk identifier: 0x9a232254
> 
> Device     Boot     Start       End  Sectors  Size Id Type
> /dev/sda1  *         2048   3074047  3072000  1.5G  7 HPFS/NTFS/exFAT
> /dev/sda3       397805566 485435391 87629826 41.8G  5 Extended
> /dev/sda5       397805568 436865023 39059456 18.6G 83 Linux
> /dev/sda6       436867072 466163711 29296640   14G 83 Linux
> /dev/sda7       466163712 485435391 19271680  9.2G 82 Linux swap / Solaris

Yes, you have to have at least one sector between partitions for the
chained EBR.  I'm curious as to what messed up partitioning tool created
this layout.

Subject: bug: assertion (metadata_length > 0) failed
From: Rauno Viskus <[email-masked]>
To: [email-masked]
Date: Wed, 14 Dec 2016 01:09:57 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Running

parted -l

crashes with

Backtrace has 15 calls on stack:
  15: /lib/x86_64-linux-gnu/libparted.so.2(ped_assert+0x44) [0x7f58e0393644]
  14: /lib/x86_64-linux-gnu/libparted.so.2(+0x20b26) [0x7f58e03a6b26]
  13: /lib/x86_64-linux-gnu/libparted.so.2(+0x120aa) [0x7f58e03980aa]
  12: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_add_partition+0x263)
[0x7f58e03989a3]
  11: /lib/x86_64-linux-gnu/libparted.so.2(+0x20405) [0x7f58e03a6405]
  10: /lib/x86_64-linux-gnu/libparted.so.2(+0x204a0) [0x7f58e03a64a0]
  9: /lib/x86_64-linux-gnu/libparted.so.2(+0x204a0) [0x7f58e03a64a0]
  8: /lib/x86_64-linux-gnu/libparted.so.2(+0x2043f) [0x7f58e03a643f]
  7: /lib/x86_64-linux-gnu/libparted.so.2(+0x21555) [0x7f58e03a7555]
  6: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_new+0x48)
[0x7f58e03985c8]
  5: parted() [0x407769]
  4: parted() [0x4069cf]
  3: parted(main+0x11b2) [0x405f82]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)
[0x7f58dfb88b45]
  1: parted() [0x405fc7]

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 (metadata_length > 0) at ../../../libparted/labels/dos.c:2313 in
function add_logical_part_metadata() failed.

As much as I found searching aroud mentioned about partitions needing at
least a sector in between eachother for metadata - is that it? Weird thing
is that everything worked before I removed my Windows partition from the
gap in between sda1 and sda3.

Output of fdisk -l:

Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 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
Disklabel type: dos
Disk identifier: 0x9a232254

Device     Boot     Start       End  Sectors  Size Id Type
/dev/sda1  *         2048   3074047  3072000  1.5G  7 HPFS/NTFS/exFAT
/dev/sda3       397805566 485435391 87629826 41.8G  5 Extended
/dev/sda5       397805568 436865023 39059456 18.6G 83 Linux
/dev/sda6       436867072 466163711 29296640   14G 83 Linux
/dev/sda7       466163712 485435391 19271680  9.2G 82 Linux swap / Solaris

BR,
Rauno