Bug 835601 - libparted crashes in mac_read on cheapo USB drive
libparted crashes in mac_read on cheapo USB drive
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
AcceptedBlocker
: Reopened
: 854168 (view as bug list)
Depends On:
Blocks: F18Alpha/F18AlphaBlocker
  Show dependency treegraph
 
Reported: 2012-06-26 10:55 EDT by Chris Lumens
Modified: 2012-09-07 19:19 EDT (History)
6 users (show)

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


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

  None (edit)
Description Chris Lumens 2012-06-26 10:55:21 EDT
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 02:02:03 EDT
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 19:43:51 EDT
*** Bug 854168 has been marked as a duplicate of this bug. ***
Comment 3 Brian Lane 2012-09-04 19:45:54 EDT
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-04 20:30:38 EDT
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-04 20:34:41 EDT
You can test this with a livecd by downloading it and installing it before running liveinst.
Comment 6 Kamil Páral 2012-09-05 08:09:38 EDT
I have updated parted and liveinst now can be run on TC5.
Comment 7 Adam Williamson 2012-09-05 13:40:16 EDT
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 05:52:27 EDT
This is fixed in Alpha TC6 (anaconda 18.6.5).
Comment 9 Kamil Páral 2012-09-07 05:54:03 EDT
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 19:19:14 EDT
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.