After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756612 - GParted crashes on a broken USB drive
GParted crashes on a broken USB drive
Status: RESOLVED DUPLICATE of bug 756434
Product: gparted
Classification: Other
Component: application
0.23.0
Other Linux
: Normal normal
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2015-10-15 08:12 UTC by Radek
Modified: 2015-10-15 09:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Radek 2015-10-15 08:12:36 UTC
I tried gparted on my broken USB pendrive. The pendrive is detected by the kernel but I cannot do anything with it on neither Linux nor Windows. I broke it sometimes ago when flashing image using dd.

My OS is:
radek@amd-desktop:~/bin$ uname -a
Linux amd-desktop 3.19.0-30-generic #34~14.04.1-Ubuntu SMP Fri Oct 2 22:09:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
radek@amd-desktop:~/bin$ lsb_release -a
LSB Version:	core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.3 LTS
Release:	14.04
Codename:	trusty

No problems with hardware - plenty of CPU and RAM.

dmseg dump after insertion of the pendrive:
[ 2496.981063] usb 7-2.1: new high-speed USB device number 6 using ehci-pci
[ 2497.098756] usb 7-2.1: New USB device found, idVendor=13fe, idProduct=5200
[ 2497.098764] usb 7-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2497.098769] usb 7-2.1: Product: USB DISK 53X            
[ 2497.098773] usb 7-2.1: Manufacturer: Phison                  
[ 2497.098777] usb 7-2.1: SerialNumber: 000000000003
[ 2497.099222] usb-storage 7-2.1:1.0: USB Mass Storage device detected
[ 2497.099457] scsi host11: usb-storage 7-2.1:1.0
[ 2498.099413] scsi 11:0:0:0: Direct-Access     Phison   USB DISK 50X     PMAP PQ: 0 ANSI: 4
[ 2498.100191] sd 11:0:0:0: Attached scsi generic sg10 type 0
[ 2498.102906] sd 11:0:0:0: [sdj] Attached SCSI removable disk

log of an attempt to apply fdisk on the drive:
radek@amd-desktop:~/bin$ sudo fdisk /dev/sdj
fdisk: unable to open /dev/sdj: No medium found

log dump from gparted after the crash:
radek@amd-desktop:~/bin$ sudo gparted /dev/sdj
======================
libparted : 2.3
======================
Error opening /dev/sdj: No medium found
Error opening /dev/sdj: No medium found
Error opening /dev/sdj: No medium found
Backtrace has 10 calls on stack:
  10: /lib/x86_64-linux-gnu/libparted.so.0(ped_assert+0x31) [0x7f77784e74b1]
  9: /lib/x86_64-linux-gnu/libparted.so.0(+0xf93b) [0x7f77784e793b]
  8: /usr/sbin/gpartedbin() [0x46f480]
  7: /usr/sbin/gpartedbin() [0x46f4d8]
  6: /usr/sbin/gpartedbin() [0x46f5a6]
  5: /usr/sbin/gpartedbin() [0x478ac4]
  4: /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1(+0x41a4d) [0x7f77791b9a4d]
  3: /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x6df05) [0x7f77787c5f05]
  2: /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x7f7777890182]
  1: /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f77775ba47d]
Assertion (dev != NULL) at ../../libparted/device.c:228 in function ped_device_open() failed.
Aborted (core dumped)

How to reproduce:
1. Issue command sudo gparted /dev/sdj
2. The application starts up. A dialog appears "Libparted Error" with command "Error opening /dev/sdj: no medium found". Two buttons available "Retry" and "Cancel". 
3. Pressing "Retry" keeps the window reappearing (the previous one closes and the new one (the same as the previous) is open. In my console message appeares "Error opening /dev/sdj: No medium found"
4. After pressing the "Cancel" button a window pops up "Libparted Bug" with the message "Assertion (dev != NULL) at ../../libparted/device.c:228 in function ped_device_open() failed."
Comment 1 Radek 2015-10-15 08:18:10 UTC
I tried to attach a core dump but probably due to its size I cannot.
Comment 2 Mike Fleetwood 2015-10-15 09:03:03 UTC
Hi Radek,

Thank you for the bug report.  This is actually a duplicate of:
    Bug 756434 - GParted dumps core when passing non-existent or invalid
                 device on the command line

The key bits of information are:
1) Device specified on the command line
2) Liparted error message against the named device
3) Assert failure (dev != NULL) in libparted/device.c in function
   ped_device_open()

Closing this bug report as a duplicate.

Thanks,
Mike

*** This bug has been marked as a duplicate of bug 756434 ***