Auto-partitioning with LVM on Advanced Format Disks causes parted_server segfault

Bug #1215458 reported by Kent Baxley on 2013-08-22
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Dell-poweredge project
High
Kent Baxley
partman-basicfilesystems (Ubuntu)
High
Colin Watson
Precise
High
Colin Watson
ubiquity (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned

Bug Description

When installing Ubuntu Server 13.10 (as well as 13.04, 12.10, and 12.04.{2,3}) on Advanced Format hard drives with native 4k/4k sectors, we encounter a crash in partman_server when electing to auto-partition using LVM. This also happens on the desktop versions.

Steps to reproduce:

1) Obtain a 4k/4k Advanced Format drive.
2) Begin installing Ubuntu Server 13.10.
3) At the partitioning phase select the "Guided - Use Entire Disk and Configure LVM" option.

Actual Results:
Once that is selected, the installer will try to partition the disk, but then it won't move past that point. If you switch over the Ctrl+Alt+F4 screen you'll see a segfault in parted_server. I've attached the crash dump from a recent attempt on the 13.10 desktp version.

Expected Results:
Successful auto-partitioning using LVM.

Notes:
Manual partitioning and auto-partitioning without LVM works fine. No crashes and the installer runs to completion.

If no Advanced Format disk is available, this could possibly be replicated using qemu like so:

 qemu-system-x86_64 -enable-kvm -monitor stdio -m 1024 -bios /usr/share/ovmf/OVMF.fd -cdrom raring-mini-amd64.iso -global ide-drive.physical_block_size=4096 -global ide-drive.logical_block_size=4096 -drive file=t.img,if=ide,index=0,media=disk

Kent Baxley (kentb) wrote :

Crash dump from a recent attempt.

Steve Langasek (vorlon) on 2013-08-22
Changed in partman-basicfilesystems (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
Kent Baxley (kentb) on 2013-08-22
Changed in dell-poweredge:
status: New → In Progress
assignee: nobody → Kent Baxley (kentb)
importance: Undecided → High
Colin Watson (cjwatson) wrote :

So far:

 * I've only been able to persuade qemu to give me 512/512 disks even though it seems to accept the options to provide 4K/4K
 * The .crash file attached here appears to be against a slightly old version of parted, and doesn't give me anything sensible when retraced now
 * I'm missing installer logs (especially partman, but also syslog) that might give me some more clues

I've asked Kent for an updated report with more logs.

Kent Baxley (kentb) wrote :

Attaching crash dump from today's 13.10 build

I reproduced using xubuntu's desktop since the server's gfx adapter was painfully slow on unity.

I'll also attach contents of /var/log/ next.

Kent Baxley (kentb) wrote :
Colin Watson (cjwatson) wrote :

Argh. Unfortunately parted is mispackaged such that there's no way I can get a reliable backtrace, since it doesn't have a sensibly laid out -dbg variant. I'm fixing this in Debian so that it doesn't bite me the next time round.

Colin Watson (cjwatson) wrote :

I've uploaded parted 2.3-16 to fix the -dbg package. Once we sync this into saucy and rebuild images with the new version, it should be possible to have another go at gathering crash data.

Changed in partman-basicfilesystems (Ubuntu):
status: New → In Progress
importance: Undecided → High
Colin Watson (cjwatson) wrote :

Could you please try again with Xubuntu saucy daily-live 20130911.1 or newer? I should be able to get a more useful backtrace out of a crash from that.

Kent Baxley (kentb) wrote :

Latest round of traces and logs with the 911.1 Xubuntu live cd.

Kent Baxley (kentb) wrote :
Colin Watson (cjwatson) wrote :

(gdb) bt
#0 __memcpy_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1578
#1 0x00007ffc45d59ca6 in memcpy (__len=3997696, __src=0x9c5ae0, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:51
#2 linux_write (dev=0x9c03a0, buffer=0x9c5ae0, start=48906, count=<optimized out>) at ../../libparted/arch/linux.c:1927
#3 0x00007ffc45d556d0 in ped_geometry_write (geom=<optimized out>, buffer=<optimized out>, offset=10, count=<optimized out>) at ../../libparted/cs/geom.c:392
#4 0x00007ffc45d61c2f in ext2_mkfs_write_meta (timer=0x9c5030, gd=0x9c50a0, sb=0x7fffbf7ae970, handle=0x9c1420) at ../../../../libparted/fs/ext2/ext2_mkfs.c:225
#5 ext2_mkfs (handle=handle@entry=0x9c1420, numblocks=<optimized out>, numblocks@entry=0, log_block_size=<optimized out>, log_block_size@entry=0, blocks_per_group=<optimized out>, blocks_per_group@entry=0, inodes_per_group=3904, inodes_per_group@entry=0,
    sparse_sb=1, sparse_sb@entry=-1, reserved_block_percentage=5, reserved_block_percentage@entry=-1, timer=timer@entry=0x9c5030) at ../../../../libparted/fs/ext2/ext2_mkfs.c:611
