Bug 1040012 - SizeNotPositiveError: spec= param must be >=0
Summary: SizeNotPositiveError: spec= param must be >=0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vratislav Podzimek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6199a73a0c0a09a2d28e3b77357...
Depends On:
Blocks: F20FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2013-12-10 13:50 UTC by Kamil Páral
Modified: 2013-12-13 05:33 UTC (History)
11 users (show)

Fixed In Version: anaconda-20.25.15-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-13 05:33:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (326.86 KB, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details
File: anaconda.log (5.61 KB, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details
File: environ (516 bytes, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details
File: journalctl (137.27 KB, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details
File: lsblk_output (2.33 KB, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details
File: nmcli_dev_list (4.32 KB, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details
File: os_info (375 bytes, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details
File: program.log (34.75 KB, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details
File: storage.log (107.84 KB, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details
File: ifcfg.log (1.77 KB, text/plain)
2013-12-10 13:50 UTC, Kamil Páral
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1013586 0 unspecified CLOSED SizeNotPositiveError: spec= param must be >=0 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1039288 0 unspecified CLOSED GB in interface is 1000*1024*1024 bytes which is neither binary nor decimal 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1039491 0 unspecified CLOSED "ValueError: new size same as old size" if you set a volume to 'Shrink' but do not change its size, in Reclaim Space 2021-02-22 00:41:40 UTC

Internal Links: 1013586 1039288 1039491

Description Kamil Páral 2013-12-10 13:50:23 UTC
Description of problem:
I wanted to reproduce bug 1039491, but I received a different crash instead. I created two empty partitions and this crash occured when I click Shrink button while having the first one selected. Probably not reproducible, I haven't seen it before.

Version-Release number of selected component:
anaconda-20.25.14-1.fc20.x86_64

The following was filed automatically by anaconda:
anaconda 20.25.14-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/size.py", line 96, in _parseSpec
    raise SizeNotPositiveError("spec= param must be >=0")
  File "/usr/lib/python2.7/site-packages/blivet/size.py", line 164, in __new__
    self = Decimal.__new__(cls, value=_parseSpec(en_spec, False))
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/lib/disks.py", line 80, in size_str
    size = Size(en_spec="%f mb" % mb)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py", line 219, in _update_labels
    text = _("Total selected space to reclaim: <b>%s</b>") % size_str(selectedReclaimable)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py", line 376, in _actionChanged
    self._update_labels(selectedReclaimable=self._selectedReclaimableSpace)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py", line 340, in on_shrink_clicked
    self._actionChanged(itr, SHRINK)
SizeNotPositiveError: spec= param must be >=0

Additional info:
cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   initrd=initrd0.img root=live:CDLABEL=Fedora-Live-Desktop-x86_64-20-TC rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0  BOOT_IMAGE=vmlinuz0 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.11.10-300.fc20.x86_64
other involved packages: python-blivet-0.23.8-1.fc20.noarch
product:        Fedora
release:        Fedora release 20 (Heisenbug)
type:           anaconda
version:        20

Comment 1 Kamil Páral 2013-12-10 13:50:27 UTC
Created attachment 834767 [details]
File: anaconda-tb

Comment 2 Kamil Páral 2013-12-10 13:50:31 UTC
Created attachment 834768 [details]
File: anaconda.log

Comment 3 Kamil Páral 2013-12-10 13:50:33 UTC
Created attachment 834769 [details]
File: environ

Comment 4 Kamil Páral 2013-12-10 13:50:35 UTC
Created attachment 834770 [details]
File: journalctl

Comment 5 Kamil Páral 2013-12-10 13:50:39 UTC
Created attachment 834771 [details]
File: lsblk_output

Comment 6 Kamil Páral 2013-12-10 13:50:42 UTC
Created attachment 834772 [details]
File: nmcli_dev_list

Comment 7 Kamil Páral 2013-12-10 13:50:44 UTC
Created attachment 834773 [details]
File: os_info

Comment 8 Kamil Páral 2013-12-10 13:50:47 UTC
Created attachment 834774 [details]
File: program.log

Comment 9 Kamil Páral 2013-12-10 13:50:51 UTC
Created attachment 834775 [details]
File: storage.log

Comment 10 Kamil Páral 2013-12-10 13:50:59 UTC
Created attachment 834776 [details]
File: ifcfg.log

Comment 11 Kamil Páral 2013-12-10 13:55:42 UTC
Oh, so it is reproducible - bug 1040012. I used gnome-disks to format the whole disk with GPT and then create two empty 500M ext4 partitions. In Anaconda I clicked on "I want more space" and then selected vda1 and clicked "Shrink". Immediate crash.

cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   initrd=initrd0.img root=live:CDLABEL=Fedora-Live-Desktop-x86_64-20-TC rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0  BOOT_IMAGE=vmlinuz0 
hashmarkername: anaconda
kernel:         3.11.10-300.fc20.x86_64
other involved packages: python-blivet-0.23.8-1.fc20.noarch
package:        anaconda-20.25.14-1.fc20.x86_64
packaging.log:  
product:        Fedora
reason:         SizeNotPositiveError: spec= param must be >=0
release:        Fedora release 20 (Heisenbug)
version:        20

Comment 12 Petr Schindler 2013-12-10 14:01:41 UTC
I reproduced bug following Kamil's instructions from comment 11.

cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   initrd=initrd0.img root=live:CDLABEL=Fedora-Live-Desktop-x86_64-20-TC rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0  BOOT_IMAGE=vmlinuz0 
hashmarkername: anaconda
kernel:         3.11.10-300.fc20.x86_64
other involved packages: python-blivet-0.23.8-1.fc20.noarch
package:        anaconda-20.25.14-1.fc20.x86_64
packaging.log:  
product:        Fedora
reason:         SizeNotPositiveError: spec= param must be >=0
release:        Fedora release 20 (Heisenbug)
version:        20

Comment 13 Alexey Torkhov 2013-12-10 14:20:37 UTC
This sounds like a dup of bug 1039728.

Comment 14 Kamil Páral 2013-12-10 14:35:30 UTC
No matter whether I use GPT or MBR, it crashes on partitions produced by gnome-disks and works on partitions produced by gparted.

Also it is interesting it crashes only for certain partitions (probably just small ones). When I used a single whole disk partition (8GB) it worked. When I used a single 3.7GB partition, it worked. But when I used a single 500 MB partition (or two of them, it doesn't matter), it crashed.

Is this another alignment issue? Is this another occurrence of bug 1013586?

Proposing as a Final blocker.

Comment 15 Kamil Páral 2013-12-10 14:41:32 UTC
I tried gdisk and its partitions also work by default. However, I found the difference.

gdisk creates 500 MiB partitions when I say "500M":

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34         1024033   500.0 MiB   8300  Linux filesystem

But gnome-disks create 500 MB partitions:

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          978610   476.8 MiB   8300  Linux filesystem

If I re-create the same partition (sectors 2048-978610) in gdisk, it crashes as well.

Anaconda doesn't handle certain partitions sizes well. I guess it could be connected to bug 1039288.

Comment 17 Adam Williamson 2013-12-10 17:28:34 UTC
I noticed the fix is only in pyanaconda/ui/gui/spokes/lib/resize.py ; do we need to check whether custom partitioning is affected by this too?

Comment 18 Adam Williamson 2013-12-10 17:48:45 UTC
doesn't appear to affect custom.

Comment 19 Adam Williamson 2013-12-10 17:50:38 UTC
Bug didn't affect F19, this is a new breakage in F20.

Comment 20 Adam Williamson 2013-12-11 05:09:09 UTC
The patch works - no more crash when selecting Shrink for the problematically-sized partition - but it allows me to try and make the partition very slightly larger, and if I do so, I hit a crash at the start of install (during partitioning). It looks like anaconda made the filesystem larger than the size of the partition:

00:06:24,834 INFO program: Running... e2fsck -f -p -C 0 /dev/vdb1
00:06:24,858 INFO program: /dev/vdb1: The filesystem size (according to the superblock) is 488280 blocks
00:06:24,858 INFO program: The physical size of the device is 487424 blocks
00:06:24,858 INFO program: Either the superblock or the partition table is likely to be corrupt!
00:06:24,858 INFO program: 
00:06:24,858 INFO program: 
00:06:24,858 INFO program: /dev/vdb1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

from program.log .

Comment 21 Adam Williamson 2013-12-11 05:17:04 UTC
More details - the 'Reclaim disk space' screen shows the current size (above the slider) as 476.83 MB, and the maximum size (label under the slider on far right) as 476.84 MB. I can hit the crash by dragging the slider to the right - at this point the 'Total selected space to reclaim' is listed as '4 B' - then hitting Reclaim Space and proceeding with install.

If I actually reduce the size of the partition, even just to 475 MB (the smallest change I can manage), no crash.

Comment 22 Vratislav Podzimek 2013-12-11 11:05:52 UTC
Please try this updates.img:
http://vpodzime.fedorapeople.org/f20_blockers_updates.img

Comment 23 Lukas Brabec 2013-12-11 12:08:46 UTC
(In reply to Vratislav Podzimek from comment #22)
> Please try this updates.img:
> http://vpodzime.fedorapeople.org/f20_blockers_updates.img

I wasn't able to reproduce this bug anymore, seems to be fixed...

Comment 24 Mike Ruckman 2013-12-11 18:09:58 UTC
Discussed in 2013-12-11 Blocker Review Meeting [1]. Voted as an AcceptedBlocker. Violates the Final criterion "Any installer mechanism for resizing storage volumes must correctly attempt the requested operation.". In this case anaconda crashes for certain partition sizes.

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2013-12-11/
[2] http://fedoraproject.org/wiki/Fedora_20_Final_Release_Criteria#Storage_volume_resize

Comment 25 Adam Williamson 2013-12-11 21:53:58 UTC
https://www.happyassassin.net/extras/updates-1040012.img should now have the 'state of the art' for this bug, with the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1040650 (which I discovered during the blocker meeting this morning) as well. Please try it out.

Comment 26 Fedora Update System 2013-12-11 22:48:32 UTC
anaconda-20.25.15-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/anaconda-20.25.15-1.fc20

Comment 27 Kamil Páral 2013-12-12 09:05:01 UTC
This no longer seems to happen with F20 RC1.

Comment 28 Fedora Update System 2013-12-13 05:33:58 UTC
anaconda-20.25.15-1.fc20, python-blivet-0.23.9-1.fc20 has been pushed to the Fedora 20 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.