gparted crashes when trying to resize fat32 partition on live USB

Bug #1313600 reported by Hopungo Semi-bit
162
This bug affects 35 people
Affects Status Importance Assigned to Milestone
gparted (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I used 32GB Transcend DataTraveler USB flash. Deleted persistence file and tried to resize partition in Gparted. It crashed when applying changes. The console output was:
*** Error in `/usr/sbin/gpartedbin': malloc(): smallbin double linked list corrupted: 0x0000000000b13160 ***
Aborted (core dumped)

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gparted 0.18.0-1
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
Date: Mon Apr 28 15:41:30 2014
SourcePackage: gparted
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Hopungo Semi-bit (hopungo) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gparted (Ubuntu):
status: New → Confirmed
Revision history for this message
Aapo Rantalainen (aapo-rantalainen) wrote :

I encountered the same with external fat32 disk.

I tried it couple of times and got one more error:
gpartedbin: malloc.c:3695: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.

----
I tested upstream gparted from git (acbf08ce0c291348ba6900d440e9249f842180db), it gave different error, so I'm not sure is it affected or not. (Bad FAT: unterminated chain for \FSCK0052.REC.)

git clone git://git.gnome.org/gparted
cd gparted
./autogen.sh
./configure --prefix=`pw`/build
make
make install
cd build/sbin
./gparted

----

Finally I got partition shrank with:
sudo dosfsck -w -r -l -a -v -t /dev/sdc1
and using parted.

Revision history for this message
Simon Dalley (dalley-simon) wrote :

I've encountered parted and gparted crashing on FAT resize too.

This looks like GNU libparted bug #16338 . There is a patch for it: http://lists.gnu.org/archive/html/bug-parted/2014-04/msg00013.html

gparted-0.19.0 includes this fix, and will hopefully be in utopic. It's in the latest SystemRescueCd-4.3.0 which I used without problems to shrink the FAT32 partition on my kubuntu-live on a memory stick. (This allowed me to create a separate FAT32 /work partition which is then easy to use for moving files on and off kubuntu-live.)

Who can I ask sweetly to backport gparted-0.19.0 into Trusty?

Revision history for this message
Phillip Susi (psusi) wrote :

gparted-0.19.0 does not contain that fix, since that fix is to a bug in parted, not gparted. That fix also is included in Trusty and only affected Ubuntu briefly before Trusty was released.

Changed in gparted (Ubuntu):
importance: Undecided → High
Revision history for this message
Andrea Lazzarotto (Lazza) (andrea-lazzarotto) wrote :

This happens to me on Ubuntu 15.04 as well.

Revision history for this message
Roberto Costa (braselectron) wrote :

It took me a day to get a Live UEFI ubuntu to work from a USB stick on my Lenovo U430 and another day to find a working solution to make a partition on the USB and make it persistent too.

Gparted got me crazy! How can I have to return to Windows just to partition a USB stick!!!

So I found a tip on a blog saying this: "it works with Ubuntu 12.04" so I downloaded a Virtualbox image, fixed UI configuration, updated and install gparted, and bingo, it worked!

Reading on the Gparted page, you can see release notes that version 0.23.0 key changes include: "Prevent UI hang when resizing FAT16/32, HFS and HFS+ file systems"...so please update repository Ubuntu team and avoid all these bug reports.

Package: gparted
Status: install ok installed
Priority: optional
Section: gnome
Installed-Size: 1912
Maintainer: Phillip Susi <email address hidden>
Architecture: amd64
Version: 0.18.0-1
Depends: libatkmm-1.6-1 (>= 2.22.1), libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libglib2.0-0 (>= 2.12.0), libglibmm-2.4-1c2a (>= 2.36.2), libgtk2.0-0 (>= 2.14.0), libgtkmm-2.4-1c2a (>= 1:2.24.0), libpangomm-1.4-1 (>= 2.27.1), libparted0debian1 (>= 2.2-1), libsigc++-2.0-0c2a (>= 2.0.2), libstdc++6 (>= 4.6), libuuid1 (>= 2.16)
Suggests: xfsprogs, reiserfsprogs, reiser4progs, jfsutils, ntfs-3g, dosfstools, yelp, kpartx, dmraid, dmsetup, gpart
Description: GNOME partition editor
 GParted uses libparted to detect and manipulate devices and partition
 tables while several (optional) filesystem tools provide support for
 filesystems not included in libparted.
Homepage: http://gparted.sourceforge.net

My Ubuntu 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

Any updates on this?

Revision history for this message
Bortnyák Roland (antivirtel) wrote :

It's crashing with version 0.24.0-1~getdeb1, while I'd like to shrink a FAT32 SD card partition.

Revision history for this message
Yanpas (yanpaso) wrote :

This bug was fixed in libparted 3.2 https://bugzilla.gnome.org/show_bug.cgi?id=764558

BUT! libparted 3.2 suffers from another bug: Bug 759916 - fat(32) resizing generates boot sector(s) with invalid jump
instruction and pseudo-random boot code

Changed in gparted (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.