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 767233 - GParted core dump on assert failure in OperationDelete::get_partition_new()
GParted core dump on assert failure in OperationDelete::get_partition_new()
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.26.0
Other Linux
: Normal normal
: ---
Assigned To: Mike Fleetwood
gparted maintainers alias
https://bugzilla.redhat.com/show_bug....
Depends on:
Blocks:
 
 
Reported: 2016-06-04 08:39 UTC by Mike Fleetwood
Modified: 2016-06-13 17:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Prevent assert failure from OperationDelete::get_partition_new() (v1) (9.95 KB, patch)
2016-06-04 13:39 UTC, Mike Fleetwood
none Details | Review

Description Mike Fleetwood 2016-06-04 08:39:58 UTC
This assert failure and core dump was automatically reported by a user
on Fedora 23 running GParted 0.26.0 in this Red Hat bug report:

RedHat 1342556 - [abrt] gparted: GParted::OperationDelete::get_partition_new():
                 gpartedbin killed by SIGABRT
https://bugzilla.redhat.com/show_bug.cgi?id=1342556


Relevant information from that bug report for diagnosis.

Product:        Fedora
Version:        23
Version-Release number of selected component:
                gparted-0.26.0-3.fc23
cmdline:        /usr/sbin/gpartedbin
crash_function: GParted::OperationDelete::get_partition_new

Truncated backtrace:
Thread no. 1 (10 frames)
 #4 GParted::OperationDelete::get_partition_new at OperationDelete.cc:41
 #5 GParted::Win_GParted::activate_delete at Win_GParted.cc:2059
Comment 1 Mike Fleetwood 2016-06-04 08:43:18 UTC
Steps to reproduce:
Compose these operations
1) Check or delete an existing partition.
2) Create a new partition.
3) Delete new partition.

Result:
Assert failure in either of
  OperationCheck::get_partition_new()
  OperationDelete:get_partition_new()

Cause:
When Win_GParted::activate_delete() is stepping through the operation
list removing operations (2 & 3 in the above example reproduction steps)
which relate to the new partition never to be created it calls
get_partition_new() on all operations in the list.  This includes
calling get_partition_new() on the check and delete operations (1 in the
above example reproduction steps).  As partition_new is not set or used
by those operations they assert false and crash GParted.
Comment 2 Mike Fleetwood 2016-06-04 13:39:36 UTC
Created attachment 329122 [details] [review]
Prevent assert failure from OperationDelete::get_partition_new() (v1)

Hi Curtis,

Here's the patchset for this.

I know you are planning on making a GParted 0.26.1 app and LiveCD
release.  Would like you to include this bug as well as bug 766910
"Multiple boot loaders don't work on 64bit EXT4 file systems".

Should probably leave out bug 766989 "zfsonlinux support - need file
system name support of ZFS type codes" as that is adding new
functionality.

Thanks,
Mike
Comment 3 Curtis Gedak 2016-06-05 15:34:52 UTC
Hi Mike,

Thank you for the recent patch sets.  I will begin reviewing the bug reports targeted for 0.26.1 first.

Curtis
Comment 4 Curtis Gedak 2016-06-05 19:28:05 UTC
Hi Mike,

Thank you for developing a patch set to resolve this application crash.  In my testing I confirmed the crash issue, and also confirmed that patch set v1 from comment #2 does fix the issue.

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

The relevant git commits can be viewed at the following links:

Prevent assert failure from OperationCheck::get_partition_new() (#767233)
https://git.gnome.org/browse/gparted/commit/?id=1f2a50544d6b0926e1f02f7eb24cf8503bcc1a02

Prevent assert failure from OperationDelete::get_partition_new() (#767233)
https://git.gnome.org/browse/gparted/commit/?id=3daf73a01b6c2853c0f12d8c7b0e17cfee952971

Curtis
Comment 5 Curtis Gedak 2016-06-13 17:31:35 UTC
This enhancement was included in the GParted 0.26.1 release on June 13, 2016.