[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#383223: marked as done (apt-get update segfault)



Your message dated Fri, 19 Aug 2011 12:05:22 +0200
with message-id <20110819115258.GA4040@debian.org>
and subject line Re: Bug#81829: "Segmentation faulty tree" (#270147) still present in Lenny, broken /var/cache/apt/*.bin available for download
has caused the Debian Bug report #81829,
regarding apt-get update segfault
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
81829: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=81829
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 0.6.45
Severity: important


apt-get update Segfault:

babar:~ # apt-get update
Get:1 http://debian.soft testing Release.gpg [189B]
Hit http://debian.soft testing Release
Hit http://debian.soft testing/main Packages/DiffIndex
Hit http://debian.soft testing/contrib Packages/DiffIndex
Hit http://debian.soft testing/non-free Packages/DiffIndex
Fetched 189B in 0s (200B/s)
Segmentation faultsts... 0%

Workaround:
I delete /var/cache/apt/pkgcache.bin and /var/cache/apt/srcpkgcache.bin and I could run again.


Here is the gdb log and backtrace:

(gdb) set args update
(gdb) run
Starting program: /usr/bin/apt-get update
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Get:1 http://debian.soft testing Release.gpg [189B]
Hit http://debian.soft testing Release
Hit http://debian.soft testing/main Packages/DiffIndex
Hit http://debian.soft testing/contrib Packages/DiffIndex
Hit http://debian.soft testing/non-free Packages/DiffIndex
Fetched 189B in 0s (203B/s)
Reading package lists... 0%
Program received signal SIGSEGV, Segmentation fault.
0xb7c97c7b in strlen () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7c97c7b in strlen () from /lib/tls/i686/cmov/libc.so.6
#1  0xb7e21236 in std::string::compare () from /usr/lib/libstdc++.so.6
#2  0xb7ef9ba5 in debPackagesIndex::FindInCache () from /usr/lib/libapt-pkg-libc6.3-6.so.3.11
#3  0xb7ecacce in pkgCacheGenerator::SelectFile () from /usr/lib/libapt-pkg-libc6.3-6.so.3.11
#4  0xb7ecb93a in pkgMakeStatusCache () from /usr/lib/libapt-pkg-libc6.3-6.so.3.11
#5  0xb7ec259f in pkgCacheFile::BuildCaches () from /usr/lib/libapt-pkg-libc6.3-6.so.3.11
#6  0x0804ec1c in ?? ()
#7  0xb7e98060 in CommandLine::DispatchArg () from /usr/lib/libapt-pkg-libc6.3-6.so.3.11
#8  0x0805f84c in ?? ()
#9  0xb7c3eeb0 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#10 0x0804c871 in ?? ()
(gdb) quit
The program is running.  Exit anyway? (y or n) y


Thanks

-- Package-specific info:

-- apt-config dump --

APT "";
APT::Architecture "i386";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Default-Release "testing";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::userstatus "status.user";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::dpkg "/usr/bin/dpkg";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "if dpkg -s apt-listbugs | grep -q '^Status: .* ok installed'; then /usr/sbin/apt-listbugs apt || ( test $? -ne 10 || exit 10; echo 'Warning: apt-listbugs exited abnormally, hit enter key to continue.' 1>&2 ; read a < /dev/tty ); fi";
DPkg::Pre-Install-Pkgs:: "/usr/bin/apt-listchanges --apt || test $? -ne 10";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
DPkg::Tools "";
DPkg::Tools::Options "";
DPkg::Tools::Options::/usr/bin/apt-listchanges "";
DPkg::Tools::Options::/usr/bin/apt-listchanges::Version "2";
Acquire "";
Acquire::http "";
Acquire::http::Pipeline-Depth "0";

-- (no /etc/apt/preferences present) --


-- (/etc/apt/sources.list present, but not submitted) --


-- System Information:
Debian Release: testing/unstable
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages apt depends on:
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries
ii  libgcc1                       1:4.1.1-5  GCC support library
ii  libstdc++6                    4.1.1-5    The GNU Standard C++ Library v3

Versions of packages apt recommends:
ii  debian-archive-keyring        2006.01.18 GnuPG archive keys of the Debian a

-- no debconf information


--- End Message ---
--- Begin Message ---
Source: apt
Source-Version: 0.8.16~exp4

apt (0.8.16~exp4) experimental; urgency=low

   [ Julian Andres Klode ]
   * apt-pkg/pkgcache.h:
     - [ABI break] Add pkgCache::Header::CacheFileSize, storing the cache size
   * apt-pkg/pkgcachegen.cc:
     - Write the file size to the cache
   * apt-pkg/pkgcache.cc:
     - Check that cache is at least CacheFileSize bytes large (LP: #16467)

On Thu, Aug 18, 2011 at 04:16:05PM -0500, Jonathan Nieder wrote:
> tags 81829 - moreinfo
> quit
> 
> Axel Beckert wrote:
> 
> > I occasionally ran into this bug on Lenny, can't remember on which
> > platform, but never deterministically.
> >
> > But today I reproducibly ran into this bug with both, apt-get and
> > aptitude. Independent of what I did: aptitude; aptitude -u; aptitude
> > upgrade; apt-get upgrade, I always get the "Segmentation faulty
> > tree... 50%" ("Building dependency tree... 50%^MSegmentation fault").
> >
> > Moving /var/lib/apt/extended_states away didn't help.
> >
> > Couldn't even do an apt-get install gdb for generating a backtrace.
> >
> > Moving away pkgcache.bin and srcpkgcache.bin from /var/cache/apt/
> > finally did help (thanks to waldi for that hint), but copying them
> > back after upgrading two packages didn't reproduce the segfault --
> > they always got recreated.
> 
> Thanks!  No promises about being able to take a look soon, but I've
> downloaded them.
I closed the Launchpad bug in 0.8.16~exp4, but forgot to close that 
one. We still cannot detect invalid caches where data changes, but we
can now detect all truncated caches, and reject them.

I could have included a CRC checksum in the header of the remaining
cache, but our experience so far is that 

 (a) most (all?) of these bugs are the result of truncated cache files
 (b) checksumming the cache on opening is much slower than we want,
     especially on ARM systems (200 ms on abel.d.o, 500 ms on an N900,
     12 ms on my Intel Core i5)

That said, if future shows us cases where there are problems with
correctly-sized caches, we can still add a checksum when we break
ABI again, and enable it by default only on amd64 and other fast
architectures.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Attachment: pgpswqhPUAaV4.pgp
Description: PGP signature


--- End Message ---

Reply to: