[Aptitude-devel] Bug#907436: aptitude: Crashes with SIGABRT and "terminate called after throwing an instance of 'std::logic_error'"

Axel Beckert abe at debian.org
Tue Aug 28 00:34:02 BST 2018


Package: aptitude
Version: 0.8.11-1
Severity: important

Hi Manuel,

I managed to reproducibly crash aptitude from experimental when
selecting to view (at least one) specific package from the main package
list view by pressing enter when the package is selected. The package
comes from a third party repository.

It outputs "terminate called after throwing an instance of
'std::logic_error'" and then says "Ouch!  Got SIGABRT, dying.." and
dumped core.

I can reproduce this in a clean pbuilder chroot:

Minimal sources.list to reproduce the crash:

deb http://debian.ethz.ch/debian sid main
deb https://jenkins.grml.org/debian zsh main

Minimal useful sources.list to be able to install aptitude from
experimental:

deb http://debian.ethz.ch/debian sid main
deb http://debian.ethz.ch/debian experimental main
deb https://jenkins.grml.org/debian zsh main

Using the later sources.list, I had to do the following in an otherwise
clean chroot:

# apt install ca-certificates wget
# wget https://jenkins.grml.org/debian/C525F56752D4A654.asc
# apt-key add C525F56752D4A654.asc
# apt update
# apt install aptitude=0.8.11-1

Then call aptitude without paramters, type "/^zsh-dbgsym$<Enter>" to
find the zsh-dbgsym package in the package list and press <Enter>:
KABOOM!

This only happens with aptitude 0.8.11-1. Downgrading to 0.8.10-9 again
helps to make the issue go away.

Here's the according backtrace:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `aptitude'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f40b52d5800 (LWP 5918))]
(gdb) bt
#0  __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f40b5a752f1 in __GI_abort () at abort.c:79
#2  0x00007f40b5e37943 in __gnu_cxx::__verbose_terminate_handler () at ../../../../src/libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00007f40b5e3d896 in __cxxabiv1::__terminate(void (*)()) () at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x00007f40b5e3d8d1 in std::terminate () at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x00007f40b5e3db04 in __cxxabiv1::__cxa_throw (obj=obj at entry=0x55cd321342d0, tinfo=0x7f40b5f21958 <typeinfo for std::logic_error>, 
    dest=0x7f40b5e524e0 <std::logic_error::~logic_error()>) at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:95
#6  0x00007f40b5e39793 in std::__throw_logic_error (__s=0x55cd2f268e78 "basic_string::_M_construct null not valid")
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x000055cd2efc66da in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*> (
    this=this at entry=0x7ffe6c9b57c0, __beg=__beg at entry=0x0, __end=<optimized out>) at /usr/include/c++/8/bits/char_traits.h:350
#8  0x000055cd2f1163af in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char const*> (
    __end=<optimized out>, __beg=0x0, this=0x7ffe6c9b57c0) at /usr/include/c++/8/bits/basic_string.h:252
#9  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*> (__end=<optimized out>, __beg=0x0, 
    this=0x7ffe6c9b57c0) at /usr/include/c++/8/bits/basic_string.h:255
#10 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> > (__a=..., __s=<optimized out>, 
    this=0x7ffe6c9b57c0) at /usr/include/c++/8/bits/basic_string.h:516
#11 get_label[abi:cxx11](pkgCache::VerIterator const&, pkgRecords const*) (ver=..., records=<optimized out>) at ../../../../src/generic/apt/apt.cc:1423
#12 0x000055cd2f01eec9 in pkg_grouppolicy_info::setup_package_info(pkgCache::PkgIterator const&, pkgCache::VerIterator const&, pkg_item_with_subtree<cwidget::widgets::treeitem, cwidget::widgets::tag_sort_policy>*, sigc::signal2<void, pkgCache::PkgIterator const&, pkgCache::VerIterator const&, sigc::nil>*) ()
    at ../../src/pkg_info_screen.cc:152
