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

Bug#721732: apt-cache segfault in pkgCache::FindGrp



Package: apt
Version: 0.9.11.2
Severity: important

I found that, at least on kfreebsd-amd64 (in a sid chroot on falla.d.o),

  apt-cache --no-generate show libc0.1-dev

segfaults, and was able to reproduce the problem with a noopt build of
0.9.11.2, from which I've attached a backtrace.  Could you please take
a look?

Thanks!

-- Package-specific info:

-- apt-config dump --

APT "";
APT::Architecture "kfreebsd-amd64";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Install-Recommends "0";
APT::Install-Suggests "0";
APT::NeverAutoRemove "";
APT::NeverAutoRemove:: "^firmware-linux.*";
APT::NeverAutoRemove:: "^linux-firmware$";
APT::NeverAutoRemove:: "^kfreebsd-image.*";
APT::NeverAutoRemove:: "^gnumach$";
APT::NeverAutoRemove:: "^gnumach-image.*";
APT::NeverAutoRemove:: "^linux-image-9.0-2-amd64$";
APT::NeverAutoRemove:: "^linux-image-extra-9.0-2-amd64$";
APT::NeverAutoRemove:: "^linux-signed-image-9.0-2-amd64$";
APT::NeverAutoRemove:: "^linux-backports-modules-.*-9.0-2-amd64$";
APT::NeverAutoRemove:: "^linux-headers-9.0-2-amd64$";
APT::Never-MarkAuto-Sections "";
APT::Never-MarkAuto-Sections:: "metapackages";
APT::Never-MarkAuto-Sections:: "restricted/metapackages";
APT::Never-MarkAuto-Sections:: "universe/metapackages";
APT::Never-MarkAuto-Sections:: "multiverse/metapackages";
APT::Never-MarkAuto-Sections:: "oldlibs";
APT::Never-MarkAuto-Sections:: "restricted/oldlibs";
APT::Never-MarkAuto-Sections:: "universe/oldlibs";
APT::Never-MarkAuto-Sections:: "multiverse/oldlibs";
APT::Architectures "";
APT::Architectures:: "kfreebsd-amd64";
APT::Compressor "";
APT::Compressor::. "";
APT::Compressor::.::Name ".";
APT::Compressor::.::Extension "";
APT::Compressor::.::Binary "";
APT::Compressor::.::Cost "1";
APT::Compressor::gzip "";
APT::Compressor::gzip::Name "gzip";
APT::Compressor::gzip::Extension ".gz";
APT::Compressor::gzip::Binary "gzip";
APT::Compressor::gzip::Cost "2";
APT::Compressor::gzip::CompressArg "";
APT::Compressor::gzip::CompressArg:: "-9n";
APT::Compressor::gzip::UncompressArg "";
APT::Compressor::gzip::UncompressArg:: "-d";
APT::Compressor::bzip2 "";
APT::Compressor::bzip2::Name "bzip2";
APT::Compressor::bzip2::Extension ".bz2";
APT::Compressor::bzip2::Binary "bzip2";
APT::Compressor::bzip2::Cost "3";
APT::Compressor::bzip2::CompressArg "";
APT::Compressor::bzip2::CompressArg:: "-9";
APT::Compressor::bzip2::UncompressArg "";
APT::Compressor::bzip2::UncompressArg:: "-d";
APT::Compressor::xz "";
APT::Compressor::xz::Name "xz";
APT::Compressor::xz::Extension ".xz";
APT::Compressor::xz::Binary "xz";
APT::Compressor::xz::Cost "4";
APT::Compressor::xz::CompressArg "";
APT::Compressor::xz::CompressArg:: "-6";
APT::Compressor::xz::UncompressArg "";
APT::Compressor::xz::UncompressArg:: "-d";
APT::Compressor::lzma "";
APT::Compressor::lzma::Name "lzma";
APT::Compressor::lzma::Extension ".lzma";
APT::Compressor::lzma::Binary "xz";
APT::Compressor::lzma::Cost "5";
APT::Compressor::lzma::CompressArg "";
APT::Compressor::lzma::CompressArg:: "--format=lzma";
APT::Compressor::lzma::CompressArg:: "-9";
APT::Compressor::lzma::UncompressArg "";
APT::Compressor::lzma::UncompressArg:: "--format=lzma";
APT::Compressor::lzma::UncompressArg:: "-d";
APT::Compressor::::Name "";
APT::Compressor::::Extension ".";
APT::Compressor::::Binary "";
APT::Compressor::::Cost "100";
APT::Compressor::::CompressArg "";
APT::Compressor::::CompressArg:: "-9";
APT::Compressor::::UncompressArg "";
APT::Compressor::::UncompressArg:: "-d";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::mirrors "mirrors/";
Dir::State::extended_states "extended_states";
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::netrc "auth.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Etc::preferencesparts "preferences.d";
Dir::Etc::trusted "trusted.gpg";
Dir::Etc::trustedparts "trusted.gpg.d";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::solvers "";
Dir::Bin::solvers:: "/usr/lib/apt/solvers";
Dir::Bin::dpkg "/usr/bin/dpkg";
Dir::Bin::bzip2 "/bin/bzip2";
Dir::Bin::xz "/usr/bin/xz";
Dir::Media "";
Dir::Media::MountPath "/media/apt";
Dir::Log "var/log/apt";
Dir::Log::Terminal "term.log";
Dir::Log::History "history.log";
Dir::Ignore-Files-Silently "";
Dir::Ignore-Files-Silently:: "~$";
Dir::Ignore-Files-Silently:: "\.disabled$";
Dir::Ignore-Files-Silently:: "\.bak$";
Dir::Ignore-Files-Silently:: "\.dpkg-[a-z]+$";
Dir::Ignore-Files-Silently:: "\.save$";
Dir::Ignore-Files-Silently:: "\.orig$";
Acquire "";
Acquire::cdrom "";
Acquire::cdrom::mount "/media/cdrom/";
Acquire::http "";
Acquire::http::Pipeline-Depth "0";
Acquire::Languages "";
Acquire::Languages:: "none";
Acquire::PDiffs "false";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
CommandLine "";
CommandLine::AsString "apt-config dump";

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