#6 0x00007ffc45d642c9 in _ext2_create (geom=<optimized out>, timer=0x9c5030) at ../../../../libparted/fs/ext2/interface.c:190
#7 0x00007ffc45d4fed1 in ped_file_system_create (geom=0x9c1248, type=0x7ffc45fb7a40 <_ext2_type>, timer=0x9c5030) at ../../libparted/filesys.c:534
#8 0x00000000004039a2 in ?? ()
#9 0x000000000040baa1 in ?? ()
#10 0x000000000040f42c in ?? ()
#11 0x0000000000402bb1 in ?? ()
#12 0x00007ffc45999de5 in __libc_start_main (main=0x4029d0, argc=1, ubp_av=0x7fffbf7af0d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffbf7af0c8) at libc-start.c:260
#13 0x0000000000402bda in ?? ()

Colin Watson (cjwatson) wrote :

OK. This crash is from the ext2/3/4 filesystem creation code in parted, and, having looked at it, it's woefully unprepared for sector sizes larger than 1024 bytes (for that matter, I don't know whether it works for 1024-byte sectors, but there are definitely problems above that). This code is deprecated upstream and was removed in parted 3. However, we've been unable to upgrade Debian/Ubuntu to this so far because it would break the installer (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696123).

In my opinion, it is not safe to attempt a fix to this code in parted; it would require fairly extensive modifications and without upstream support there's no guarantee I'd get it right. However, a much easier change is to use mkfs.ext2 here instead. We already do that for ext3/4; ext2 is only involved here because of some weirdness in the LVM setup code in d-i. We lose progress bar support, but since we're already lacking that for the much more common ext3/4 filesystems, I don't think that's a big deal.

