← Back to team overview

sts-sponsors team mailing list archive

[Bug 1815129] Re: apt segfaults when generating cache file

 

** Changed in: apt (Ubuntu Trusty)
     Assignee: Heitor R. Alves de Siqueira (halves) => (unassigned)

** Changed in: apt (Ubuntu Trusty)
     Assignee: (unassigned) => Julian Andres Klode (juliank)

-- 
You received this bug notification because you are a member of STS
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1815129

Title:
  apt segfaults when generating cache file

Status in apt package in Ubuntu:
  Fix Released
Status in apt source package in Trusty:
  In Progress

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