Bug 865849 - ValueError: ('invalid size specification', '0 b')
Summary: ValueError: ('invalid size specification', '0 b')
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:5249a6e032e226dbed24b775a91...
: 867891 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-12 15:55 UTC by Steve Tyler
Modified: 2012-11-23 04:52 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-23 04:52:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (462.89 KB, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: environ (885 bytes, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: type (9 bytes, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: storage.log (170.39 KB, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: version (2 bytes, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: program.log (85.70 KB, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: product (6 bytes, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: anaconda.log (6.21 KB, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: hashmarkername (8 bytes, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: cmdline_file (162 bytes, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: release (33 bytes, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details
File: messages (171.65 KB, text/plain)
2012-10-12 15:55 UTC, Steve Tyler
no flags Details

Description Steve Tyler 2012-10-12 15:55:14 UTC
Description of problem:
Zero length disk:
$ qemu-img create f18-test-4.img 1

qemu-img creates a 0 byte disc image in this case.


Version-Release number of selected component:
anaconda-18.16-1.fc18.x86_64

Additional info:
libreport version: 2.0.14
cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-osimg-min --lang en_US.UTF-8
kernel:         3.6.1-1.fc18.x86_64

description:
:The following was filed automatically by anaconda:
:anaconda 18.16 exception report
:Traceback (most recent call first):
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/size.py", line 99, in _parseSpec
:    raise ValueError("invalid size specification", spec)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/size.py", line 137, in __new__
:    self = Decimal.__new__(cls, value=_parseSpec(spec))
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/cart.py", line 47, in size_str
:    return str(Size(spec=spec)).upper()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/cart.py", line 59, in initialize
:    size_str(free[disk.name][0]),
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/cart.py", line 97, in refresh
:    self.initialize(disks, free, showRemove=showRemove)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 576, in on_summary_clicked
:    free_space)
:ValueError: ('invalid size specification', '0 b')

Comment 1 Steve Tyler 2012-10-12 15:55:18 UTC
Created attachment 626091 [details]
File: anaconda-tb

Comment 2 Steve Tyler 2012-10-12 15:55:20 UTC
Created attachment 626092 [details]
File: environ

Comment 3 Steve Tyler 2012-10-12 15:55:21 UTC
Created attachment 626093 [details]
File: type

Comment 4 Steve Tyler 2012-10-12 15:55:23 UTC
Created attachment 626094 [details]
File: storage.log

Comment 5 Steve Tyler 2012-10-12 15:55:24 UTC
Created attachment 626095 [details]
File: version

Comment 6 Steve Tyler 2012-10-12 15:55:25 UTC
Created attachment 626096 [details]
File: program.log

Comment 7 Steve Tyler 2012-10-12 15:55:27 UTC
Created attachment 626097 [details]
File: product

Comment 8 Steve Tyler 2012-10-12 15:55:28 UTC
Created attachment 626098 [details]
File: anaconda.log

Comment 9 Steve Tyler 2012-10-12 15:55:31 UTC
Created attachment 626099 [details]
File: hashmarkername

Comment 10 Steve Tyler 2012-10-12 15:55:32 UTC
Created attachment 626100 [details]
File: cmdline_file

Comment 11 Steve Tyler 2012-10-12 15:55:33 UTC
Created attachment 626101 [details]
File: release

Comment 12 Steve Tyler 2012-10-12 15:55:35 UTC
Created attachment 626102 [details]
File: messages

Comment 13 Steve Tyler 2012-10-12 16:03:18 UTC
$ qemu-img create f18-test-4.img 1k

1024 bytes per 'ls -l'


Package: anaconda-18.16-1.fc18.x86_64
OS Release: Fedora release 18

Comment 14 David Lehman 2012-10-12 16:45:53 UTC
This particular traceback is in fact a bug, but don't let this confuse you into thinking you will ever be able to do anything with a disk of that size in the installer. We simply do not care at all about such cases. Not at all.

Comment 15 Steve Tyler 2012-10-12 16:58:21 UTC
What, no 1-byte installs? :-)

But seriously, a realistic use-case is a user typo when specifying the size of the disc image.

For comparison, parted simply returns, and fdisk complains about an "Invalid argument":

$ cat typescript-3 
Script started on Fri 12 Oct 2012 12:44:20 PM EDT
[root@localhost xfr]# parted /dev/sda print
[root@localhost xfr]# fdisk -l /dev/sda
fdisk: cannot open /dev/sda: Invalid argument
[root@localhost xfr]# rpm -q parted util-linux
parted-3.1-7.fc18.x86_64
util-linux-2.22-1.fc18.x86_64
[root@localhost xfr]# dmesg | grep sda
[    0.681689] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[    0.681779] sd 0:0:0:0: [sda] Write Protect is off
[    0.681787] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    0.681828] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    0.682219] sd 0:0:0:0: [sda] Attached SCSI disk
[root@localhost xfr]# exit

Script done on Fri 12 Oct 2012 12:45:22 PM EDT

Tested with:
$ qemu-kvm -m 2048 -hda f18-test-4.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC3/Fedora-18-Beta-TC3-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse

Comment 16 Adam Williamson 2012-11-05 20:03:49 UTC
*** Bug 867891 has been marked as a duplicate of this bug. ***

Comment 17 Adam Williamson 2012-11-05 20:05:11 UTC
dlehman believes the issue should be fixed in recent anaconda builds. If you can reliably reproduce this (you know what partitioning configuration and anaconda path causes it), can you try with TC7 and report whether it's fixed? Thanks!

Comment 18 Steve Tyler 2012-11-05 20:38:54 UTC
(In reply to comment #17)
> dlehman believes the issue should be fixed in recent anaconda builds. If you
> can reliably reproduce this (you know what partitioning configuration and
> anaconda path causes it), can you try with TC7 and report whether it's
> fixed? Thanks!

The test is very simple: Attempt to install to a 1 byte disc image:

$ qemu-img create f18-test-4.img 1

(In fact, qemu-img creates a zero-byte disc image.)

Comment 19 Steve Tyler 2012-11-05 22:25:09 UTC
With a zero-byte disc image, I couldn't reproduce this bug with 18.24 or 18.16.

With 18.24 (on F18-Beta-TC7):

Reproduced Bug 873392 with:

Test 1:
Click Installation Destination
Click Continue

These tests pass:

Test 2:
Click Installation Destination
Click Done

Test 3:
Click Installation Destination
Click Full disk summary and options
Click Close
Click Done

With 18.16 (updated from 18.14 on F18-Beta-TC3):
(versions per original report)

Reproduced Bug 863647 with:

Test 1:
Click Installation Destination
Click Continue

Comment 20 Steve Tyler 2012-11-05 23:08:27 UTC
Reproduce Bug 865849 with 18.16 on F18-Beta-TC3.

Package: anaconda-18.16-1.fc18.x86_64
OS Release: Fedora release 18

Comment 21 Steve Tyler 2012-11-05 23:25:12 UTC
(In reply to comment #20)
> Reproduce Bug 865849 with 18.16 on F18-Beta-TC3.
> 
> Package: anaconda-18.16-1.fc18.x86_64
> OS Release: Fedora release 18

Correcting myself.

With 18.16 on F18-Beta-TC3-Live and a zero-byte disc image,
this is the reproducer:

Test 3:
Click Installation Destination
Click Full disk summary and options >>>> (Bug 865849 - dupe)
Click Close
Click Done

The bug does not occur with 18.24 on F18-Beta-TC7-Live.

Comment 22 Adam Williamson 2012-11-06 00:01:01 UTC
Marking VERIFIED then, thanks.

Comment 23 Adam Williamson 2012-11-23 04:52:47 UTC
This bug looks to have been fixed for many anaconda builds now but missed being closed. If you find you are still experiencing it with Fedora 18 Beta (RC1) or later, please re-open the bug.

(ref comment #21)


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