Colin Watson (cjwatson) on 2013-09-12
Changed in partman-basicfilesystems (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Colin Watson (cjwatson)
milestone: none → ubuntu-12.04.4
Colin Watson (cjwatson) on 2013-09-12
Changed in partman-basicfilesystems (Ubuntu Precise):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-basicfilesystems - 78ubuntu2

---------------
partman-basicfilesystems (78ubuntu2) saucy; urgency=low

  * Always use mkfs.ext2 to create ext2 filesystems, since libparted's ext2
    code is deprecated and can't handle large sector sizes (LP: #1215458).
 -- Colin Watson <email address hidden> Thu, 12 Sep 2013 13:29:43 +0100

Changed in partman-basicfilesystems (Ubuntu):
status: In Progress → Fix Released
Kent Baxley (kentb) wrote :

With the latest partman-basicfilesystems package in today's 13.10 build I'm able to perform an auto-partition with LVM without a crash. Thanks!

I am, however, presented with an unbootable machine, but, this may be more related to what we are working through in this bug with the EFI system partition:

https://bugs.launchpad.net/ubuntu/+source/partman-basicfilesystems/+bug/1065281

I think the problem at-hand with LVM, though, looks to be sorted in 13.10.

Right, I don't expect this will be end-to-end testable until we finish
sorting out bug 1065281.

Hello Kent, or anyone else affected,

Accepted partman-basicfilesystems into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/partman-basicfilesystems/71ubuntu3.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in partman-basicfilesystems (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Simon Déziel (sdeziel) wrote :

In comment #11, Colin mentions that ext2 is used when LVM is involved. I wonder if that refers to the ext2 /boot part that is created along with guided partitioning and LVM setups. If yes, then why using ext2 instead of ext4? I've been using ext4 /boot and LVM without issue on Precise (not using the auto-partioning though).

ext2 /boot is a pretty old decision to try to keep things maximally
simple. It's probably no longer a big deal, but I don't see a huge
reason to change it either.

However, for the purposes of this bug it's moot because the thing that
was actually failing was partman-auto-lvm creating a dummy "ext2"
partition as part of the process of creating LVM physical volumes; this
is just because partman's internal interfaces for creating partitions
require specifying a filesystem type, and it doesn't correspond to a
real ext2 filesystem in the installed system.

Hello Kent, or anyone else affected,

Accepted partman-basicfilesystems into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/partman-basicfilesystems/71ubuntu3.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Kent Baxley (kentb) on 2013-10-31
Changed in dell-poweredge:
status: In Progress → Fix Committed
Kent Baxley (kentb) wrote :

Tested with 12.04 daily builds. I confirm that the crashes no longer occur when using LVM with advanced format disks.

Thanks.

tags: added: verification-done
removed: verification-needed
Changed in ubiquity (Ubuntu):
status: New → Fix Released
Changed in ubiquity (Ubuntu Precise):
status: New → In Progress
Stéphane Graber (stgraber) wrote :

Hello Kent, or anyone else affected,

Accepted partman-basicfilesystems into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/partman-basicfilesystems/71ubuntu3.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Colin Watson (cjwatson) wrote :

Hello Kent, or anyone else affected,

Accepted ubiquity into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubiquity/2.10.28 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubiquity (Ubuntu Precise):
status: In Progress → Fix Committed
Kent Baxley (kentb) wrote :

Verified that partman-basicfilesystems didn't cause any regressions with the installation and LVM. I will try the ubiquity fixes tomorrow.

Kent Baxley (kentb) wrote :

I don't see any issues with ubiquity with regard to this issue, so, I'll mark verification-done

tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-basicfilesystems - 71ubuntu3.4

---------------
partman-basicfilesystems (71ubuntu3.4) precise; urgency=low

  * Make nodiratime and discard mount options translatable (closes: #725371,
    LP: #978032).

partman-basicfilesystems (71ubuntu3.3) precise; urgency=low

  * Add nodiratime option for ext2, and noatime, nodiratime, relatime, and
    discard options for fat16 and fat32 (see #722598; LP: #978032).

partman-basicfilesystems (71ubuntu3.2) precise; urgency=low

  * Always use mkfs.ext2 to create ext2 filesystems, since libparted's ext2
    code is deprecated and can't handle large sector sizes (LP: #1215458).
 -- Colin Watson <email address hidden> Fri, 29 Nov 2013 12:08:27 +0000

Changed in partman-basicfilesystems (Ubuntu Precise):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.10.28

---------------
ubiquity (2.10.28) precise; urgency=low

  * Automatic update of included source packages: partman-
    basicfilesystems 71ubuntu3.4. (LP: #978032)

ubiquity (2.10.27) precise; urgency=low

  * Automatic update of included source packages: netcfg 1.68ubuntu14.1
    (LP: #901700), partman-auto 101ubuntu2.2 (LP: #1197766, #1065281),
    partman-base 153ubuntu6 (LP: #1065281), partman-basicfilesystems
    71ubuntu3.3 (LP: #978032, #1215458), partman-btrfs 8ubuntu1.1 (LP:
    #978032), partman-efi 25ubuntu1.2 (LP: #1065281), partman-ext3
    67ubuntu1.1 (LP: #978032).
 -- Dmitrijs Ledkovs <email address hidden> Tue, 03 Dec 2013 18:04:05 +0000

Changed in ubiquity (Ubuntu Precise):
status: Fix Committed → Fix Released
Kent Baxley (kentb) on 2014-06-27
Changed in dell-poweredge:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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