Debian Bug report logs -
#800501
SystemError on missing files in /var/lib/apt/lists
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#800501; Package python-apt.
(Wed, 30 Sep 2015 08:15:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Sebastien Bacher <seb128@ubuntu.com>:
New Bug report received and forwarded. Copy sent to APT Development Team <deity@lists.debian.org>.
(Wed, 30 Sep 2015 08:15:05 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: python-apt
Version: 1.1.0~alpha3
Unsure when/how that is triggered but oneconf seems to hit that often in
Ubuntu
example
"Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/oneconf/packagesethandler.py",
line 63, in update
newpkg_list = self.distro.compute_local_packagelist()
File "/usr/lib/python3/dist-packages/oneconf/distributor/Ubuntu.py",
line 42, in compute_local_packagelist
with apt.Cache() as apt_cache:
File "/usr/lib/python3/dist-packages/apt/cache.py", line 113, in __init__
self.open(progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 166, in open
self._records = apt_pkg.PackageRecords(self._cache)
SystemError: E:Could not open file
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_restricted_binary-i386_Packages
- open (2: No such file or directory), E:Could not open file
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_multiverse_binary-i386_Packages
- open (2: No such file or directory), E:Could not open file
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_universe_binary-i386_Packages
- open (2: No such file or directory), E:Could not open file
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_main_binary-i386_Packages
- open (2: No such file or directory), E:Could not open file
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_restricted_binary-amd64_Packages
- open (2: No such file or directory), E:Could not open file
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_multiverse_binary-amd64_Packages
- open (2: No such file or directory), E:Could not open file
/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_universe_binary-amd64_Packages
- open (2: No such file or directory)"
Information forwarded
to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#800501; Package python-apt.
(Wed, 30 Sep 2015 08:24:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Julian Andres Klode <jak@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(Wed, 30 Sep 2015 08:24:03 GMT) (full text, mbox, link).
Message #10 received at 800501@bugs.debian.org (full text, mbox, reply):
Control: tag -1 unreproducible moreinfo
On Wed, Sep 30, 2015 at 10:12:52AM +0200, Sebastien Bacher wrote:
> Package: python-apt
> Version: 1.1.0~alpha3
>
> Unsure when/how that is triggered but oneconf seems to hit that often in
> Ubuntu
>
> example
>
> "Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/oneconf/packagesethandler.py",
> line 63, in update
> newpkg_list = self.distro.compute_local_packagelist()
> File "/usr/lib/python3/dist-packages/oneconf/distributor/Ubuntu.py",
> line 42, in compute_local_packagelist
> with apt.Cache() as apt_cache:
> File "/usr/lib/python3/dist-packages/apt/cache.py", line 113, in __init__
> self.open(progress)
> File "/usr/lib/python3/dist-packages/apt/cache.py", line 166, in open
> self._records = apt_pkg.PackageRecords(self._cache)
> SystemError: E:Could not open file
> /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_restricted_binary-i386_Packages
> - open (2: No such file or directory), E:Could not open file
> /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_multiverse_binary-i386_Packages
> - open (2: No such file or directory), E:Could not open file
> /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_universe_binary-i386_Packages
> - open (2: No such file or directory), E:Could not open file
> /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_main_binary-i386_Packages
> - open (2: No such file or directory), E:Could not open file
> /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_restricted_binary-amd64_Packages
> - open (2: No such file or directory), E:Could not open file
> /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_multiverse_binary-amd64_Packages
> - open (2: No such file or directory), E:Could not open file
> /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_wily_universe_binary-amd64_Packages
> - open (2: No such file or directory)"
You're probably opened the cache without holding a lock, and
an update ran in parallel. That's really the only possible
explanation I could think of.
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Be friendly, do not top-post, and follow RFC 1855 "Netiquette".
- If you don't I might ignore you.
Added tag(s) unreproducible and moreinfo.
Request was from Julian Andres Klode <jak@debian.org>
to 800501-submit@bugs.debian.org.
(Wed, 30 Sep 2015 08:24:03 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#800501; Package python-apt.
(Wed, 30 Sep 2015 09:03:08 GMT) (full text, mbox, link).
Acknowledgement sent
to Sebastien Bacher <seb128@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(Wed, 30 Sep 2015 09:03:08 GMT) (full text, mbox, link).
Message #17 received at 800501@bugs.debian.org (full text, mbox, reply):
> You're probably opened the cache without holding a lock, and
> an update ran in parallel. That's really the only possible
> explanation I could think of.
Is there a way to hold a lock as a normal user process? (oneconf is an
user session service)
If not is there a standard way to detect that something is changing the
cache under your feet and to deal with that?
Cheers,
Sebastien Bacher
Information forwarded
to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#800501; Package python-apt.
(Wed, 30 Sep 2015 09:06:08 GMT) (full text, mbox, link).
Acknowledgement sent
to Julian Andres Klode <jak@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(Wed, 30 Sep 2015 09:06:08 GMT) (full text, mbox, link).
Message #22 received at 800501@bugs.debian.org (full text, mbox, reply):
On Wed, Sep 30, 2015 at 10:59:26AM +0200, Sebastien Bacher wrote:
> > You're probably opened the cache without holding a lock, and
> > an update ran in parallel. That's really the only possible
> > explanation I could think of.
>
> Is there a way to hold a lock as a normal user process? (oneconf is an
> user session service)
> If not is there a standard way to detect that something is changing the
> cache under your feet and to deal with that?
Use inotify on the cache directory? But in any case, this is problematic
and could probably be fixed by adding some new interfaces to APT (so we
can open fds when opening the cache, and fail if the files are not
present there - and if they are present, pass those fds to the
PackageRecords - this would make things race-free).
I'll look more closely at this later.
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Be friendly, do not top-post, and follow RFC 1855 "Netiquette".
- If you don't I might ignore you.
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Jan 3 18:04:59 2018;
Machine Name:
beach
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.