Bug 1323432

Summary: Some kickstart install result in crash on anaconda start with "decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]"
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: python-blivetAssignee: Blivet Maintenance Team <blivet-maint-list>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 25CC: atodorov, blivet-maint-list
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-12 10:52:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Adam Williamson 2016-04-02 23:03:55 UTC
Well I'm building a crazy thing to run the anaconda kickstart-tests in openQA, and it seems like it's working at least well enough to discover a bug. Several of the tests - e.g. https://openqa.happyassassin.net/tests/2841 - fail with a blivet traceback:

File "/sbin/anaconda", line 1094, in <module>
  setupDisplay(anaconda, opts, addon_paths)
File "/sbin/anaconda", line 479, in setupDisplay
  if blivet.util.total_memory() < isys.MIN_GUI_RAM:
File "/tmp/updates/blivet/util.py", line 319, in total_memory
  mem = (mem / bs + 1) * bs
File "/tmp/updates/blivet/size.py", line 79, in __truediv__
  ret = bytesize.Size.__truediv__(self, other)
File "/usr/lib64/python3.5/site-packages/bytesize/bytesize.py", line 512, in __truediv__
  return Decimal(self._c_size.true_div(other._c_size))
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]

that's re-typed manually, so may be typos. This job was for the 'keyboard' test, several others fail the same way. openQA creates its VMs with 2GiB of RAM ('-m 2048'). The test is being run with the 2016-03-31 Rawhide nightly plus http://dlehman.fedorapeople.org/updates/1322943.0.img , which is an updates image dlehman gave me to get past #1322943. This should be the exact qemu command:

/usr/bin/qemu-kvm -serial file:serial0 -soundhw ac97 -global isa-fdc.driveA= -vga qxl -m 2048 -cpu host -netdev user,id=qanet0 -device virtio-net,netdev=qanet0,mac=52:54:00:12:34:56 -device virtio-scsi-pci,id=scsi0 -device virtio-blk,drive=hd1 -drive file=raid/l1,cache=unsafe,if=none,id=hd1,format=qcow2 -drive media=cdrom,if=none,id=cd0,format=raw,file=/var/lib/openqa/share/factory/iso/Fedora-Everything-netinst-x86_64-Rawhide-20160331.n.0.iso -device scsi-cd,drive=cd0,bus=scsi0.0 -boot once=d,menu=on,splash-time=5000 -device usb-ehci -device usb-tablet -smp 2 -enable-kvm -no-shutdown -vnc :94,share=force-shared -qmp unix:qmp_socket,server,nowait -monitor unix:hmp_socket,server,nowait -S -monitor telnet:127.0.0.1:20042,server,nowait

Comment 1 Alexander Todorov 2016-04-05 09:57:07 UTC
I also get this when I try to execute anaconda.py manually from the git checkout.

Comment 2 Alexander Todorov 2016-04-05 10:04:32 UTC
QE note: I'm having this problem when the LANG variable is set to bg_BG.utf8 and a floating point value is using a comma instead of a decimal point (70,12340). If I switch to LANG=C I have no problems.

Btw this is more likely a bug in the bytesize library than in anaconda.

Comment 3 Adam Williamson 2016-04-05 14:55:46 UTC
Indeed the affected test sets "lang cs_CZ.UTF-8".

Comment 4 Adam Williamson 2016-05-04 00:38:55 UTC
With current Rawhide we're seeing a similar traceback for interactive installation in French, after clicking 'Done' on INSTALLATION DESTINATION:

https://openqa.stg.fedoraproject.org/tests/16234

anaconda 25.10-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python3.5/site-packages/bytesize/bytesize.py", line 512, in __truediv__
    return Decimal(self._c_size.true_div(other._c_size))
  File "/usr/lib/python3.5/site-packages/blivet/size.py", line 79, in __truediv__
    ret = bytesize.Size.__truediv__(self, other)
  File "/usr/lib/python3.5/site-packages/blivet/util.py", line 319, in total_memory
    mem = (mem / bs + 1) * bs
  File "/usr/lib/python3.5/site-packages/blivet/autopart.py", line 58, in swap_suggestion
    mem = util.total_memory()
  File "/usr/lib64/python3.5/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 876, in _check_space_and_get_dialog
    auto_swap = autopart.swap_suggestion()
  File "/usr/lib64/python3.5/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 1018, in on_back_clicked
    dialog = self._check_space_and_get_dialog(disks)
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]

Comment 5 Adam Williamson 2016-05-18 15:14:20 UTC
Still happening as of anaconda 25.12-1 .

Comment 6 Jan Kurik 2016-07-26 04:07:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 7 Fedora End Of Life 2017-11-16 18:53:37 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2017-12-12 10:52:58 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.