apt-get crashes with a segmentation fault
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| apt (Ubuntu) |
Undecided
|
Unassigned |
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-
Syslog shows:
kernel: [ 3322.059837] apt-get[14417]: segfault at 7fa5c24d65bc ip 00007fa5bb931329 sp 00007fffb0170528 error 4 in libapt-
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apt 0.8.16~
ProcVersionSign
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)
msp3k (peek-nimbios) wrote : | #1 |
Changed in apt (Ubuntu): | |
status: | New → Incomplete |
Leigh Simpson (simpleigh) wrote : | #3 |
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://
Get:331 http://
Get:332 http://
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:
(gdb) where
#0 0x00007ffff7b03329 in pkgCache:
#1 0x00007ffff7b0355d in pkgCache:
#2 0x00007ffff7b1cc85 in pkgPackageManag
#3 0x00007ffff7b21add in pkgPackageManag
#4 0x00007ffff7b21ff8 in pkgPackageManag
#5 0x000000000041354f in ?? ()
#6 0x000000000041e1a4 in ?? ()
#7 0x00007ffff7af2263 in CommandLine:
#8 0x0000000000409ad4 in ?? ()
#9 0x00007ffff71ff76d in __libc_start_main () from /lib/x86_
#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...
Changed in apt (Ubuntu): | |
status: | Incomplete → Confirmed |
Georg Seewald (schorse) wrote : | #4 |
When I try to use the command I get the following error:
root@h2094244:~# apt-get dist-upgrade
Segmentation fault gelesen... 98%
Also with aptitude
root@h2094244:~# aptitude dist-upgrade
[100%] Paketlisten werden gelesenSegmentation fault
I user strace to check what happend:
These are the last lines of the outpunt
29724 open("/
29724 fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
29724 dup(6) = 7
29724 fcntl64(7, F_GETFL) = 0x8000 (flags O_RDONLY|
29724 fstat64(7, {st_mode=
29724 mmap2(NULL, 4096, PROT_READ|
29724 _llseek(7, 0, [0], SEEK_CUR) = 0
29724 read(7, "Origin: Ubuntu\nLabel: Ubuntu\nSui"..., 4096) = 4096
29724 _llseek(4, 26214399, [26214399], SEEK_SET) = 0
29724 write(4, "\0", 1) = 1
29724 mremap(0xb53f8000, 25165824, 26214400, MREMAP_MAYMOVE) = 0xb3af7000
29724 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
29724 +++ killed by SIGSEGV +++
root@h2094244:~#
I'm currently running the following version:
root@h2094244:~# uname -a
Linux h2094244.
root@h2094244:/etc# cat lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
My problem is that I do not know how I can apply a patch for apt-get without apt-get?
Ken Sharp (kennybobs) wrote : | #5 |
Does setting the following help?
APT::Cache-start 200000000;
https:/
Julian Andres Klode (juliank) wrote : | #6 |
Thanks for your bug report. This might be a broken cache and/or a problem fixed in the meantime. If you can still reproduce it in wily, please re-open.
Changed in apt (Ubuntu): | |
status: | Confirmed → Invalid |
On 7 February 2013 04:45, msp3k <email address hidden> wrote: packages. ..>
> 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-
Provide a stacktrace and the complete output from the command,
including the full command line.
Have you tried using more than one set of packages, or has this only
failed while trying to install particular packages?
status incomplete