[Bug 1928488] Re: Receiving error for /var/cache/apt/archives/fonts-noto-cjk compressed data is corrupt

Trejkaz 1928488 at bugs.launchpad.net
Sun Aug 29 06:58:11 UTC 2021


Same issue, different Ubuntu version, different archive.

Release: 18.04
apt:
  Installed: 1.6.14

My error:
```
Unpacking libpython3.6-dev:amd64 (3.6.9-1~18.04ubuntu1.4) over (3.6.9-1~18.04ubuntu1.3) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /tmp/apt-dpkg-install-mL3NjE/000-libpython3.6-dev_3.6.9-1~18.04ubuntu1.4_amd64.deb (--unpack):
 cannot copy extracted data for './usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m-pic.a' to '/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m-pic.a.dpkg-new': unexpected end of file or stream
```

I diagnosed the issue as best I could:
- apt caches files in /var/cache/apt/archives
- I found the file libpython3.6-dev_3.6.9-1~18.04ubuntu1.4_amd64.deb
- On deleting this file, running the command again worked.

Therefore the bug in my case was clearly:
- apt downloaded a corrupt file
- apt did not verify that the file's checksum was correct
- apt proceeded to cache the file despite the checksum being incorrect
- the cached file is now on my system and apt refuses to redownload it
- therefore it is impossible to get it to work without user intervention, in this case by manually deleting the cached file

Suggested fix:
- verify that file checksums are correct BEFORE inserting the file into the cache
- if that is for some reason impossible (for instance if apt does not checksum files - which seems completely ludicrous to me from a security standpoint but I insert it here just in case), at least verify that the archive can be opened, before inserting into the cache
- ideally, if a file found in the cache cannot be uncompressed, delete it from the cache and fetch it again.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1928488

Title:
  Receiving error for /var/cache/apt/archives/fonts-noto-cjk compressed
  data is corrupt

Status in apt package in Ubuntu:
  New

Bug description:
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
       ???@???-OMEN:~$ lsb_release -rd
       Description:	Ubuntu 21.04
       Release:	        21.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in    Software Center
        ???-OMEN:~$ apt-cache policy fonts-noto-cjk
        fonts-noto-cjk:
         Installed: 1:20190410+repack1-2
          Candidate: 1:20201206-cjk+repack1-1
          Version table:
             1:20201206-cjk+repack1-1 500
                500 http://us.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages
                500 http://us.archive.ubuntu.com/ubuntu hirsute/main i386 Packages
         *** 1:20190410+repack1-2 100
               100 /var/lib/dpkg/status

       ???@???-OMEN:~$ apt-cache policy fonts-noto-extra
       fonts-noto-extra:
         Installed: 20200323-1build1
         Candidate: 20201225-1build1
         Version table:
            20201225-1build1 500
               500 http://us.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
               500 http://us.archive.ubuntu.com/ubuntu hirsute/universe i386 Packages
         *** 20200323-1build1 100
               100 /var/lib/dpkg/status

  3) What you expected to happen
       I went to execute the upgrade from Ubuntu 21.03 to 21.04 and now cosistently receiving this error.

  4) What happened instead
        Continually reciving this error whenever I run Software Update or APT UPGRADE

  ???@???-OMEN:~$ sudo apt upgrade -y
  Reading package lists... Done
  Building dependency tree... Done
  Reading state information... Done
  Calculating upgrade... Done
  The following packages will be upgraded:
    fonts-noto-cjk fonts-noto-extra
  2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  Need to get 0 B/128 MB of archives.
  After this operation, 11.3 MB of additional disk space will be used.
  (Reading database ... 235767 files and directories currently installed.)
  Preparing to unpack .../fonts-noto-cjk_1%3a20201206-cjk+repack1-1_all.deb ...
  Unpacking fonts-noto-cjk (1:20201206-cjk+repack1-1) over (1:20190410+repack1-2)
  ...
  dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/fonts-noto
  -cjk_1%3a20201206-cjk+repack1-1_all.deb' (size=55140504) member 'data.tar': lzma
   error: compressed data is corrupt

  dpkg-deb: error: <decompress> subprocess returned error exit status 2
  dpkg: error processing archive /var/cache/apt/archives/fonts-noto-cjk_1%3a202012
  06-cjk+repack1-1_all.deb (--unpack):
   cannot copy extracted data for './usr/share/fonts/opentype/noto/NotoSerifCJK-Bo
  ld.ttc' to '/usr/share/fonts/opentype/noto/NotoSerifCJK-Bold.ttc.dpkg-new': unex
  pected end of file or stream

  Preparing to unpack .../fonts-noto-extra_20201225-1build1_all.deb ...
  Unpacking fonts-noto-extra (20201225-1build1) over (20200323-1build1) ...
  dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/fonts-noto
  -extra_20201225-1build1_all.deb' (size=72415620) member 'data.tar': lzma error:
  compressed data is corrupt

  dpkg-deb: error: <decompress> subprocess returned error exit status 2
  dpkg: error processing archive /var/cache/apt/archives/fonts-noto-extra_20201225
  -1build1_all.deb (--unpack):
   cannot copy extracted data for './usr/share/fonts/truetype/noto/NotoSerifGeorgi
  an-ExtraCondensed.ttf' to '/usr/share/fonts/truetype/noto/NotoSerifGeorgian-Extr
  aCondensed.ttf.dpkg-new': unexpected end of file or stream
  Errors were encountered while processing:
   /var/cache/apt/archives/fonts-noto-cjk_1%3a20201206-cjk+repack1-1_all.deb
   /var/cache/apt/archives/fonts-noto-extra_20201225-1build1_all.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  ProblemType: Bug
  DistroRelease: Ubuntu 21.04
  Package: apt 2.2.3
  ProcVersionSignature: Ubuntu 5.11.0-17.18-generic 5.11.12
  Uname: Linux 5.11.0-17-generic x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.20.11-0ubuntu65
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CurrentDesktop: ubuntu:GNOME
  Date: Fri May 14 11:11:23 2021
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: apt
  UpgradeStatus: Upgraded to hirsute on 2021-05-14 (0 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1928488/+subscriptions




More information about the foundations-bugs mailing list