parted crashes when creating a partition on a lvm2 volume

Bug #666066 reported by Arnaud Soyez
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: parted

When creating a partition (ext2) on a lvm2 volume, parted crashes. I get different error messages depending on it is invoked, see below.

I launch parted with:
$ parted /dev/fluid/fpm
Utilisation de /dev/dm-0 (using /dev/dm-0)
Then I type:
mkpartfs
primary
ext2
0
5000
Ignore

And I get:

Erreur : SEGV_MAPERR (l'adresse n'est pas associée à un objet) (The address is not associated with a object)
Backtrace : 13 appels sur la pile:
  13: /lib/libparted.so.0(ped_assert+0x31) [0x7f255529d5c1]
  12: parted() [0x40c32f]
  11: /lib/libc.so.6(+0x33c20) [0x7f2554abac20]
  10: /lib/libparted.so.0(+0x1799c) [0x7f25552a699c]
  9: /lib/libparted.so.0(+0x185e8) [0x7f25552a75e8]
  8: /lib/libparted.so.0(+0x1b82f) [0x7f25552aa82f]
  7: /lib/libparted.so.0(ped_disk_commit_to_os+0x33) [0x7f25552a4393]
  6: /lib/libparted.so.0(ped_disk_commit+0x48) [0x7f25552a4688]
  5: parted() [0x408c4c]
  4: parted(interactive_mode+0xf3) [0x40db53]
  3: parted(main+0x8f) [0x40ab3f]
  2: /lib/libc.so.6(__libc_start_main+0xfe) [0x7f2554aa5d8e]
  1: parted() [0x404fa9]

Assertion (0) à ../../parted/ui.c: échec de 356 dans la fonction sa_sigsegv_handler(). (Failed of 356 in the function...)

============================

I am actually trying to use vmbuilder, which seems to launch the following command:

parted --script -- /dev/fluid/fpm mkpart primary ext2 0 9599

See for yourself:
2010-10-24 18:01:22,882 INFO : Mounting target filesystems
2010-10-24 18:01:22,882 INFO : Adding partition table to disk image: /dev/fluid/fpm
2010-10-24 18:01:23,075 INFO : Adding type 4 partition to disk image: /dev/fluid/fpm
2010-10-24 18:01:23,210 INFO : device-mapper: deps ioctl failed: No such device or address
2010-10-24 18:01:23,516 ERROR : Process (['parted', '--script', '--', '/dev/fluid/fpm', 'mkpart', 'primary', 'ext2', '0', '9599']) returned -11. stdout: , stderr: device-mapper: deps ioctl failed: No such device or address

And this gives me:

device-mapper: deps ioctl failed: No such device or address

When I try to launch that same command manually, I just get a core-dumped error.

============================

LVM Physical volumes:
  PV VG Fmt Attr PSize PFree
  /dev/sda3 fluid lvm2 a- 80,17g 70,17g
  /dev/sdb2 fluid lvm2 a- 70,92g 70,92g

LVM Volume Groups:
  VG #PV #LV #SN Attr VSize VFree
  fluid 2 1 0 wz--n- 151,09g 141,09g

LVM Logical volumes:
   LV VG Attr LSize Origin Snap% Move Log Copy% Convert
  fpm fluid -wi-a- 10,00g

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: parted 2.3-2ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Sun Oct 24 18:25:56 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20101002)
ProcEnviron:
 LC_MONETARY=en_US.utf8
 PATH=(custom, user)
 LANG=fr_FR.utf8
 SHELL=/bin/bash
SourcePackage: parted

Revision history for this message
Arnaud Soyez (weboide) wrote :
Arnaud Soyez (weboide)
description: updated
Revision history for this message
Matteo Bertini (naufraghi) wrote :

I have a very similar problem, with

ubuntu@ubuntu:~$ parted -v
parted (GNU parted) 2.3