-- (no /etc/apt/sources.list present) --


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages apt depends on:
ii  debian-archive-keyring  2012.4
ii  gnupg                   1.4.14-1
ii  libapt-pkg4.12          0.9.11.2
ii  libc0.1                 2.17-92
ii  libgcc1                 1:4.8.1-9
ii  libstdc++6              4.8.1-9

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc                      <none>
pn  aptitude | synaptic | wajig  <none>
ii  dpkg-dev                     1.17.1
pn  python-apt                   <none>
ii  xz-utils                     5.1.1alpha+20120614-2

-- no debconf information
Starting program: /home/ucko/apt/build/bin/apt-cache --no-generate show libc0.1-dev

Program received signal SIGSEGV, Segmentation fault.
0x000000080094e096 in pkgCache::FindGrp (this=0x643390, Name=...) at pkgcache.cc:270
270		Group *Grp = GrpP + HeaderP->GrpHashTable[sHash(Name)];
#0  0x000000080094e096 in pkgCache::FindGrp (this=0x643390, Name=...) at pkgcache.cc:270
        Grp = 0x0
#1  0x00000008009d4444 in APT::PackageContainerInterface::FromGroup (pci=0x7fffffffd040, Cache=..., pkg=..., helper=...) at cacheset.cc:263
        archfound = 18446744073709551615
        arch = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8011e6458 <std::string::_Rep::_S_empty_rep_storage+24> ""}}
        Grp = {<pkgCache::Iterator<pkgCache::Group, pkgCache::GrpIterator>> = {<std::iterator<std::forward_iterator_tag, pkgCache::Group, long, pkgCache::Group*, pkgCache::Group&>> = {<No data fields>}, _vptr.Iterator = 0x7fffffffcdf0, S = 0x8006482d5, Owner = 0x1}, HashIndex = 0}
        Pkg = {<pkgCache::Iterator<pkgCache::Package, pkgCache::PkgIterator>> = {<std::iterator<std::forward_iterator_tag, pkgCache::Package, long, pkgCache::Package*, pkgCache::Package&>> = {<No data fields>}, _vptr.Iterator = 0x7fffffffcd80, S = 0x7fffffffd260, Owner = 0x7fffffffd040}, HashIndex = 0}
