GNU bug report logs - #46539
Assertion (start >= 0) at cs/geom.c:157 in function ped_geometry_set() failed.

Previous Next

Package: parted;

Reported by: Samuel Phan <samuel <at> quoonel.com>

Date: Mon, 15 Feb 2021 19:00:02 UTC

Severity: normal

To reply to this bug, email your comments to 46539 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#46539; Package parted. (Mon, 15 Feb 2021 19:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Samuel Phan <samuel <at> quoonel.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Mon, 15 Feb 2021 19:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Samuel Phan <samuel <at> quoonel.com>
To: bug-parted <at> gnu.org
Subject: Assertion (start >= 0) at cs/geom.c:157 in function
 ped_geometry_set() failed.
Date: Mon, 15 Feb 2021 18:53:22 +0100
[Message part 1 (text/plain, inline)]
Hi,

Parted 3.4 crashes immediately when I run it:

$ sudo ./parted /dev/sdb unit co print unit s print
Backtrace has 12 calls on stack:
  12:
/home/piloupy/new/software/parted/parted-3.4/libparted/.libs/libparted.so.2(ped_assert+0x49)
[0x7f9209b112f9]
  11:
/home/piloupy/new/software/parted/parted-3.4/libparted/.libs/libparted.so.2(ped_geometry_set+0xca)
[0x7f9209b1772a]
  10:
/home/piloupy/new/software/parted/parted-3.4/libparted/.libs/libparted.so.2(_ped_partition_alloc+0x66)
[0x7f9209b14866]
  9:
/home/piloupy/new/software/parted/parted-3.4/libparted/.libs/libparted.so.2(+0x2b3bf)
[0x7f9209b2c3bf]
  8:
/home/piloupy/new/software/parted/parted-3.4/libparted/.libs/libparted.so.2(ped_partition_new+0x6c)
[0x7f9209b14d7c]
  7:
/home/piloupy/new/software/parted/parted-3.4/libparted/.libs/libparted.so.2(+0x2c507)
[0x7f9209b2d507]
  6:
/home/piloupy/new/software/parted/parted-3.4/libparted/.libs/libparted.so.2(ped_disk_new+0x4d)
[0x7f9209b1646d]
  5:
/home/piloupy/new/software/parted/parted-3.4/parted/.libs/parted(+0x8e19)
[0x55e5b59aee19]
  4:
/home/piloupy/new/software/parted/parted-3.4/parted/.libs/parted(non_interactive_mode+0xa4)
[0x55e5b59b4e14]
  3:
/home/piloupy/new/software/parted/parted-3.4/parted/.libs/parted(main+0x1265)
[0x55e5b59ad6b5]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)
[0x7f92098970b3]
  1:
/home/piloupy/new/software/parted/parted-3.4/parted/.libs/parted(_start+0x2e)
[0x55e5b59ad86e]


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.4)
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 (start >= 0) at cs/geom.c:157 in function ped_geometry_set()
failed.

Aborted
----

I tried to use "gdisks" to have futher info:

$ sudo gdisk -l /dev/sdb
GPT fdisk (gdisk) version 1.0.5

Warning! Main and backup partition tables differ! Use the 'c' and 'e'
options
on the recovery & transformation menu to examine the two tables.

Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: OK
Main partition table: OK
Backup partition table: ERROR

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************

