Bug 1300073 - OverflowError: can't convert negative int to unsigned
Summary: OverflowError: can't convert negative int to unsigned
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pyparted
Version: 23
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:69aaaeed42ef8b760334ad641c8...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-19 21:44 UTC by robert
Modified: 2016-06-16 00:16 UTC (History)
8 users (show)

Fixed In Version: pyparted-3.10.8-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-16 00:16:41 UTC
Type: ---


Attachments (Terms of Use)
File: anaconda-tb (596.86 KB, text/plain)
2016-01-19 21:44 UTC, robert
no flags Details
File: anaconda.log (13.20 KB, text/plain)
2016-01-19 21:44 UTC, robert
no flags Details
File: environ (537 bytes, text/plain)
2016-01-19 21:44 UTC, robert
no flags Details
File: journalctl (345.46 KB, text/plain)
2016-01-19 21:44 UTC, robert
no flags Details
File: lsblk_output (2.41 KB, text/plain)
2016-01-19 21:44 UTC, robert
no flags Details
File: nmcli_dev_list (2.86 KB, text/plain)
2016-01-19 21:44 UTC, robert
no flags Details
File: os_info (518 bytes, text/plain)
2016-01-19 21:44 UTC, robert
no flags Details
File: program.log (48.41 KB, text/plain)
2016-01-19 21:45 UTC, robert
no flags Details
File: storage.log (129.23 KB, text/plain)
2016-01-19 21:45 UTC, robert
no flags Details
File: ifcfg.log (8.38 KB, text/plain)
2016-01-19 21:45 UTC, robert
no flags Details

Description robert 2016-01-19 21:44:12 UTC
Description of problem:
Mint installed. Seeking to dual boot with Fedora23. Partitions as follows:

[liveuser@dhcppc5 ~]$ sudo parted /dev/sda print
Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  2097kB  1049kB                        bios_grub
 2      2097kB  1258GB  1258GB  ext4
 3      2996GB  3001GB  4252MB  linux-swap(v1)

Same problem if I create an extra partition for Fedora ...either way says I have negative available storage. I imagine it could be that I had to resize the Mint partition (partition 2) and this might have upset things. But I'm just guessing the cause here, and it may not be the case. 

Version-Release number of selected component:
anaconda-core-23.19.10-1.fc23.i686

The following was filed automatically by anaconda:
anaconda 23.19.10-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python3.4/site-packages/gi/overrides/GObject.py", line 258, in set_value
    self.set_uint64(py_value)
  File "/usr/lib/python3.4/site-packages/gi/overrides/GObject.py", line 218, in __init__
    self.set_value(py_value)
  File "/usr/lib/python3.4/site-packages/gi/overrides/Gtk.py", line 875, in _convert_value
    return GObject.Value(self.get_column_type(column), value)
  File "/usr/lib/python3.4/site-packages/gi/overrides/Gtk.py", line 857, in _convert_row
    result.append(self._convert_value(cur_col, value))
  File "/usr/lib/python3.4/site-packages/gi/overrides/Gtk.py", line 1199, in _do_insert
    row, columns = self._convert_row(row)
  File "/usr/lib/python3.4/site-packages/gi/overrides/Gtk.py", line 1207, in append
    return self._do_insert(parent, -1, row)
  File "/usr/lib/python3.4/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py", line 187, in populate
    dev.name])
  File "/usr/lib/python3.4/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py", line 325, in refresh
    self.populate(disks)
  File "/usr/lib/python3.4/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 849, in _run_dialogs
    resize_dialog.refresh(disks)
  File "/usr/lib/python3.4/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 969, in on_back_clicked
    rc = self._run_dialogs(disks, start_with=dialog)
OverflowError: can't convert negative int to unsigned

Additional info:
cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=vmlinuz0 initrd=initrd0.img root=live:CDLABEL=Fedora-Live-WS-i686-23-10 rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.2.3-300.fc23.i686
other involved packages: anaconda-gui-23.19.10-1.fc23.i686, python3-gobject-base-3.18.0-1.fc23.i686
product:        Fedora
release:        Fedora release 23 (Twenty Three)
type:           anaconda
version:        23

Comment 1 robert 2016-01-19 21:44:35 UTC
Created attachment 1116386 [details]
File: anaconda-tb

Comment 2 robert 2016-01-19 21:44:38 UTC
Created attachment 1116387 [details]
File: anaconda.log

