Public bug reported:

[Impact]
apt crashes (core dump) during cache creation

[Description]
When executing apt-cache several times on a memory constrained system, 
apt-cache can sometimes crash with a core dump file. This is related to mmap() 
failing allocations during cache generation, according to an upstream bug 
report (803417).
There is an upstream patch for this bug (6789e01e do not segfault in cache 
generation on mmap failure) and it's included in the apt package for other 
series (see below), so we only need to backport it to Trusty.

Upstream commit: https://salsa.debian.org/apt-
team/apt/commit/6789e01e9370b3b7f65d52138c5657eaa712b4d1

$ git describe --contains 6789e01e9370
1.1_exp16~5

$ rmadison apt
 apt | 1.0.1ubuntu2            | trusty           | source, amd64, arm64, 
armhf, i386, powerpc, ppc64el
 apt | 1.0.1ubuntu2.19         | trusty-security  | source, amd64, arm64, 
armhf, i386, powerpc, ppc64el
 apt | 1.0.1ubuntu2.19         | trusty-updates   | source, amd64, arm64, 
armhf, i386, powerpc, ppc64el
 apt | 1.2.10ubuntu1           | xenial           | source, amd64, arm64, 
armhf, i386, powerpc, ppc64el, s390x
 apt | 1.6.1                   | bionic           | source, amd64, arm64, 
armhf, i386, ppc64el, s390x
 apt | 1.7.0                   | cosmic           | source, amd64, arm64, 
armhf, i386, ppc64el, s390x
 apt | 1.8.0~rc2               | disco            | source, amd64, arm64, 
armhf, i386, ppc64el, s390x


[Test Case]
Unfortunately, this issue is not easy to reproduce. It seems to trigger 
randomly when "apt-cache policy" is called on a system under memory pressure, 
triggering the failure path in the mmap() allocations.

[Regression Potential]
The regression potential for this should be low, as it's a change in the 
failure path for memory allocations. This shouldn't be triggered during normal 
usage, and we'll thoroughly test the patched package with autopkgtests and 
perform scripted runs in memory-constrained systems with stress-ng.
We also have a confirmation from an impacted user that the upstream patch fixes 
their issue without further problems.

** Affects: apt (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: apt (Ubuntu Trusty)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1815129

Title:
  apt segfaults when generating cache file

Status in apt package in Ubuntu:
  New
Status in apt source package in Trusty:
  New

Bug description:
  [Impact]
  apt crashes (core dump) during cache creation

  [Description]
  When executing apt-cache several times on a memory constrained system, 
apt-cache can sometimes crash with a core dump file. This is related to mmap() 
failing allocations during cache generation, according to an upstream bug 
report (803417).
  There is an upstream patch for this bug (6789e01e do not segfault in cache 
generation on mmap failure) and it's included in the apt package for other 
series (see below), so we only need to backport it to Trusty.

  Upstream commit: https://salsa.debian.org/apt-
  team/apt/commit/6789e01e9370b3b7f65d52138c5657eaa712b4d1

  $ git describe --contains 6789e01e9370
  1.1_exp16~5

  $ rmadison apt
   apt | 1.0.1ubuntu2            | trusty           | source, amd64, arm64, 
armhf, i386, powerpc, ppc64el
   apt | 1.0.1ubuntu2.19         | trusty-security  | source, amd64, arm64, 
armhf, i386, powerpc, ppc64el
   apt | 1.0.1ubuntu2.19         | trusty-updates   | source, amd64, arm64, 
armhf, i386, powerpc, ppc64el
   apt | 1.2.10ubuntu1           | xenial           | source, amd64, arm64, 
armhf, i386, powerpc, ppc64el, s390x
   apt | 1.6.1                   | bionic           | source, amd64, arm64, 
armhf, i386, ppc64el, s390x
   apt | 1.7.0                   | cosmic           | source, amd64, arm64, 
armhf, i386, ppc64el, s390x
   apt | 1.8.0~rc2               | disco            | source, amd64, arm64, 
armhf, i386, ppc64el, s390x


  [Test Case]
  Unfortunately, this issue is not easy to reproduce. It seems to trigger 
randomly when "apt-cache policy" is called on a system under memory pressure, 
triggering the failure path in the mmap() allocations.

  [Regression Potential]
  The regression potential for this should be low, as it's a change in the 
failure path for memory allocations. This shouldn't be triggered during normal 
usage, and we'll thoroughly test the patched package with autopkgtests and 
perform scripted runs in memory-constrained systems with stress-ng.
  We also have a confirmation from an impacted user that the upstream patch 
fixes their issue without further problems.

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to