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 735471 - fat32 resize crash - error "corrupted double-linked list"
fat32 resize crash - error "corrupted double-linked list"
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.19.1
Other Linux
: Normal normal
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
: 764558 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-08-26 18:10 UTC by Kalle Richter
Modified: 2016-04-04 17:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Display Logical Volumes (v6) (3.12 KB, patch)
2015-09-15 19:18 UTC, Mike Fleetwood
none Details | Review

Description Kalle Richter 2014-08-26 18:10:35 UTC
When I try to resize the second partition on an USB stick (Sandisk Extreme 64 GB with msdos partition table) with fat32 format (46 GB, 10 GB used) besides 

  * a fat32 partition (first, primary, 5 GB of 10 GB used) and 
  * a Linux swap partition (third, primary, 10 GB)

I get the error

    *** Error in `/usr/sbin/gpartedbin': corrupted double-linked list: 0x0000000001ce3800 ***

printed to console and `gparted` crashes. Besides this output I'm getting 

    ======================
    libparted : 2.3
    ======================
    
    (gpartedbin:14865): GLib-CRITICAL **: Source ID 7 was not found when attempting to remove it

The last message occurs the numbers from 6 to > 200 with some gaps.

I can reproduce with 1.18.0 on Ubuntu 14.04 amd64 and with am64 live image running Oracle VirtualBox 3.4.14. 

Besides fixing the error it would be nice catch such and display the error message in a dialog rather than leaving the user with no feedback at all if he_she opened gparted from an application lancher without being able to see the output (unity dashboard, kde launcher, etc.).
Comment 1 Curtis Gedak 2014-08-26 19:09:03 UTC
Thank you Kalle for your interest in GParted.

Would you be able to provide the output from the following two commands?

   sudo fdisk -l -u

     Where one of the options is a lower case "L" and not the number one.

   sudo parted /path-to-your-device unit s print

     Where /path-to-your-device is something like /dev/sda and is the
     path to your USB flash drive.
Comment 2 Mike Fleetwood 2014-08-26 20:59:35 UTC
Hi,

I have produced a crash too, on Ubuntu 14.04 x86_64 with GParted 0.19.1
and libparted 2.3-19ubuntu1.  Steps:
1) Create 4096M fat32 partition on a msdos partitioned disk
2) Grow the partition to 8191M (Max size of the disk)
GParted crashed:

xubuntu@xubuntu1404:~$ sudo ~/bin/gpartedbin-0.19.1 
[sudo] password for xubuntu: 
======================
libparted : 2.3
======================
*** Error in `/home/xubuntu/bin/gpartedbin-0.19.1': malloc(): smallbin
double linked list corrupted: 0x0000000000ee4b20 ***


On Fedora Rawhide x86_64 with GParted 0.19.1 and libparted 3.2-2.fc22
and on Ubuntu 13.10 i686 with GParted 0.19.1 and libparted 2.3-16ubuntu1
the above operation worked flawlessly.


Curtis,

I wounder if this is another case of a problem with libparted in
Ubuntu 14.04 as you previous found bug #734718 comment #9.

Thanks,
Mike
Comment 3 Curtis Gedak 2014-08-26 22:36:10 UTC
Hi Mike,

Thank you for reminding me about this, confirming the crash, and listing the steps to recreate.  I believe you are right that the problem is with libparted from Ubuntu 14.04.  Since Debian often uses the same version, I tried the latest GParted Live 0.19.1-1-i486 (which has libparted0debian1:i386 2.3-20) and I was able to confirm the problem.

Since the problem does not appear to occur with the newer 3.2+ release, I think that might be the best solution forward.

I will ask our Live Image maintainer for an updated live image with libparted 3.2+.


Hi Kalle,

No need for the extra information since the problem has been confirmed.  I believe the ubuntu report is the following:

gparted crashes when trying to resize fat32 partition on live USB
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/1313600

Curtis
Comment 4 Curtis Gedak 2014-08-28 21:01:57 UTC
Update title from:
   error "corrupted double-linked list" 
to:
   fat32 resize crash - error "corrupted double-linked list"
Comment 5 Curtis Gedak 2014-08-30 02:12:12 UTC
Hi Kalle,

Would you be able to try the latest GParted Live 0.19.1-4?

This newest live image is linked with libparted 3.2 and does not crash when I resize fat32 partitions.

Curtis
Comment 6 Kalle Richter 2014-09-02 01:22:42 UTC
Hi Curtis,
I tried with the GParted Live 0.19.1-4 and the issue seems to be fixed there. The partition table of the device vanished during my tries to create a reproduction recipe, so no change to verify the fix with the original device, but I am convinced anyway. Thanks for your input!

-Kalle
Comment 7 Mike Fleetwood 2015-09-15 19:18:24 UTC
Created attachment 311405 [details] [review]
Display Logical Volumes (v6)

Hi Wrolf,

The code works well now.

Rather than make you jump unnecessary hoops I'm made a few cosmetic
changes:
1) Remove unnecessary changes in Display_Info() for display of Members.
   Helps make using git blame more useful / easier.
2) Added and removed an occasional space character.
   GParted code is a mess in terms of white space consistency.  Trying
   to set a consistent layout going forward.
3) Minor comment rewording.

The following commit has been pushed to the public GParted GIT repo and
will be included in the next release of GParted.

Display list of Logical Volumes in the Partition Information dialog (754649)
https://git.gnome.org/browse/gparted/commit/?id=9e950e89b42158753c47bb846336e83b4bf3c100

Thanks,
Mike
Comment 8 Mike Fleetwood 2015-09-15 19:20:12 UTC
Whoops.  Was meant to post the above in bug 754649.
Comment 9 Mike Fleetwood 2016-04-04 17:38:53 UTC
*** Bug 764558 has been marked as a duplicate of this bug. ***