#800501 SystemError on missing files in /var/lib/apt/lists

Package:
python-apt
Source:
python-apt
Submitter:
Sebastien Bacher
Date:
2025-11-19 04:41:03 UTC
Severity:
normal
Tags:
#800501#5
Date:
2015-09-30 08:12:52 UTC
From:
To:
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)"

#800501#10
Date:
2015-09-30 08:20:39 UTC
From:
To:
Control: tag -1 unreproducible moreinfo

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.

#800501#17
Date:
2015-09-30 08:59:26 UTC
From:
To:
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

#800501#22
Date:
2015-09-30 09:04:01 UTC
From:
To:
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.

#800501#27
Date:
2025-11-19 04:14:02 UTC
From:
To:
Bitvavo – Beveiligingsmelding

Beveiligingsmelding

Er is een nieuwe aanmelding op uw Bitvavo-account geregistreerd vanaf een locatie die niet eerder is gebruikt.

Deze melding wordt automatisch verzonden wanneer ons systeem afwijkende activiteiten detecteert die afwijken van uw gebruikelijke inloggedrag.

Tijdstip
22:31

Locatie
Lagos, Nigeria

Indien deze activiteit door u is uitgevoerd, kunt u deze melding als veilig beschouwen.

Als u deze aanmelding niet zelf heeft uitgevoerd, verzoeken wij u dringend contact op te nemen met het Bitvavo-veiligheidsteam via +31107988007.

Dit bericht is automatisch gegenereerd. Bitvavo monitort afwijkende activiteiten continu om de veiligheid van uw account te waarborgen.