Comment 3 robert 2016-01-19 21:44:39 UTC
Created attachment 1116388 [details]
File: environ

Comment 4 robert 2016-01-19 21:44:52 UTC
Created attachment 1116389 [details]
File: journalctl

Comment 5 robert 2016-01-19 21:44:54 UTC
Created attachment 1116390 [details]
File: lsblk_output

Comment 6 robert 2016-01-19 21:44:56 UTC
Created attachment 1116391 [details]
File: nmcli_dev_list

Comment 7 robert 2016-01-19 21:44:57 UTC
Created attachment 1116392 [details]
File: os_info

Comment 8 robert 2016-01-19 21:45:01 UTC
Created attachment 1116393 [details]
File: program.log

Comment 9 robert 2016-01-19 21:45:06 UTC
Created attachment 1116394 [details]
File: storage.log

Comment 10 robert 2016-01-19 21:45:08 UTC
Created attachment 1116395 [details]
File: ifcfg.log

Comment 11 David Lehman 2016-01-19 22:22:28 UTC
The reporter has a 2.73 TiB drive sda with 1.14 TiB partition sda2. pyparted is reporting a negative size for sda2. More details follow.


In the constructor for PartitionDevice, we update the size from /sys:

16:34:49,366 DEBUG blivet: updated sda2 size to 1.14 TiB (1.14 TiB)

Then we look up the parted.Partition using pyparted:

16:34:49,366 DEBUG blivet: looking up parted Partition: /dev/sda2
...

Then we update the size again, but this time we ask the parted.Partition since we have one:

16:34:49,374 DEBUG blivet:                 PartitionDevice.readCurrentSize: exists: True ; path: /dev/sda2 ; sysfsPath: /sys/devices/pci0000:00/0000:00:11.0/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda2 ;
16:34:49,375 DEBUG blivet: updated sda2 size to -875.97 GiB (1.14 TiB)

I also notice the length and end attributes of the parted.Geometry have the same thing going on:

16:34:49,375 INFO blivet: added partition sda2 (id 13) to device tree
16:34:49,375 INFO blivet: got device: PartitionDevice instance (0xae76be0c) --
  name = sda2  status = True  kids = 0 id = 13
  parents = ['existing 2.73 TiB disk sda (1) with existing gpt disklabel']
  uuid = None  size = -875.97 GiB
  ...
  disk = existing 2.73 TiB disk sda (1) with existing gpt disklabel
  start = 4096  end = -1837029377  length = -1837033472

Comment 12 Brian Lane 2016-01-20 21:42:45 UTC
What does the output of 'parted -s /dev/sda u s p free' show?

Also, what do 'start' and 'size' under /sys/devices/pci0000:00/0000:00:11.0/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda2/ show?

Comment 13 robert 2016-02-01 15:40:27 UTC
(sorry for delay, being new I first responded to bugzilla rather than logging in)


sudo  parted -s /dev/sda u s p free > partedout   .....

Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sda: 5860533168s
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start        End          Size         File system     Name  Flags
        34s          2047s        2014s        Free Space
 1      2048s        4095s        2048s                              bios_grub
 2      4096s        2457937919s  2457933824s  ext4
        2457937920s  5852227583s  3394289664s  Free Space
 3      5852227584s  5860532223s  8304640s     linux-swap(v1)
        5860532224s  5860533134s  911s         Free Space



[liveuser@localhost sda2]$ more size
2457933824

[liveuser@localhost sda2]$ more stat
     221        0    20832      401        0        0        0        0        0
      346      401
[liveuser@localhost sda2]$ more start
4096
[liveuser@localhost sda2]$

Comment 14 Brian Lane 2016-02-01 18:41:17 UTC
I think pyparted commit 6e62a95b5878be041152c6877c93cf9672dbda4c broke this. It changed PyLong_AsLongLong(value) to PyLong_AsLong(value) which works on 64bit systems but not on 32bit.

Comment 15 Brian Lane 2016-02-01 22:25:42 UTC
Give this updates image a try:

https://bcl.fedorapeople.org/updates/1300073.img

add updates=https://bcl.fedorapeople.org/updates/1300073.img to the kernel cmdline when booting.

Comment 16 robert 2016-02-16 00:58:20 UTC
Awesome. Now the proud owner of a Mint/Fedora dual boot. Thanks for both the solution and a learning opportunity.

Comment 17 Mike McCune 2016-03-28 22:19:01 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions


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