ubuntu@ubuntu:~$ sudo parted -l
Backtrace has 14 calls on stack:
  14: /lib/libparted.so.0(ped_assert+0x31) [0x7ff8bb49f5c1]
  13: /lib/libparted.so.0(ped_geometry_read+0x80) [0x7ff8bb4a7070]
  12: /lib/libparted.so.0(hfsplus_probe+0x281) [0x7ff8bb4bf901]
  11: /lib/libparted.so.0(ped_file_system_probe_specific+0x5c) [0x7ff8bb4a0bcc]
  10: /lib/libparted.so.0(ped_file_system_probe+0xab) [0x7ff8bb4a117b]
  9: /lib/libparted.so.0(+0x3ff7f) [0x7ff8bb4d0f7f]
  8: /lib/libparted.so.0(ped_disk_new+0x75) [0x7ff8bb4a6815]
  7: parted() [0x40698e]
  6: parted() [0x40778d]
  5: parted() [0x4097d4]
  4: parted() [0x40a9cf]
  3: parted(main+0x2c) [0x40aadc]
  2: /lib/libc.so.6(__libc_start_main+0xfe) [0x7ff8baca7d8e]
  1: parted() [0x404fa9]
Aborted (core dumped)

My partition setup is:

ubuntu@ubuntu:~$ sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.5.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Disk identifier (GUID): 5D4BCC7F-FCBF-4F9C-9C2A-0705D3A375D6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Total free space is 611358651 sectors (291.5 GiB)

Number Start (sector) End (sector) Size Code Name
   1 40 409639 200.0 MiB EF00 EFI System
   2 409640 365414489 174.0 GiB AF00 Apple HFS/HFS+

ubuntu@ubuntu:~$ sudo fdisk -l /dev/sda

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 500.1 GB, 500107862016 bytes
256 heads, 63 sectors/track, 60563 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot Start End Blocks Id System
/dev/sda1 1 60564 488386583+ ee GPT

Revision history for this message
Matteo Bertini (naufraghi) wrote :

This is the GPT backup for comment #2

Revision history for this message
Matteo Bertini (naufraghi) wrote :

I later found the HFS+ partition was a bit damaged, after repairing parted has no more problems.

Revision history for this message
Simon Déziel (sdeziel) wrote :

This also affects Natty :

# parted /dev/dm-15 --script -- mklabel msdos
# parted /dev/dm-15 --script -- mkpart primary 1MiB 100%
device-mapper: deps ioctl failed: No such device or address
...

$ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

$ apt-cache policy parted
parted:
  Installed: 2.3-5ubuntu5
  Candidate: 2.3-5ubuntu5
  Version table:
 *** 2.3-5ubuntu5 0
        500 http://ca.archive.ubuntu.com/ubuntu/ natty/main amd64 Packages
        100 /var/lib/dpkg/status

Changed in parted (Ubuntu):
status: New → Confirmed
Revision history for this message
Simon Déziel (sdeziel) wrote :
Download full text (3.4 KiB)

When creating the partition table and partition using fdisk I tried altering the partition (set the boot flag) with parted. It's still crashing but the boot flag is set.

$ sudo parted /dev/vg0/test
GNU Parted 2.3
Using /dev/dm-15
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) set 1 boot on
device-mapper: deps ioctl failed: No such device or address

You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:

 http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:

 http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (2.3)
along with the error message below, the output of

 parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Command History:
set 1 boot on

Error: SEGV_MAPERR (Address not mapped to object)
Backtrace has 12 calls on stack:
  12: /lib/libparted.so.0(ped_assert+0x2e) [0x7f57a923f89e]
  11: parted() [0x40badf]
  10: /lib/x86_64-linux-gnu/libc.so.6(+0x33d80) [0x7f57a8a4ad80]
  9: /lib/libparted.so.0(+0x17ac1) [0x7f57a9248ac1]
  8: /lib/libparted.so.0(+0x1b60b) [0x7f57a924c60b]
  7: /lib/libparted.so.0(ped_disk_commit_to_os+0x4b) [0x7f57a924358b]
  6: /lib/libparted.so.0(ped_disk_commit+0x48) [0x7f57a9243718]
  5: parted() [0x405500]
  4: parted(interactive_mode+0xf3) [0x40dab3]
  3: parted(main+0x146f) [0x40aa9f]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff) [0x7f57a8a35eff]
  1: parted() [0x404fa9]

You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:

 http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:

 http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (2.3)
along with the error message below, the output of

 parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Assertion (0) at ../../parted/ui.c:356 in function sa_sigsegv_handler() failed.

$ sudo parted /dev/vg0/test unit co print unit s print
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-15: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Fla...

Read more...

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

I am unable to reproduce this on 12.10, are you?

Changed in parted (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for parted (Ubuntu) because there has been no activity for 60 days.]

Changed in parted (Ubuntu):
status: Incomplete → Expired
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.