[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#728572: python-apt: string to float conversion exception



Package: python-apt
Version: 2:0.9.1
Severity: normal

Dear Maintainer,

I noticed that unattended-upgrade seem to fail randomly with string to
float conversion exception. I made some modifications to
unattended-upgrade to print the exception stack trace which points
python-apt status update parsing code.

Exception happened during upgrade.
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 382, in upgrade_in_minimal_steps
    res  cache.commit(install_progressiprogress)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 498, in commit
    res  self.install_archives(pm, install_progress)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 462, in install_archives
    res  install_progress.run(pm)
  File "/usr/lib/python2.7/dist-packages/apt/progress/base.py", line 206, in run
    res  self.wait_child()
  File "/usr/lib/python2.7/dist-packages/apt/progress/base.py", line 276, in wait_child
    self.update_interface()
  File "/usr/bin/unattended-upgrade", line 172, in update_interface
    apt.progress.base.InstallProgress.update_interface(self)
  File "/usr/lib/python2.7/dist-packages/apt/progress/base.py", line 253, in update_interface
    if float(percent) ! self.percent or status_str ! self.status:
ValueError: could not convert string to float: amd64

Too bad the didn't reproduce any more when I modified python-apt to print
complete status line to stderr. But looking the status line made me
suspect that problem is caused by other side writing multilib selector
after package name randomly.

pmstatus:evolution-data-server-dev:40:Unpacking evolution-data-server-dev

I still have no idea what is writing to the stream from the forked process.
That information is hidden somewhere that I didn't quickly at least
figure out.

Possible fix in python-apt would be checking for the incorrect data and
reading all information after package name from one position more
towards right. But I'm not at all sure if that is correct fix so I'm not
even making that patch yet.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-apt depends on:
ii  libapt-inst1.5     0.9.12.1
ii  libapt-pkg4.12     0.9.12.1
ii  libc6              2.17-93
ii  libgcc1            1:4.8.2-1
ii  libstdc++6         4.8.2-1
ii  python             2.7.5-5
ii  python-apt-common  2:0.9.1

Versions of packages python-apt recommends:
ii  iso-codes    3.47-1
ii  lsb-release  4.1+Debian12
ii  xz-utils     5.1.1alpha+20120614-2

Versions of packages python-apt suggests:
pn  python-apt-dbg  <none>
pn  python-apt-doc  <none>
ii  python-gtk2     2.24.0-3+b1
ii  python-vte      1:0.28.2-5

-- no debconf information


Reply to: