[Bug 1117682] Re: apt-get crashes with a segmentation fault

Leigh Simpson 1117682 at bugs.launchpad.net
Sat Mar 30 21:45:20 UTC 2013


Hi there, I can reproduce similar symptoms here and reproduce as follows:
 1. Take a clean CD install of Ubuntu 12.0.2, and install in a VM.
 2. Update and upgrade to the latest versions of all packages
 3. Run the following:
dpkg --list | grep ^ii | awk '{ print($2) }' | xargs apt-get install --reinstall

What happens:
332 packages are downloaded as expected. xargs then fails with the message "xargs: apt-get: terminated by signal 11". Here's the tail of the output:

Get:330 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main wpasupplicant amd64 0.7.3-6ubuntu2.1 [490 kB]
Get:331 http://gb.archive.ubuntu.com/ubuntu/ precise/main libiw30 amd64 30~pre9-5ubuntu2 [20.3 kB]
Get:332 http://gb.archive.ubuntu.com/ubuntu/ precise/main python-zope.interface amd64 3.6.1-1ubuntu3 [114 kB]
Fetched 110 MB in 1min 13s (1,495 kB/s)
xargs: apt-get: terminated by signal 11

The same problem occurs when calling apt manually:

# apt-get install --reinstall accountsservice acpid [...] xz-utils zlib1g
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 398 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/212 MB of archives.
After this operation, 0 B of additional disk space will be used.
Segmentation fault (core dumped)

I think I was able to work around by reinstalling packages ten at a time
using xargs -L 10 (it ran to completion, although I didn't check the
entire output). This implies the problem is caused by the sheer number
of packages rather than any particular packages.

I ran things again under gdb and got the following:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b03329 in pkgCache::DepIterator::IsIgnorable(pkgCache::PkgIterator const&) const () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
(gdb) where
#0  0x00007ffff7b03329 in pkgCache::DepIterator::IsIgnorable(pkgCache::PkgIterator const&) const () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
#1  0x00007ffff7b0355d in pkgCache::DepIterator::AllTargets() const () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
#2  0x00007ffff7b1cc85 in pkgPackageManager::SmartUnPack(pkgCache::PkgIterator, bool, int) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
#3  0x00007ffff7b21add in pkgPackageManager::OrderInstall() () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
#4  0x00007ffff7b21ff8 in pkgPackageManager::DoInstall(int) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
#5  0x000000000041354f in ?? ()
#6  0x000000000041e1a4 in ?? ()
#7  0x00007ffff7af2263 in CommandLine::DispatchArg(CommandLine::Dispatch*, bool) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
#8  0x0000000000409ad4 in ?? ()
#9  0x00007ffff71ff76d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000409df1 in ?? ()
#11 0x00007fffffffc778 in ?? ()
#12 0x000000000000001c in ?? ()
#13 0x0000000000000191 in ?? ()
#14 0x00007fffffffd625 in ?? ()
#15 0x00007fffffffd636 in ?? ()
[... 400 more entries pointing at random addresses]

This probably isn't terribly helpful. Is there a package containing
debugging symbols for apt?

I've persuaded apport to produce the attached which provides a little
more context.

** Attachment added: "apport output for crash"
   https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1117682/+attachment/3608952/+files/_usr_bin_apt-get.0.crash

-- 
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/1117682

Title:
  apt-get crashes with a segmentation fault

Status in “apt” package in Ubuntu:
  Incomplete

Bug description:
  When trying to --reinstall multiple packages with apt-get, it crashes
  with a segmentation fault.  The command line: apt-get --reinstall
  install <2-or-more-packages...>

  Syslog shows:
  kernel: [ 3322.059837] apt-get[14417]: segfault at 7fa5c24d65bc ip 00007fa5bb931329 sp 00007fffb0170528 error 4 in libapt-pkg.so.4.12.0[7fa5bb8e1000+121000]

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: apt 0.8.16~exp12ubuntu10.7
  ProcVersionSignature: Ubuntu 3.2.0-37.58-generic 3.2.35
  Uname: Linux 3.2.0-37-generic x86_64
  ApportVersion: 2.0.1-0ubuntu17.1
  Architecture: amd64
  Date: Wed Feb  6 15:39:44 2013
  InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release amd64 (20120424.1)
  MarkForUpload: True
  ProcEnviron:
   TERM=xterm
   SHELL=/bin/bash
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   LANGUAGE=en_US:
  SourcePackage: apt
  UpgradeStatus: No upgrade log present (probably fresh install)

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




More information about the foundations-bugs mailing list