Warning! Secondary partition table overlaps the last partition by
17798929519030942594 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/sdb: 468862128 sectors, 223.6 GiB
Model: KINGSTON SA400S3
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 09080D23-F945-42E1-91A8-D972BACD69D4
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 1-sector boundaries
Total free space is 6290 sectors (3.1 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048           34815   16.0 MiB    0C01  Microsoft reserved
...
   2           34816       467817434   223.1 GiB   0700  Basic data
partition
   3       467818496       468858879   508.0 MiB   2700
  20  16168095968485441544  27022147520040728   15.9 EiB    FFFF  构ἀӻ聢耇
  24  4222189343605344  8574959245241843840   14.2 EiB    FFFF  ᯠ
  25  2163944437116108824  288617531357396996   15.2 EiB    FFFF
  26  10960354126732460063  9267845147734048795   384.0 PiB   FFFF
 àǠᮀ࠘`鬀耀耀恠hᬀ瀀ဈǠ...
  27  2091658247203127303  288230376151744512   15.1 EiB    FFFF  悐
  28  1972608935429932032  7069912543168102407   7.7 EiB     FFFF  ក
  29  17334179142672842752  542402406824484119   15.0 EiB    FFFF  `耀àྀ
  30  7530546342544933376  9294973325012697472   15.6 EiB    FFFF  耞ἀ
  37   8802535497729  67826570215088152   14.1 EiB    FFFF  需܄耟᠁恠聠杨܀~蜈
  38  63050510747361376  7069244593870535936   7.4 EiB     FFFF  Ỡ
  39  7090038038360752256  17695659393559   3.4 EiB     FFFF  `ῠ胠眀鼀蜂
  40  63067300160634880  288477216528859140   4.1 EiB     FFFF  ࠀ瀛
  41  140741699473160    550173147360   15.9 EiB    FFFF  笏à烠怀
  42  9225624936180089056  9511848774492754016   15.1 EiB    FFFF
 ကâĀ擠耀耀聠ᜀ܀紀Ӡ἟Ỹ
  43  74318739817889792  1945555588795006978   15.0 EiB    FFFF  g裠ˠȀ鴘恠
  44    478888890142  17798929519499804688   319.8 PiB   FFFF  ០က懷ߠက惾搀က悞耀
  45  6917701661173488384  1657466487021469920   16.0 EiB    FFFF  ÷惯ᴞ退༁ᬛ
  46  35764370832875536  315499367907778591   12.2 EiB    FFFF  Ȁࠀ态
  47  28992051729075975  105553124712672   3.2 EiB     FFFF  翠
  48  27022149516533104  16149064251145721984   7.6 EiB     FFFF  Ȁ蜀ѠỠ耏ᬘ耀
  49  6917671966314856448  668507373109248   239.0 PiB   FFFF  耛退ἄ
  50   1103345778945  1722626857475569665   13.0 EiB    FFFF  ᜀ栀
  51  540572825916801032  1161365753908461592   3.7 EiB     FFFF
 怈胠惠ၢ耀怀à技ỷǠᢀ
  52  2242616825714073728  63050395236171777   8.1 EiB     FFFF
 ἀx缀༗ࢀᾗက鯠Ḁɠ怄漛蠀肄耀思ᴀ...
  53  1153167924075168480  580956612657153   152.1 PiB   FFFF  Ỡ`
  54  6951447312091054080  171699735793524736   13.2 EiB    FFFF  耟Ā懠က惠
  55  9286422914819686400  43628623680299008   7.4 EiB     FFFF  ＀܀
  56             772               0   16.0 EiB    FFFF
  57  26456998543744  36054151836499200   16.0 EiB    FFFF  ០耛a
  58  9007207430217555992  1684346263287390208   12.0 EiB    FFFF
 ᴀ签怀ჸ态脞Ҁ縀ࠀḀ鴇螂胠耀Ỡ...
  59  504544857826549789  35905119141003264   15.9 EiB    FFFF  Đ࡯à脀`à
  60  17228265287816601728  63076915671457792   9.1 EiB     FFFF
  61  9223618396185165851  2270062703970091652   993.0 TiB   FFFF
 ἀПᴀᾀà耞怀脀
  62  34621422150098199  16176383957749733120   391.8 PiB   FFFF
 怀耀~è紀ࠂༀ耀`紀᠁
  63  8444352883916544  6500305796536327   15.1 EiB    FFFF  
  64  36134350135230495  10957117155918742167   1.9 EiB     FFFF  Ѐ༄
-----

I got some hardware failure before, but I don't know how to fix it since I
can't even open a partition tool.

Samuel Phan
[Message part 2 (text/html, inline)]

Information forwarded to bug-parted <at> gnu.org:
bug#46539; Package parted. (Mon, 15 Feb 2021 21:17:01 GMT) Full text and rfc822 format available.

Message #8 received at 46539 <at> debbugs.gnu.org (full text, mbox):

From: Samuel Phan <samuel <at> quoonel.com>
To: 46539 <at> debbugs.gnu.org
Subject: Assertion (start >= 0) at cs/geom.c:157 in function
 ped_geometry_set() failed.
Date: Mon, 15 Feb 2021 21:35:25 +0100
[Message part 1 (text/plain, inline)]
I managed to fix the issue by using "fdisk" and delete all corrupted
partitions from number 20 to 64.

After that, Parted and GParted worked again:

$ sudo parted /dev/sdb
GNU Parted 3.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA KINGSTON SA400S3 (scsi)
Disk /dev/sdb: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name
 Flags
 1      1049kB  17,8MB  16,8MB               Microsoft reserved partition
 msftres
 2      17,8MB  240GB   240GB   ntfs         Basic data partition
 msftdata
 3      240GB   240GB   533MB   ntfs
hidden, diag
-----

And so does "gdisk":

$ sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.5

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help):
-----

Thanks,
Samuel Phan
[Message part 2 (text/html, inline)]

Information forwarded to bug-parted <at> gnu.org:
bug#46539; Package parted. (Tue, 16 Feb 2021 16:35:02 GMT) Full text and rfc822 format available.

Message #11 received at 46539 <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: Samuel Phan <samuel <at> quoonel.com>
Cc: 46539 <at> debbugs.gnu.org
Subject: Re: bug#46539: Assertion (start >= 0) at cs/geom.c:157 in function
 ped_geometry_set() failed.
Date: Tue, 16 Feb 2021 08:34:15 -0800
On Mon, Feb 15, 2021 at 09:35:25PM +0100, Samuel Phan wrote:
> I managed to fix the issue by using "fdisk" and delete all corrupted
> partitions from number 20 to 64.
> 
> After that, Parted and GParted worked again:
> 
> $ sudo parted /dev/sdb
> GNU Parted 3.3
> Using /dev/sdb
> Welcome to GNU Parted! Type 'help' to view a list of commands.
> (parted) p
> Model: ATA KINGSTON SA400S3 (scsi)
> Disk /dev/sdb: 240GB
> Sector size (logical/physical): 512B/512B
> Partition Table: gpt
> Disk Flags:
> 
> Number  Start   End     Size    File system  Name
>  Flags
>  1      1049kB  17,8MB  16,8MB               Microsoft reserved partition
>  msftres
>  2      17,8MB  240GB   240GB   ntfs         Basic data partition
>  msftdata
>  3      240GB   240GB   533MB   ntfs
> hidden, diag
> -----
> 
> And so does "gdisk":
> 
> $ sudo gdisk /dev/sdb
> GPT fdisk (gdisk) version 1.0.5
> 
> Partition table scan:
>   MBR: protective
>   BSD: not present
>   APM: not present
>   GPT: present
> 
> Found valid GPT with protective MBR; using GPT.
> 
> Command (? for help):
> -----

I'm glad you got it working again, hopefully you didn't lose any data.
It looks like things were pretty corrupt, which is why parted crashed
(basically to protect it from making things worse). But I wonder if it
could have been fixed by restoring the backup partition table from the
primary.

If this happens again (hope not!) make a copy of the first and last 1M
of the disk and email it to me so I can poke at it.

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart





This bug report was last modified 3 years and 263 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.