GNU bug report logs - #74392
parted crash

Previous Next

Package: parted;

Reported by: Alexey Kuznetsov <kuznetsov.alexey <at> gmail.com>

Date: Sun, 17 Nov 2024 09:44:01 UTC

Severity: normal

Done: "Brian C. Lane" <bcl <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74392 in the body.
You can then email your comments to 74392 AT debbugs.gnu.org in the normal way.

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#74392; Package parted. (Sun, 17 Nov 2024 09:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexey Kuznetsov <kuznetsov.alexey <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Sun, 17 Nov 2024 09:44:02 GMT) Full text and rfc822 format available.

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

From: Alexey Kuznetsov <kuznetsov.alexey <at> gmail.com>
To: bug-parted <at> gnu.org
Subject: parted crash
Date: Sun, 17 Nov 2024 12:18:30 +0300
Hello!

parted 3.6 crashing when trying to modify debian hybrid iso usb flash
drive.

Hybrid means it has all partition types at once (mac, mbr) to make it
boot from all possible hardware. Also being iso compatible.

To create debian hybrid iso image you need use lb (live-build) or
download from debian web site.

How does usb device looks like from different software?




fdisk:

Disk /dev/sdb: 7,28 GiB, 7813988352 bytes, 15261696 sectors
Disk model: Transcend 8GB   
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: 0x00000000

Device         Start       End   Sectors  Size Type
/dev/sdb1  *         64  2928959 2928896  1,4G  0 Empty
/dev/sdb2          6892    15211    8320  4,1M ef EFI (FAT-12/16/32)

Partition table entries are not in disk order.






gdisk:

GPT fdisk (gdisk) version 1.0.10

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


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************







parted (crash log):

(parted) rm 2                                                         
(parted) mkpart                                                       
Partition name?  []?                                                  
File system type?  [ext2]?                                            
Start? 6873088                                                        
End? 15261695                                                         
Backtrace has 10 calls on stack:
  10: /lib/x86_64-linux-gnu/libparted.so.2(ped_assert+0x50)
[0x7f52ef223cb0]
  9: /lib/x86_64-linux-gnu/libparted.so.2(+0x2f24f) [0x7f52ef24324f]
  8: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_commit_to_dev+0x51)
[0x7f52ef226cf1]
  7: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_commit+0x28)
[0x7f52ef226de8]
  6: parted(+0xb27f) [0x55660b88a27f]
  5: parted(interactive_mode+0x184) [0x55660b88de74]
  4: parted(main+0x12a8) [0x55660b885db8]
  3: /lib/x86_64-linux-gnu/libc.so.6(+0x29d68) [0x7f52eefaed68]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85)
[0x7f52eefaee25]
  1: parted(_start+0x21) [0x55660b885e41]


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.6)
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 (num > 0) at ../../../libparted/labels/mac.c:964 in function
_generate_raw_freespace_part() failed.

Aborted (core dumped)





Reply sent to "Brian C. Lane" <bcl <at> redhat.com>:
You have taken responsibility. (Wed, 20 Nov 2024 22:11:03 GMT) Full text and rfc822 format available.

Notification sent to Alexey Kuznetsov <kuznetsov.alexey <at> gmail.com>:
bug acknowledged by developer. (Wed, 20 Nov 2024 22:11:03 GMT) Full text and rfc822 format available.

Message #10 received at 74392-close <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: Alexey Kuznetsov <kuznetsov.alexey <at> gmail.com>
Cc: 74392-close <at> debbugs.gnu.org
Subject: Re: bug#74392: parted crash
Date: Wed, 20 Nov 2024 14:10:32 -0800
On Sun, Nov 17, 2024 at 12:18:30PM +0300, Alexey Kuznetsov wrote:
> Hello!
> 
> parted 3.6 crashing when trying to modify debian hybrid iso usb flash
> drive.

[snip]

> Assertion (num > 0) at ../../../libparted/labels/mac.c:964 in function
> _generate_raw_freespace_part() failed.

Thanks for the report, this isn't really a crash -- it's the program
protecting you from doing something bad to the disk. hybrid iso
'disklabels' are not meant to be edited. The combine several things into
one so that they can boot multiple places, but aren't supported as an
actual disk label.

Brian

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





Information forwarded to bug-parted <at> gnu.org:
bug#74392; Package parted. (Thu, 21 Nov 2024 07:19:01 GMT) Full text and rfc822 format available.

Message #13 received at 74392-close <at> debbugs.gnu.org (full text, mbox):

From: Alexey Kuznetsov <kuznetsov.alexey <at> gmail.com>
To: "Brian C. Lane" <bcl <at> redhat.com>
Cc: 74392-close <at> debbugs.gnu.org
Subject: Re: bug#74392: parted crash
Date: Thu, 21 Nov 2024 09:21:28 +0300
> Thanks for the report, this isn't really a crash -- it's the program
> protecting you from doing something bad to the disk. hybrid iso
> 'disklabels' are not meant to be edited. The combine several things into
> one so that they can boot multiple places, but aren't supported as an
> actual disk label.

Actually parted brakes drive, because the "rm 2" command instantly
removes the partition and saves the changes, and next command mkpart
crashes the app. I expect parted would change the mac or msdos
partition map, so I can change the rest manually. Or even better, that
parted would change msdos by default which is used by kernel by
default (not mac partition)




Information forwarded to bug-parted <at> gnu.org:
bug#74392; Package parted. (Thu, 21 Nov 2024 15:58:01 GMT) Full text and rfc822 format available.

Message #16 received at 74392-close <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: Alexey Kuznetsov <kuznetsov.alexey <at> gmail.com>
Cc: 74392-close <at> debbugs.gnu.org
Subject: Re: bug#74392: parted crash
Date: Thu, 21 Nov 2024 07:57:48 -0800
On Thu, Nov 21, 2024 at 09:21:28AM +0300, Alexey Kuznetsov wrote:
> > Thanks for the report, this isn't really a crash -- it's the program
> > protecting you from doing something bad to the disk. hybrid iso
> > 'disklabels' are not meant to be edited. The combine several things into
> > one so that they can boot multiple places, but aren't supported as an
> > actual disk label.
> 
> Actually parted brakes drive, because the "rm 2" command instantly
> removes the partition and saves the changes, and next command mkpart
> crashes the app. I expect parted would change the mac or msdos
> partition map, so I can change the rest manually. Or even better, that
> parted would change msdos by default which is used by kernel by
> default (not mac partition)
> 

Hm. That's not great, I'll look into maybe detecting hybridiso and
returning an error.

Thanks,

Brian

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





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Dec 2024 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 178 days ago.

Previous Next


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