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 772123 - GParted is unresponsive while gpart is running
GParted is unresponsive while gpart is running
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
GIT HEAD
Other Linux
: Normal normal
: ---
Assigned To: Mike Fleetwood
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2016-09-28 14:01 UTC by Mike Fleetwood
Modified: 2016-10-19 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Prevent UI hang while gpart is running (v1) (2.79 KB, patch)
2016-09-28 14:34 UTC, Mike Fleetwood
none Details | Review
Script to create some test partitions with file systems for gpart to recover (1.85 KB, text/plain)
2016-10-06 16:04 UTC, Curtis Gedak
  Details
Screenshot of GParted attempt data rescue on Ubuntu 14.04 (189.52 KB, image/jpeg)
2016-10-06 16:45 UTC, Curtis Gedak
  Details

Description Mike Fleetwood 2016-09-28 14:01:51 UTC
Running Device > Attempt Data Rescue... hangs the GParted UI for as long
as gpart takes to scan the whole disk device looking for file system
signatures.
Comment 1 Mike Fleetwood 2016-09-28 14:34:34 UTC
Created attachment 336454 [details] [review]
Prevent UI hang while gpart is running (v1)

Hi Curtis,

Here's the patch for this.  Tested successfully on CentOS 5, CentOS 6
and Fedora 24.

Thanks,
Mike
--8<--
File: gparted-772123-gpart-hangs-ui-v1.patch
Desc: Prevent UI hang while gpart is running (v1)
Tag: submitted-772123-gpart-hangs-ui-v1
Comment 2 Curtis Gedak 2016-10-06 16:04:49 UTC
Created attachment 337078 [details]
Script to create some test partitions with file systems for gpart to recover

Thank you Mike for discovering this issue with unresponsiveness while attempting data recovery with GParted.

I've attached a script that I used for testing on kubuntu 16.04.  The steps I used to set up a device with some formatted partitions are as follows:

1)  Create a scsi ramdisk.

    $ sudo modprobe scsi_debug dev_size_mb=24 sector_size=512

2)  Run dmesg to determine device path created.

    # For this example I'll use /dev/sdf

3)  Initialize partitions and file systems.

    $ sudo ./init-gpart-partitions.sh /dev/sdf

4)  Start GParted and test "Device -> Attempt Data Rescue"

    $ sudo gparted /dev/sdf

5)  When done remove the scsi ramdisk.

    $ sudo rmmod scsi_debug
Comment 3 Curtis Gedak 2016-10-06 16:45:51 UTC
Created attachment 337082 [details]
Screenshot of GParted attempt data rescue on Ubuntu 14.04

My testing of patch v1 from comment #1 has gone well as can be seen from the attached screen capture.

Of note is that not all partitions and file systems were discovered.  This is not the fault of GParted, but rather the result of which partitions were discovered by *gpart*.  This can be confirmed on the command line with:

  $ sudo gpart -s 512 /path-to-disk-device

Where /path-to-disk-device is something like /dev/sdf
Comment 4 Curtis Gedak 2016-10-06 17:13:58 UTC
I have successfully tested patch v1 from comment #1 on kubuntu 16.04 and ubuntu 14.04.

Patch v1 has been committed to the git repository for inclusion in the next release of GParted.

The relevant git commit can be viewed at the following link:

Prevent the UI hanging while gpart data rescue is running (#772123)
https://git.gnome.org/browse/gparted/commit/?id=aeebee9c12442d104b1ecb0e94ba41ec36c0c4e6
Comment 5 Curtis Gedak 2016-10-19 16:24:03 UTC
This enhancement was included in the GParted 0.27.0 release on October 19, 2016.