gparted crashes on scan

Bug #1318241 reported by Vincent Gerris
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gparted (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

a disk attached has as corrupt partition table.
When Gparted is started it complains about it and falls back to "a copy" but then later it shows that libparted has a bug.
When running from a terminal, this is the output:
(gpartedbin:23707): GLib-CRITICAL **: Source ID 750 was not found when attempting to remove it
Invalid argument during seek for read on /dev/sdc
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Backtrace has 9 calls on stack:
  9: /lib/x86_64-linux-gnu/libparted.so.0(ped_assert+0x31) [0x7f989f4c74b1]
  8: /lib/x86_64-linux-gnu/libparted.so.0(+0x3f5f6) [0x7f989f4f75f6]
  7: /lib/x86_64-linux-gnu/libparted.so.0(ped_disk_new+0x49) [0x7f989f4ccf99]
  6: gpartedbin() [0x4701e9]
  5: gpartedbin() [0x4792d9]
  4: /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1(+0x41a4d) [0x7f989df58a4d]
  3: /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x6df15) [0x7f989d574f15]
  2: /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x7f989c8cc182]
  1: /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f989c5f930d]
Assertion (last_usable <= disk->dev->length) at ../../../libparted/labels/gpt.c:994 in function _parse_header() failed.
Aborted (core dumped)

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gparted 0.18.0-1
ProcVersionSignature: Ubuntu 3.13.0-24.47-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
Date: Sat May 10 22:00:53 2014
InstallationDate: Installed on 2013-08-02 (281 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64+mac (20130424)
SourcePackage: gparted
SystemImageInfo: Error: [Errno 2] No such file or directory: 'system-image-cli'
UpgradeStatus: Upgraded to trusty on 2014-02-12 (86 days ago)

Revision history for this message
Vincent Gerris (vgerris) wrote :
Revision history for this message
Vincent Gerris (vgerris) wrote :

I found it is a bug in parted.
It is fixed in the latest version of parted, which can be found here:
http://ftp.gnu.org/gnu/parted/parted-3.1.tar.xz
I needed libuuid1
and libdevmapper-dev to compile and change the source code:
parted/ui.c from:
    rl_attempted_completion_function = (CPPFunction*) complete_function;
to
    rl_attempted_completion_function = (rl_completion_func_t*) complete_function;

to fix compiling.

Revision history for this message
Vincent Gerris (vgerris) wrote :

I would love to commit the patch but I do not have access to the git repo as it seems:
http://www.gnu.org/software/parted/download.shtml

I hope a new package of the latest parted can be inlcuded. thanks

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

Your partition table is corrupt: it claims the disk is larger than it actually is. You may be able to use gdisk to repair this.

Changed in gparted (Ubuntu):
status: New → Invalid
Revision history for this message
Vincent Gerris (vgerris) wrote :

Did you read the whole thing?
I know my partition table is corrupt. I am filing the bug because something goes wrong!
parted crashes!
I recompiled it using the instructions above and then it does not crash.
Even the output shows that it is a bug so please don't change statuses if you are not sure.

Changed in gparted (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Vincent Gerris (vgerris) wrote :

If anyone can point me to the process of submitting a fix, I'd be happy to.
It will involve updating the parted package and the fix to compile it on 14.04 is in post #2.

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

I am sure; debian and ubuntu are still using a rather old version of parted because the installer still depends on features that were removed in parted 3. In that version of parted, it simply refused to handle such a broken partition table. This has since been improved to give you the chance to repair the error instead. We hope to update parted in the next release of Ubuntu.

Revision history for this message
Mikhail (doe-dtse9) wrote :

My only workaround for the moment is that I'm using the precise version of gparted and libparted0debian1, which in newer versions of trusty are resulting in a crash and I have to kill gpartedbin everytime when gparted starts to scan for removable devices, I'm not a coder myself and I can't provide a fix in a source code in order to be able to do this, but apt-pinning is a way to go in case I have to swap versions without upgrading one of these packages, in this case gparted libparted0debian1 are the main reason for needing downgrade until the next version of gparted is fixed.

I know that this bugtracker is reffering to the latest version of gparted so I can't suggest anything else so far.

I hope that's being useful and I hope this will help others to struggle with the bug.

:)

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.