Comment 5 for bug 639847

Revision history for this message
pablomme (pablomme) wrote : Re: Lock race between apt-get and aptdaemon

Ok, if I start Synaptic:
- 'apt-get update' complains that:
  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
  E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
- update-manager -> Check says "Waiting for Synaptic to exit"
which is all correct.

However, if I do 'apt-get update' and immediately hit 'Check' in update-manager, a window pops up saying:

"
An unhandled error occured

There seems to be a programming error in aptdaemon, the software that allows you to install/remove software and to perform other package management related tasks. Please report this error at http://launchpad.net/aptdaemon/+filebug and retry.

Details:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/aptdaemon/worker.py", line 163, in _process_transaction
    self.update_cache(**self.trans.kwargs)
  File "/usr/lib/python2.6/dist-packages/aptdaemon/worker.py", line 589, in update_cache
    self._cache.update(progress, sources_list=sources_list)
  File "/usr/lib/python2.6/dist-packages/apt/deprecation.py", line 98, in deprecated_function
    return func(*args, **kwds)
  File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 343, in update
    raise LockFailedException("Failed to lock %s" % lockfile)
LockFailedException: Failed to lock /var/lib/apt/lists/lock
"

Then, if I do 'apt-get install frozen-bubble' and open update-manager:
- during the download of packages, update-manager opens fine and pressing "Check" says "Waiting for apt-get to exit"
- during the actual installation, update-manager opens with the behaviour as in the bug description above (i.e., something breaks it during the "Building data structures" etc stage)