Bug 835601 - libparted crashes in mac_read on cheapo USB drive
Summary: libparted crashes in mac_read on cheapo USB drive
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: parted   
(Show other bugs)
Version: rawhide
Hardware: Unspecified Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Keywords: Reopened
: 854168 (view as bug list)
Depends On:
Blocks: F18Alpha, F18AlphaBlocker
TreeView+ depends on / blocked
 
Reported: 2012-06-26 14:55 UTC by Chris Lumens
Modified: 2012-09-07 23:19 UTC (History)
6 users (show)

Fixed In Version: parted-3.1-7.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-07 23:19:14 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
first 34 sectors of USB drive (17.00 KB, application/octet-stream)
2012-06-26 14:55 UTC, Chris Lumens
no flags Details

Description Chris Lumens 2012-06-26 14:55:21 UTC
Created attachment 594503 [details]
first 34 sectors of USB drive

I blasted a custom Fedora x86 DVD image onto a cheap USB key drive, and then attempted to install from it.  The installation halts during storage probing.  After some digging, I discovered the following reproducer outside of anaconda with pyparted:

In [1]: import _ped
In [2]: xxx = _ped.device_get("/dev/sdb")
In [3]: _ped.Disk(xxx)

However, this is reproducible outside of pyparted by just attempting "parted /dev/sdb p".  A core dump gives the following:

#0  0x0000003f90c362a5 in raise () from /lib64/libc.so.6
#1  0x0000003f90c37bbb in abort () from /lib64/libc.so.6
#2  0x0000003f90c75ffe in __libc_message () from /lib64/libc.so.6
#3  0x0000003f90c7c606 in malloc_printerr () from /lib64/libc.so.6
#4  0x00007fe666f592fa in mac_read (disk=0x1eedc10) at mac.c:832
#5  0x00007fe666f44200 in ped_disk_new (dev=0x1f044b0) at disk.c:204
#6  0x00007fe66718ba2a in _ped_Disk_init (self=0x1f68f38, args=<optimized out>, kwds=<optimized out>) at src/pydisk.c:425
(irrelevant python stuff omitted)

This is funny, because there shouldn't be mac_anything involved.  I am attaching the first 34 sectors of the device in question.

Comment 1 Lingzhu Xiang 2012-08-16 06:02:03 UTC
Maybe try to /dev/zero the drive and verify its image integrity? I was playing with partition tables just to find out, obviously, handling all kinds of corruption is not a duty of parted.

Comment 2 Brian Lane 2012-09-04 23:43:51 UTC
*** Bug 854168 has been marked as a duplicate of this bug. ***

Comment 3 Brian Lane 2012-09-04 23:45:54 UTC
It ends up that the problem was in max_read, it would change the sector_size to 2048 without re-allocating the read buffer.

Comment 4 Fedora Update System 2012-09-05 00:30:38 UTC
parted-3.1-7.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/parted-3.1-7.fc18

Comment 5 Brian Lane 2012-09-05 00:34:41 UTC
You can test this with a livecd by downloading it and installing it before running liveinst.

Comment 6 Kamil Páral 2012-09-05 12:09:38 UTC
I have updated parted and liveinst now can be run on TC5.

Comment 7 Adam Williamson 2012-09-05 17:40:16 UTC
Discussed at 2012-09-05 blocker review meeting. Accepted as a blocker per criterion "The installer must boot (if appropriate) and run on all primary architectures, with all system firmware types that are common on those architectures, from default live image, DVD, and boot.iso install media when written to an optical disc and when written to a USB stick with at least one of the officially supported methods" - it appears this bug is pretty likely to occur on any USB installation. Three different people have hit it with multiple sticks, so far.

Comment 8 Kamil Páral 2012-09-07 09:52:27 UTC
This is fixed in Alpha TC6 (anaconda 18.6.5).

Comment 9 Kamil Páral 2012-09-07 09:54:03 UTC
Ah, bad bad me. This is about parted update, and it's not still in stable updates yet. Reverting to VERIFIED.

Comment 10 Fedora Update System 2012-09-07 23:19:14 UTC
parted-3.1-7.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.