Can't take archive lock while synaptic is running

Bug #1871824 reported by errors.ubuntu.com bug bridge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
synaptic (Ubuntu)
New
Undecided
Unassigned
unattended-upgrades (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 90, in __enter__
    return self._lock.__enter__()
apt_pkg.Error: E:Could not get lock /var/cache/apt/archives/lock. It is held by process 2600 (synaptic)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 2512, in <module>
    sys.exit(main(options))
  File "/usr/bin/unattended-upgrade", line 1986, in main
    res = run(options, rootdir, mem_log, logfile_dpkg,
  File "/usr/bin/unattended-upgrade", line 2307, in run
    kernel_pkgs_kept_installed) = do_auto_remove(
  File "/usr/bin/unattended-upgrade", line 1876, in do_auto_remove
    res, error = cache_commit(cache, logfile_dpkg, verbose)
  File "/usr/bin/unattended-upgrade", line 861, in cache_commit
    res = cache.commit(install_progress=iprogress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 675, in commit
    with self._archive_lock:
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 92, in __enter__
    raise LockFailedException(("Failed to lock directory %s: %s") %
apt.cache.LockFailedException: Failed to lock directory /var/cache/apt/archives/: E:Could not get lock /var/cache/apt/archives/lock. It is held by process 2600 (synaptic)

--

The Ubuntu Error Tracker has been receiving reports about a problem regarding unattended-upgrades. This problem was most recently seen with package version 2.1, the problem page at https://errors.ubuntu.com/problem/4eb313e6525a788c7921331a31ca051b830f1fc6 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Tags: focal
Balint Reczey (rbalint)
description: updated
summary: - /usr/bin/unattended-
- upgrade:apt.cache.LockFailedException:__enter__:/usr/bin/unattended-
- upgrade@2512:main:run:do_auto_remove:cache_commit:commit:__enter__
+ Can't take lock while synaptic is running
summary: - Can't take lock while synaptic is running
+ Can't take archive lock while synaptic is running
Changed in unattended-upgrades (Ubuntu):
status: New → Invalid
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.