Error in `/usr/sbin/gpartedbin': malloc(): smallbin double linked list corrupted: 0x000000000107d210

Bug #1325708 reported by Karlchen
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
gparted (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Launched gparted and tried to do an fsck on a FAT32 formatted external USB pandrive, device /dev/sdb, partition /dev/sdb1.
As soon as i clicked [Apply] to actually run the fsck job, gparted closed and in the terminal window from which I had launched "sudo gparted" the following error message was displayed:

*** Error in `/usr/sbin/gpartedbin': malloc(): smallbin double linked list corrupted: 0x000000000107d210 ***
Aborted (core dumped)

This crash is reproducible at will.

The pnedrive itself is all right, so is the filesystem on it.
sudo fsck -V -f /dev/sdb1 as well as
sudo dosfsck -v /dev/sdb1
both work correctly.

$ inxi -Fxz
System: Host: <filter> Kernel: 3.13.0-27-generic x86_64 (64 bit, gcc: 4.8.2) Desktop: Gnome Distro: Ubuntu 14.04 trusty
Machine: System: Dell product: Latitude E6330 version: 01
           Mobo: Dell model: 0F7WM9 version: A00 Bios: Dell version: A09 date: 02/06/2013
CPU: Dual core Intel Core i5-3340M CPU (-HT-MCP-) cache: 3072 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10764.8
           Clock Speeds: 1: 1200.00 MHz 2: 1200.00 MHz 3: 1800.00 MHz 4: 1200.00 MHz
Graphics: Card: Intel 3rd Gen Core processor Graphics Controller bus-ID: 00:02.0
           X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz
           GLX Renderer: Mesa DRI Intel Ivybridge Mobile GLX Version: 3.0 Mesa 10.1.0 Direct Rendering: Yes
Audio: Card: Intel 7 Series/C210 Series Family High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture ver: k3.13.0-27-generic
Network: Card-1: Intel 82579LM Gigabit Network Connection driver: e1000e ver: 2.3.2-k port: f080 bus-ID: 00:19.0
           IF: eth0 state: down mac: <filter>
           Card-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi ver: in-tree: bus-ID: 02:00.0
           IF: wlan0 state: up mac: <filter>
Drives: HDD Total Size: 328.3GB (23.1% used) 1: id: /dev/sda model: WDC_WD3200BEKT size: 320.1GB
           2: USB id: /dev/sdb model: USB_DISK size: 8.2GB
Partition: ID: / size: 29G used: 5.8G (22%) fs: ext4
RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors: System Temperatures: cpu: 39.5C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info: Processes: 223 Uptime: 1:02 Memory: 1216.8/3827.4MB Runlevel: 2 Gcc sys: 4.8.2
           Client: Shell (bash 4.3.11) inxi: 1.9.17

$ apt-cache policy gparted
gparted:
  Installiert: 0.18.0-1
  Installationskandidat: 0.18.0-1
  Versionstabelle:
 *** 0.18.0-1 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: gparted 0.18.0-1
