package_hook crashed with FileNotFoundError in makedirs(): [Errno 2] No such file or directory: '//var/cache/apt/archives/partial'

Bug #1790155 reported by Jungle Boy
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
New
Medium
Unassigned

Bug Description

Traceback (most recent call last):
  File "/usr/share/apport/package_hook", line 47, in <module>
    pr.add_package(options.package)
  File "/usr/lib/python3/dist-packages/apport/report.py", line 297, in add_package
    version = packaging.get_version(package)
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 133, in get_version
    pkg = self._apt_pkg(package)
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 126, in _apt_pkg
    return self._cache()[package]
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 91, in _cache
    self._apt_cache = apt.Cache(progress, rootdir='/')
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 134, in __init__
    self._check_and_create_required_dirs(rootdir)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 167, in _check_and_create_required_dirs
    os.makedirs(rootdir + d)
  File "/usr/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
FileNotFoundError: [Errno 2] No such file or directory: '//var/cache/apt/archives/partial'

ProblemType: Crash
DistroRelease: Ubuntu 18.10
Package: apport 2.20.10-0ubuntu9
ProcVersionSignature: Ubuntu 4.17.0-9.10-generic 4.17.17
Uname: Linux 4.17.0-9-generic x86_64
ApportVersion: 2.20.10-0ubuntu9
Architecture: amd64
CrashReports:
 600:0:117:477532:2018-08-30 21:37:16.894364432 +0530:2018-08-30 22:00:45.845285436 +0530:/var/crash/autofs.0.crash
 640:0:117:20449:2018-08-30 21:37:16.574347496 +0530:2018-08-30 21:37:17.574347496 +0530:/var/crash/_usr_share_apport_package_hook.0.crash
 600:0:117:211775:2018-08-30 22:02:54.401198146 +0530:2018-08-30 22:04:08.651412758 +0530:/var/crash/ttf-mscorefonts-installer.0.crash
 640:1000:117:2161231:2018-08-31 19:00:33.207204658 +0530:2018-08-31 19:00:30.443132877 +0530:/var/crash/_usr_bin_Xwayland.1000.crash
Date: Thu Aug 30 21:37:17 2018
ExecutablePath: /usr/share/apport/package_hook
InstallationDate: Installed on 2018-04-28 (125 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
InterpreterPath: /usr/bin/python3.6
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/share/apport/package_hook -p 522-autofs --tags dist-upgrade -l /var/log/dist-upgrade/apt.log -l /var/log/dist-upgrade/apt-term.log -l /var/log/dist-upgrade/apt-clone_system_state.tar.gz -l /var/log/dist-upgrade/history.log -l /var/log/dist-upgrade/lspci.txt -l /var/log/dist-upgrade/main.log -l /var/log/dist-upgrade/term.log -l /var/log/dist-upgrade/screenlog.0 -l /var/log/dist-upgrade/xorg_fixup.log
ProcEnviron:
 TERM=screen.xterm-256color
 SHELL=/bin/bash
 LANG=en_IN
 PATH=(custom, user)
Python3Details: /usr/bin/python3.6, Python 3.6.6+, python3-minimal, 3.6.6-1
PythonArgs: ['/usr/share/apport/package_hook', '-p', '522-autofs', '--tags', 'dist-upgrade', '-l', '/var/log/dist-upgrade/apt.log', '-l', '/var/log/dist-upgrade/apt-term.log', '-l', '/var/log/dist-upgrade/apt-clone_system_state.tar.gz', '-l', '/var/log/dist-upgrade/history.log', '-l', '/var/log/dist-upgrade/lspci.txt', '-l', '/var/log/dist-upgrade/main.log', '-l', '/var/log/dist-upgrade/term.log', '-l', '/var/log/dist-upgrade/screenlog.0', '-l', '/var/log/dist-upgrade/xorg_fixup.log']
PythonDetails: N/A
SourcePackage: apport
Title: package_hook crashed with FileNotFoundError in makedirs(): [Errno 2] No such file or directory: '//var/cache/apt/archives/partial'
UpgradeStatus: Upgraded to cosmic on 2018-08-30 (0 days ago)
UserGroups:

Revision history for this message
Jungle Boy (mowgli80) wrote :
tags: removed: need-duplicate-check
Changed in apport (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Benjamin Drung (bdrung) wrote :

Apport calls: apt.Cache(progress, rootdir='/')

This call should not crash that way. The library is provided by python3-apt. Therefore reassigning to it.

description: updated
information type: Private → Public
affects: apport (Ubuntu) → python-apt (Ubuntu)
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.