#2  0x00000008009d4777 in APT::PackageContainerInterface::FromString (pci=0x7fffffffd040, Cache=..., str=..., helper=...) at cacheset.cc:303
        found = true
#3  0x00000008009d53e6 in APT::VersionContainerInterface::FromString (vci=0x7fffffffd220, Cache=..., pkg=..., fallback=@0x7fffffffd1fc: APT::VersionContainerInterface::ALL, helper=..., onlyFromName=false) at cacheset.cc:435
        ver = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8011e6458 <std::string::_Rep::_S_empty_rep_storage+24> ""}}
        verIsRel = false
        pkgset = {<APT::PackageContainerInterface> = {_vptr.PackageContainerInterface = 0x431090 <vtable for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >+16>}, _cont = {_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<pkgCache::PkgIterator> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<pkgCache::PkgIterator> >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<std::binary_function<pkgCache::PkgIterator, pkgCache::PkgIterator, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fffffffd050, _M_right = 0x7fffffffd050}, _M_node_count = 0}}}, ConstructedBy = APT::PackageContainerInterface::UNKNOWN}
        vertag = 18446744073709551615
        errors = false
        found = false
#4  0x00000008009d5214 in APT::VersionContainerInterface::FromCommandLine (vci=0x7fffffffd220, Cache=..., cmdline=0x643568, fallback=@0x7fffffffd1fc: APT::VersionContainerInterface::ALL, helper=...) at cacheset.cc:416
        I = 0x643568
        found = false
#5  0x0000000000428025 in APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::FromCommandLine (Cache=..., cmdline=0x643568, fallback=@0x7fffffffd1fc: APT::VersionContainerInterface::ALL, helper=...) at ../build/include/apt-pkg/cacheset.h:559
        vercon = {<APT::VersionContainerInterface> = {_vptr.VersionContainerInterface = 0x431130 <vtable for APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >+16>}, _cont = {<std::_List_base<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> >> = {_M_impl = {<std::allocator<std::_List_node<pkgCache::VerIterator> >> = {<__gnu_cxx::new_allocator<std::_List_node<pkgCache::VerIterator> >> = {<No data fields>}, <No data fields>}, _M_node = {_M_next = 0x7fffffffd228, _M_prev = 0x7fffffffd228}}}, <No data fields>}}
#6  0x0000000000422840 in ShowPackage (CmdL=...) at apt-cache.cc:1424
        CacheFile = {_vptr.pkgCacheFile = 0x800c5aa50 <vtable for pkgCacheFile+16>, d = 0x0, Map = 0x642880, Cache = 0x643390, DCache = 0x0, SrcList = 0x0, Policy = 0x0}
        helper = {<APT::CacheSetHelper> = {_vptr.CacheSetHelper = 0x430ff0 <vtable for CacheSetHelperVirtuals+16>, ShowError = true, ErrorType = GlobalError::NOTICE}, virtualPkgs = {<APT::PackageContainerInterface> = {_vptr.PackageContainerInterface = 0x431090 <vtable for APT::PackageContainer<std::set<pkgCache::PkgIterator, std::less<pkgCache::PkgIterator>, std::allocator<pkgCache::PkgIterator> > >+16>}, _cont = {_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<pkgCache::PkgIterator> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<pkgCache::PkgIterator> >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<std::binary_function<pkgCache::PkgIterator, pkgCache::PkgIterator, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fffffffd2c0, _M_right = 0x7fffffffd2c0}, _M_node_count = 0}}}, ConstructedBy = APT::PackageContainerInterface::UNKNOWN}}
        select = APT::VersionContainerInterface::ALL
        verset = {<APT::VersionContainerInterface> = {_vptr.VersionContainerInterface = 0x431130 <vtable for APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >+16>}, _cont = {<std::_List_base<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> >> = {_M_impl = {<std::allocator<std::_List_node<pkgCache::VerIterator> >> = {<__gnu_cxx::new_allocator<std::_List_node<pkgCache::VerIterator> >> = {<No data fields>}, <No data fields>}, _M_node = {_M_next = 0x7fffffffd228, _M_prev = 0x7fffffffd228}}}, <No data fields>}}