ProcVersionSignature: Ubuntu 3.13.0-27.50-generic 3.13.11
Uname: Linux 3.13.0-27-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CrashCounter: 1
Date: Mon Jun 2 12:51:26 2014
ExecutablePath: /usr/sbin/gpartedbin
ExecutableTimestamp: 1394017302
InstallationDate: Installed on 2014-05-10 (23 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
ProcCmdline: /usr/sbin/gpartedbin
ProcCwd: /root
ProcEnviron:
 LANGUAGE=de_DE
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
Signal: 6
SourcePackage: gparted
StacktraceTop:
 ped_assert () from /lib/x86_64-linux-gnu/libparted.so.0
 ped_device_sync () from /lib/x86_64-linux-gnu/libparted.so.0
 fat_write_sync_fragments () from /lib/x86_64-linux-gnu/libparted.so.0
 ?? () from /lib/x86_64-linux-gnu/libparted.so.0
 fat_duplicate_clusters () from /lib/x86_64-linux-gnu/libparted.so.0
Title: gpartedbin crashed with SIGABRT in ped_assert()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
Karlchen (karlchen) wrote :
information type: Private → Public
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 ped_assert (cond_text=cond_text@entry=0x7fa23e256d6c "!dev->external_mode", file=file@entry=0x7fa23e256d39 "../../libparted/device.c", line=line@entry=378, function=function@entry=0x7fa23e256de0 <__PRETTY_FUNCTION__.5821> "ped_device_sync") at ../../libparted/debug.c:112
 ped_device_sync (dev=<optimized out>) at ../../libparted/device.c:378
 ped_geometry_sync (geom=<optimized out>) at ../../libparted/cs/geom.c:340
 fat_write_sync_fragments (fs=0x15cdfe0, buf=<optimized out>, frag=<optimized out>, count=count@entry=1) at ../../../../libparted/fs/fat/fatio.c:78
 fat_write_sync_fragment (fs=<optimized out>, buf=<optimized out>, frag=<optimized out>) at ../../../../libparted/fs/fat/fatio.c:86

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gparted (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Curtis Gedak (gedakc) wrote :

GParted uses the libparted library from the parted project to handle many of the partitioning tasks.

Would you be able to provide the output from the following command?

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

Where: /path-to-your-device is something like /dev/sdb.

Revision history for this message
Karlchen (karlchen) wrote :

Thanks, Curtis, for your feedback and your question:

sudo parted /dev/sdb1 unit s print
Model: Unknown (unknown)
Disk /dev/sdb1: 15974368s
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
 1 0s 15974367s 15974368s fat32

Note:
gparted Ubuntu 12.04.4 performs the fsck action on the same USB pendrive without any problem. No crash.

Revision history for this message
Curtis Gedak (gedakc) wrote :

Bsed on the parted output, the entire USB device is formatted with a fat32 file system and there is no partition table on the device. GParted currently only works with partitions on partitioned devices. See:

Doesn't properly support partitionless drives
https://bugzilla.gnome.org/show_bug.cgi?id=683643

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

Would you be able to test the version in my ppa and see if that fixes this? ( assuming you can still reproduce it at will ).

Revision history for this message
Karlchen (karlchen) wrote :

Hello, Curtis.
> GParted currently only works with partitions on partitioned devices.
As it checked all my FAT32 USB pendrives without crashing on Ubuntu 12.04.4, this suggests that the current behaviour is some kind of regression. Correct?
Cheers,
Karl

--
Hello, Phillip.
> Would you be able to test the version in my ppa and see if that fixes this?
Thanks a lot for chiming in.
I assume the PPA is this one: ppa:psusi/ppa (https://launchpad.net/~psusi/+archive/ppa)
And the version to test then will be this one: gparted 0.18.0-1.ppa0 for Trusty Tahr (uploaded 8 hours ago)

Yes, I will install and test this gparted version on my Trusty Tahr x64 as soon as I can and give feedback, of course. Guess this will be some time on Wednesday, 04-June-2014.

Cheers,
Karl

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

That would be very helpful. I cherry picked an upstream fix that may be the cause of this, however, reproducing the problem and thus testing the fix has proven very difficult.

Revision history for this message
Karlchen (karlchen) wrote :

Hello, Phillip.

The gparted 0.18.0-1.ppa0 for Trusty has been installed. 3 different USB sticks have been checked by gparted.
Result: Sadly gparted 0.18.0-1.ppa0 crashed in all 3 cases as well. Yet, the crash messages differ from gparted 0.18.0-1.
Sorry.

Details:

(1) On Trusty Tahr with gparted 0.18.0-1 3 pendrives have been checked in gparted 0.18.0-1
gparted crashed on all 3 checks.
Attached file: gparted_0.18.0.1_noPPA.zip

(2) On Trusty Tahr with gparted_0.18.0.1.ppa0 the same 3 pendrives have been checked in gparted 0.18.0-1.ppa0
gparted crashed on all 3 checks.
Attached file: gparted_0.18.0.1_PPA0.zip

(3) The same machine was rebooted to Ubuntu 12.04.4. Still the same 3 pendrives have been checked in gparted 0.11.0-2
gparted worked as expected and checked all 3 USB pendrives. 3 gparted reports have been saved.
Attached file: gparted_0.11.0.2.zip

Note:
As I see, I have to combine all 3 attachments into a single attachment file. So all 3 named files will be found in the attachment gparted_0.18.0.1_1325708.zip

Kind regards,
Karl

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
Phillip Susi (psusi) wrote :

Could you try running gparted under valgrind? That may provide more clues.

Revision history for this message
Jordon Bedwell (envygeeks) wrote :

This error is actually caused by libparted even though it claims to originate from gparted as the same error can happen in fat32.

Revision history for this message
Jordon Bedwell (envygeeks) wrote :

I mean parted* sorry.

Revision history for this message
Karlchen (karlchen) wrote :

To Phillip Susi.
Sorry for not replying for such a long time, almost 2 weeks. Had neglected to check this bugreport regularly. About "valgrind": I admit I have never used it before. I will check what it does and how to use it and then come back here.
Cheers,
Karl

Revision history for this message
AlejandroV (lanjoe9) wrote :

I'm also affected by this bug.

Interestingly even parted crashes in my case; I don't know if this error is related or not.
Currently I don't have access to any previous version so I can't test if previous versions work ok.

parted /dev/sdc unit s print

Model: SanDisk SanDisk Cruzer (scsi)
Disk /dev/sdc: 31752191s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 40s 409639s 409600s fat32 EFI System Partition boot
 2 409640s 31490007s 31080368s fat32
>2K9 1 msftdata

*** Error in `parted': free(): invalid next size (normal): 0x0000000001635460 ***
Aborted (core dumped)

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

Could you install valgrind and run sudo valgrind parted /dev/sdc unit s print > valgrind.log, and attach the resulting log?

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

Upstream may have found the cause of this; are you still able to reproduce it at will?

Revision history for this message
Alexander Dorokhine (adorokhine) wrote :

Not the original reporter, but I can still (1.5 years later) reproduce this in 14.04.3 LTS in GParted 0.18.0. Any way I can help?

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

Can you add my ppa and try version 0.18.0-1.ppa0 there?

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

Any updates on this?

Revision history for this message
riveravaldez (riveravaldezmail) wrote :

The problem appears in this version:

$ apt-cache policy gparted
gparted:
  Instalados: 0.18.0-1
  Candidato: 0.18.0-1
  Tabla de versión:
 *** 0.18.0-1 0

And DOESN'T appear in this (older) one:

$ apt-cache policy gparted
gparted:
  Installed: 0.11.0-2ubuntu0.1
  Candidate: 0.11.0-2ubuntu0.1
  Version table:
 *** 0.11.0-2ubuntu0.1 0

Just in case this info is useful.

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.