#13 0x000055cd2f01ff8b in pkg_info_screen::setup_new_root(pkgCache::PkgIterator const&, pkgCache::VerIterator const&) () at ../../src/apt_info_tree.h:60
#14 0x000055cd2f02025b in pkg_info_screen::pkg_info_screen(pkgCache::PkgIterator const&, pkgCache::VerIterator const&) () at ../../src/pkg_info_screen.cc:206
#15 0x000055cd2f07ad7e in pkg_info_screen::create (ver=..., pkg=...) at ../../src/pkg_info_screen.h:61
#16 make_info_screen(pkgCache::PkgIterator const&, pkgCache::VerIterator const&) () at ../../src/ui.cc:1026
#17 0x000055cd2f07ae6d in show_info_screen(pkgCache::PkgIterator const&, pkgCache::VerIterator const&) () at ../../src/ui.cc:1035
#18 0x000055cd2f037c52 in pkg_ver_item::show_information (this=this at entry=0x55cd3187e7f0) at /usr/include/apt-pkg/cacheiterators.h:189
#19 0x000055cd2f038778 in pkg_ver_item::dispatch_key(cwidget::config::key const&, cwidget::widgets::tree*) () at ../../src/pkg_ver_item.cc:692
#20 0x00007f40b657a406 in cwidget::widgets::tree::handle_key(cwidget::config::key const&) () at treeitem.h:233
#21 0x000055cd2f017b6e in menu_tree::handle_key(cwidget::config::key const&) () at ../../src/menu_tree.cc:430
#22 0x00007f40b657f78d in cwidget::widgets::widget::dispatch_key(cwidget::config::key const&) () at widget.h:217
#23 0x00007f40b6567b9e in cwidget::widgets::table::handle_key(cwidget::config::key const&) () at table.cc:576
#24 0x00007f40b657f78d in cwidget::widgets::widget::dispatch_key(cwidget::config::key const&) () at widget.h:217
#25 0x00007f40b6556187 in cwidget::widgets::passthrough::handle_key(cwidget::config::key const&) () at passthrough.cc:98
#26 0x00007f40b657f78d in cwidget::widgets::widget::dispatch_key(cwidget::config::key const&) () at widget.h:217
#27 0x00007f40b6567b9e in cwidget::widgets::table::handle_key(cwidget::config::key const&) () at table.cc:576
#28 0x00007f40b657f78d in cwidget::widgets::widget::dispatch_key(cwidget::config::key const&) () at widget.h:217
#29 0x00007f40b6556187 in cwidget::widgets::passthrough::handle_key(cwidget::config::key const&) () at passthrough.cc:98
#30 0x00007f40b657f78d in cwidget::widgets::widget::dispatch_key(cwidget::config::key const&) () at widget.h:217
#31 0x00007f40b653dc99 in cwidget::widgets::menubar::handle_key(cwidget::config::key const&) () at menubar.cc:641
#32 0x00007f40b657f78d in cwidget::widgets::widget::dispatch_key(cwidget::config::key const&) () at widget.h:217
#33 0x00007f40b6512617 in cwidget::toplevel::input_thread::get_input_event::dispatch (this=0x7f40ac000f70) at toplevel.cc:400
#34 0x00007f40b650a319 in cwidget::toplevel::mainloop(int) () at toplevel.cc:1171
#35 0x000055cd2f08041a in ui_main() () at ../../src/ui.cc:3134
#36 0x000055cd2efb9a2f in main () at ../../src/main.cc:1427
#37 0x00007f40b5a60b17 in __libc_start_main (main=0x55cd2efb8210 <main>, argc=1, argv=0x7ffe6c9b6e08, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7ffe6c9b6df8) at ../csu/libc-start.c:310
#38 0x000055cd2efc1a0a in _start () at /usr/include/boost/none_t.hpp:32

HTH. I the worst case, I also have an aptitude state bundle of the state
where the crash happened first.

-- Package-specific info:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://alioth-lists.debian.net/pipermail/aptitude-devel/attachments/20180828/2e30a2fa/attachment.ksh>
-------------- next part --------------

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (500, 'unstable-debug'), (500, 'buildd-unstable'), (110, 'experimental'), (1, 'experimental-debug'), (1, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.17.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages aptitude depends on:
ii  aptitude-common           0.8.11-1
ii  libapt-pkg5.0             1.6.4
ii  libboost-iostreams1.62.0  1.62.0+dfsg-8
ii  libboost-system1.62.0     1.62.0+dfsg-8
ii  libc6                     2.27-5
ii  libcwidget3v5             0.5.17-11
ii  libgcc1                   1:8.2.0-4
ii  libncursesw6              6.1+20180714-1
ii  libsigc++-2.0-0v5         2.10.0-2
ii  libsqlite3-0              3.24.0-1
ii  libstdc++6                8.2.0-4
ii  libtinfo6                 6.1+20180714-1
ii  libxapian30               1.4.7-2

Versions of packages aptitude recommends:
ii  libparse-debianchangelog-perl  1.2.0-12
ii  sensible-utils                 0.0.12

Versions of packages aptitude suggests:
ii  apt-xapian-index                0.49
ii  aptitude-doc-en [aptitude-doc]  0.8.10-9
ii  debtags                         2.1.5
ii  tasksel                         3.45

-- no debconf information


More information about the Aptitude-devel mailing list