bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21494: Assertion failure with confusion between Linux and driver des


From: Shane Kerr
Subject: bug#21494: Assertion failure with confusion between Linux and driver descriptor
Date: Wed, 16 Sep 2015 06:47:29 +0000

Hello,

parted just crashed on me and told me I have to report the bug. :)

I have a USB memory stick that I want to repartition.

parted complained, with a "Ignore/Cancel" prompt. I am
reminded of MS-DOS:

https://en.wikipedia.org/wiki/Abort,_Retry,_Fail%3F

Possibly an improved error message would be a good idea?

Anyway, I chose "i" for ignore on the first run. However this results
in an incorrect size for the USB stick, which I know is 16 GB.

-----------------------------------------------------------------------
address@hidden:~/tmp$ sudo parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
Ignore/Cancel? i
Model: General USB Flash Disk (scsi)
Disk /dev/sdb: 64,5GB
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags:

Number  Start   End     Size   File system  Name   Flags
 1      2048B   6143B   4096B               Apple
 2      1853kB  2279kB  426kB               EFI

(parted) q
-----------------------------------------------------------------------

So I tried again, picking "c" for cancel, because why not?

-----------------------------------------------------------------------
address@hidden:~/tmp$ sudo parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
Ignore/Cancel? c
Model: General USB Flash Disk (scsi)
Disk /dev/sdb: 16,1GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
-----------------------------------------------------------------------

Okay. Better, I guess? Probably I should have paid more attention, as the "i" 
for ignore version at least could read a partition table. :)

Anyway, I proceeded to try a new partition:

-----------------------------------------------------------------------
(parted) n
Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
Ignore/Cancel? c
Partition number?
Partition number? 1
Backtrace has 8 calls on stack:
  8: /lib/x86_64-linux-gnu/libparted.so.2(ped_assert+0x44) [0x7f4cbbd7f644]
  7: /lib/x86_64-linux-gnu/libparted.so.2(+0x11d65) [0x7f4cbbd83d65]
  6: parted(command_line_get_partition+0x4d) [0x40b67d]
  5: parted() [0x4078f2]
  4: parted(interactive_mode+0xff) [0x40ca2f]
  3: parted(main+0x119f) [0x405f6f]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f4cbb576b45]
  1: parted() [0x405fc7]


You found a bug in GNU Parted! Here's what you have to do:
   .
   .
   .
Assertion (disk != NULL) at ../../libparted/disk.c:1598 in function
ped_disk_get_partition() failed.
-----------------------------------------------------------------------

This is with Debian Stretch (currently testing).

Kernel details from "uname -a":

Linux pallas 4.1.0-2-amd64 #1 SMP Debian 4.1.6-1 (2015-08-23) x86_64 GNU/Linux

Cheers,

--
Shane





reply via email to

[Prev in Thread] Current Thread [Next in Thread]