Synaptic won't start, report "Xapian::DatabaseCorruptError"

Bug #379568 reported by Martin Gamache
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
synaptic (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

For some reason, Synaptic (version 0.62.5ubuntu3) has stopped working on my 64 bits Jaunty laptop.

I tried starting it from the terminal and got this error message :

martin@Diogenes:/var/backups$ sudo synaptic
terminate called after throwing an instance of 'Xapian::DatabaseCorruptError'
Aborted

Following different leads on launchpad, I tried the following :

- uninstalling and reinstalling synaptic with apt-get;
- sudo dpkg-reconfigure synaptic
- sudo apt-get check
- sudo apt-get clean
- sudo dpkg --configure -a
- sudo apt-get -f install
- sudo apt-get --reinstall install xauth (and then sudo chown $(echo $USER) .Xauthority)

But nothing helped.

I checked on Google for this error, but found nothing...

Any suggestions, apart from re-installing everything?

Revision history for this message
Martin Gamache (martin-gamache) wrote :

Well, I also tried to install something from the add/remove panel (which seemed to work), but it does not work anymore, not even for uninstalling something....

I think the problem started after I forced Gnome to shut down (ctrl+alt+backspace), while synaptic was open.

I guess I'll have to reinstall everything in a couple of days...

Revision history for this message
Patrick Golec (patrick-golec) wrote :

I ran into the same problem on my DELL laptop (64-bit Jaunty) after it "froze" last night and I had to force shutdown. In any case, I ran:

sudo update-apt-xapian-index

and the problem appears to be fixed - Synaptic works once again.

Revision history for this message
Paul Elms (scifly) wrote :

Martin,
Do you still have this problem?
Does running sudo update-apt-xapian-index fix it like it did for Patrick?
Thanks.

Changed in synaptic (Ubuntu):
status: New → Incomplete
Revision history for this message
Martin Gamache (martin-gamache) wrote :

I don't have the problem anymore, because I re-installed Ubuntu on that computer. So I can't say if Patrick's solution works. If this problem ever occurs again, though, I'm going to try it...

Thanks for the interest.

Revision history for this message
Paul Elms (scifly) wrote :

This bug report is being closed due to your last comment regarding this being fixed. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in synaptic (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
zeimusu (james-kilfiger) wrote :

I had this after a crash fsck'd my root partition.
Running update-apt-xapian-index fixed the problem.

Revision history for this message
Skip Guenter (skip) wrote :

Fixed it for me!!! :-)

Revision history for this message
Loïc Alejandro (loic-alejandro) wrote :

Didn't fix the problem for me :(

Revision history for this message
Loïc Alejandro (loic-alejandro) wrote :

I get this at the end after doing a sudo update-apt-xapian-index :

Traceback (most recent call last):
  File "/usr/sbin/update-apt-xapian-index", line 108, in <module>
    indexer.rebuild(opts.pkgfile)
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 735, in rebuild
    self.buildIndex(dbdir, generator)
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 710, in buildIndex
    for doc in documents:
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 568, in gen_documents_apt
    yield self.get_document_from_apt(pkg)
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 531, in get_document_from_apt
    addon.obj.index(document, pkg)
  File "/usr/share/apt-xapian-index/plugins/apttags.py", line 125, in index
    rec = ver.record
  File "/usr/lib/python2.7/dist-packages/apt/package.py", line 417, in record
    return Record(self._records.record)
  File "/usr/lib/python2.7/dist-packages/apt/package.py", line 185, in __init__
    self._rec = apt_pkg.TagSection(record_str)
ValueError: Unable to parse section data

Revision history for this message
Wil Cooley (wilcooley) wrote :

I too have experienced this error from synaptic after a system freeze while unattended; the corruption was indeed corrected by running 'update-apt-xapian-index'.

Rather than merely documenting that this corruption can happen and the resolution, perhaps the upshot of this bug report should be a request that synaptic handle this situation more gracefully, such as by running 'update-apt-xapian-index' automatically? At a minimum, the error message could provide more information, such as suggesting rebuilding the index? The latter should probably be reported by a GUI window, rather than stdout/err, since many people will start synaptic through a GUI launcher, rather than from a terminal.

Revision history for this message
Luis Alvarado (luisalvarado) wrote :

cyrex@cyrex:~/Desktop$ sudo update-apt-xapian-index
No handlers could be found for logger "softwarecenter.db.update"
Reading .desktop files from /usr/share/app-install/desktop/: done.
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 518, 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))
cPickle.UnpicklingError: invalid load key, '-'.

This happened to me on Ubuntu 14.04 64 bit after installing synaptic and then rebooting. Somehow software-center disappeared. Even after installing it the error was still there. update-apt-xapian-index does not help, even with the --force parameter.

Revision history for this message
Juan Carlos Senar (jcsenar) wrote :

Hola: A mí me ha pasado lo mismo en Linux Mint 18 y con el comando:

sudo update-apt-xapian-index

se ha solucionado. Saludos,

Revision history for this message
Marko Indaco (mint-marko) wrote :

I solved the issue following the steps given by @Patrick Golec at post [#2] (thank you very much!)
I can't say nothing more than this because, in my case, the problem occours without an apperent reason.

I'm on Mint 18.2 (Cinnamon - 64bit)

Regards

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.