#7  0x0000000800938036 in CommandLine::DispatchArg (this=0x7fffffffd3b0, Map=0x7fffffffd3d0, NoMatch=true) at contrib/cmndline.cc:375
        Res = false
        I = 13
#8  0x0000000000424acd in main (argc=4, argv=0x7fffffffd608) at apt-cache.cc:1830
        Cmds = {{Match = 0x430ce0 "help", Handler = 0x424770 <ShowHelp(CommandLine&)>}, {Match = 0x430d19 "gencaches", Handler = 0x4246b6 <GenCaches(CommandLine&)>}, {Match = 0x430d23 "showsrc", Handler = 0x422da6 <ShowSrcPackage(CommandLine&)>}, {Match = 0x430d2b "showpkg", Handler = 0x41acef <DumpPackage(CommandLine&)>}, {Match = 0x430d33 "stats", Handler = 0x41b7c0 <Stats(CommandLine&)>}, {Match = 0x430d39 "dump", Handler = 0x41c889 <Dump(CommandLine&)>}, {Match = 0x430d3e "dumpavail", Handler = 0x41d0bc <DumpAvail(CommandLine&)>}, {Match = 0x430d48 "unmet", Handler = 0x41a9d5 <UnMet(CommandLine&)>}, {Match = 0x430d4e "search", Handler = 0x42178a <Search(CommandLine&)>}, {Match = 0x430d55 "depends", Handler = 0x41eb34 <Depends(CommandLine&)>}, {Match = 0x430d5d "rdepends", Handler = 0x41eb53 <RDepends(CommandLine&)>}, {Match = 0x430d66 "dotty", Handler = 0x41fe38 <Dotty(CommandLine&)>}, {Match = 0x430d6c "xvcg", Handler = 0x41eb72 <XVcg(CommandLine&)>}, {Match = 0x430d71 "
 show", Handler = 0x42278b <ShowPackage(CommandLine&)>}, {Match = 0x430d76 "pkgnames", Handler = 0x4229ea <ShowPkgNames(CommandLine&)>}, {Match = 0x430d7f "showauto", Handler = 0x42249d <ShowAuto(CommandLine&)>}, {Match = 0x430d88 "policy", Handler = 0x422ffd <Policy(CommandLine&)>}, {Match = 0x430d8f "madison", Handler = 0x423e8d <Madison(CommandLine&)>}, {Match = 0x0, Handler = 0x0}}
        Args = {<std::_Vector_base<CommandLine::Args, std::allocator<CommandLine::Args> >> = {_M_impl = {<std::allocator<CommandLine::Args>> = {<__gnu_cxx::new_allocator<CommandLine::Args>> = {<No data fields>}, <No data fields>}, _M_start = 0x63f570, _M_finish = 0x63f710, _M_end_of_storage = 0x63fbb0}}, <No data fields>}
        CmdL = {ArgList = 0x63f570, Conf = 0x63ca70, FileList = 0x643560}
        Errors = false
Kill the program being debugged? (y or n) 

Reply to: