ValueError: could not convert string to float: k_latency=0.850

Bug #971864 reported by Thomas Schweikle
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

/etc/cron.daily/apt:
Traceback (most recent call last):
  File "/usr/sbin/update-apt-xapian-index", line 101, in <module>
    if not indexer.setupIndexing(force=opts.force, system=opts.pkgfile is None):
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 513, in setupIndexing
    addon.obj.init(dict(values=self.values), self.progress)
  File "/usr/share/apt-xapian-index/plugins/cataloged_time.py", line 72, in init
    self._package_cataloged_time = cPickle.load(open(self._packages_cataloged_file))
ValueError: could not convert string to float: k_latency=0.850

This error is thrown from time to time from all versions of Ubuntu from 10.10 on upward:
Ubuntu 10.10
Ubuntu 11.04
Ubuntu 11.10
Ubuntu 12.04

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: apt 0.8.16~exp5ubuntu13.2
ProcVersionSignature: Ubuntu 3.0.0-17.30-virtual 3.0.22
Uname: Linux 3.0.0-17-virtual x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Mon Apr 2 22:08:38 2012
InstallationMedia: Ubuntu-Server 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.2)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apt
UpgradeStatus: Upgraded to oneiric on 2011-09-16 (199 days ago)

Revision history for this message
Thomas Schweikle (tps) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Gordon Mckeown (thefluffyone) wrote :

This issue seems to be due to a problem with the file /var/lib/apt-xapian-index/cataloged_times.p -- perhaps it's an invalid value or some file corruption that is resulting in the cPickle.load command failing to deserialise the file.

In my case I simply renamed this file, re-ran the index process (sudo /usr/sbin/update-xapian-index -u -f) and the issue appears to be resolved. I'll need to leave it a few days to let this run through cron in order to be completely sure.

Revision history for this message
Gordon Mckeown (thefluffyone) wrote :

Checking through the "bad" file, the line that caused the problem for me was in this section:

sS'gobi-loader:i386'
p27470
F1381297656/941432

For some reason, there was a forward slash instead of a decimal point. In case it helps someone else, the following code was used to find the bad value:

#!/usr/bin/env python
import pickle
myFile = open("var/lib/apt-xapian-index/cataloged_times.p", "r+")
pc = pickle.load(myFile)

Revision history for this message
Ivnitskii Andrei (ivnitsky-a) wrote :

Gordon Mckeown (thefluffyone), thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.