Package: aptitude
Version: 0.8.6-1
Severity: normal
Hi,
I just ran into a corner case which causes a crash of aptitude:
→ env LANG=foobar aptitude changelog aptitude
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
[1] 10697 abort (core dumped) env LANG=foobar aptitude changelog aptitude
The crash can be triggered with both, trying to download a changelog
from within the TUI (by pressing "C") or from the commandline as shown
above.
Backtrace:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1 0x00007fbff991a40a in __GI_abort () at abort.c:89
#2 0x00007fbffa2300ad in __gnu_cxx::__verbose_terminate_handler() () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007fbffa22e066 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007fbffa22e0b1 in std::terminate() () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007fbffa22e2c9 in __cxa_throw () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007fbffa256d0f in std::__throw_runtime_error(char const*) () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007fbffa250024 in
std::locale::facet::_S_create_c_locale(__locale_struct*&, char const*,
__locale_struct*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x00007fbffa242159 in std::locale::_Impl::_Impl(char const*, unsigned long)
() from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9 0x00007fbffa2433cc in std::locale::locale(char const*) () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007fbffad69123 in boost::filesystem::path::codecvt() () from
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.62.0
#11 0x00007fbffad69c05 in
boost::filesystem::detail::unique_path(boost::filesystem::path const&,
boost::system::error_code*) () from
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.62.0
#12 0x000056082c80cc1e in boost::filesystem::unique_path (p=...) at
/usr/include/boost/filesystem/operations.hpp:723
#13 aptitude::util::create_temporary_changelog_dir[abi:cxx11]() () at
../../../../src/generic/util/util.cc:511
#14 0x000056082c71999e in aptitude::(anonymous
namespace)::download_thread::start_download_job
(uri="gzip:///usr/share/doc/aptitude/changelog.Debian.gz",
short_description="Changelog of aptitude", callbacks=std::shared_ptr (count 3,
weak 1) 0x56082d24e4e8, post_thunk=0x56082c662780
<aptitude::cmdline::post_thunk(sigc::slot<void, sigc::nil, sigc::nil,
sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil> const&)>) at
../../../../src/generic/apt/download_queue.cc:957
#15 0x000056082c71a5bd in aptitude::queue_download
(uri="gzip:///usr/share/doc/aptitude/changelog.Debian.gz",
short_description="Changelog of aptitude", callbacks=std::shared_ptr (count 3,
weak 1) 0x56082d24e4e8, post_thunk=<optimized out>) at
../../../../src/generic/apt/download_queue.cc:1190
#16 0x000056082c7365d2 in aptitude::apt::(anonymous
namespace)::changelog_download::failure (this=0x56082d24e4d0, msg=...) at
../../../../src/generic/apt/pkg_changelog.cc:318
#17 0x000056082c662576 in sigc::slot0<void>::operator() (this=0x7ffdfbaeb080)
at /usr/include/sigc++-2.0/sigc++/functors/slot.h:513
#18 aptitude::cmdline::(anonymous namespace)::event_loop::run
(this=0x56082cb12c40 <aptitude::cmdline::(anonymous
namespace)::global_event_loop>) at ../../../src/cmdline/cmdline_main_loop.cc:88
#19 aptitude::cmdline::main_loop () at
../../../src/cmdline/cmdline_main_loop.cc:109
#20 0x000056082c64b424 in (anonymous namespace)::get_changelog
(info=std::shared_ptr (count 1, weak 0) 0x56082d24e3d0,
term_metrics=std::shared_ptr (count 3, weak 0) 0x56082cdd4370) at
../../../src/cmdline/cmdline_changelog.cc:204
#21 0x000056082c64bd4b in (anonymous namespace)::get_changelog
(term_metrics=std::shared_ptr (count 3, weak 0) 0x56082cdd4370, ver=...) at
../../../src/cmdline/cmdline_changelog.cc:228
#22 do_cmdline_changelog (packages=std::vector of length 1, capacity 1 = {...},
term_metrics=std::shared_ptr (count 3, weak 0) 0x56082cdd4370) at
../../../src/cmdline/cmdline_changelog.cc:340
#23 0x000056082c64ce0b in cmdline_changelog (argc=<optimized out>,
argv=<optimized out>) at ../../../src/cmdline/cmdline_changelog.cc:421
#24 0x000056082c560401 in main (argc=3, argv=<optimized out>) at
../../src/main.cc:1288
I noticed this because I switched from locales to
open-infrastructure-locales-c.utf-8 (on a different machine than the one
I'm reporting from) but didn't change the value of $LANG in a already
running shell.
In the end I found out that open-infrastructure-locales-c.utf-8 is not
necessary to reproduce this, just an invalid (or no more valid) setting
in $LANG.
-- Package-specific info:
Terminal: eterm-color
$DISPLAY is set.
which aptitude: /usr/bin/aptitude
aptitude version information:
aptitude 0.8.6
Compiler: g++ 6.3.0 20170221
Compiled against:
apt version 5.0.1
NCurses version 6.0
libsigc++ version: 2.10.0
Gtk+ support disabled.
Qt support disabled.
Current library versions:
NCurses version: ncurses 6.0.20161126
cwidget version: 0.5.17
Apt version: 5.0.1
aptitude linkage:
linux-vdso.so.1 (0x00007fffda44f000)
libgtk3-nocsd.so.0 => /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0
(0x00007f205672c000)
libapt-pkg.so.5.0 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
(0x00007f205637a000)
libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5
(0x00007f205614a000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
(0x00007f2055f20000)
libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0
(0x00007f2055d19000)
libcwidget.so.3 => /usr/lib/x86_64-linux-gnu/libcwidget.so.3
(0x00007f2055a1a000)
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
(0x00007f2055712000)
libboost_iostreams.so.1.62.0 =>
/usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.62.0 (0x00007f20554fa000)
libboost_filesystem.so.1.62.0 =>
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.62.0 (0x00007f20552e1000)
libboost_system.so.1.62.0 =>
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.62.0 (0x00007f20550dd000)
libxapian.so.30 => /usr/lib/x86_64-linux-gnu/libxapian.so.30
(0x00007f2054cc9000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f2054aaa000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f2054728000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2054424000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x00007f205420d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2053e6f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2053c6b000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2
(0x00007f2053a52000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2053838000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0
(0x00007f2053628000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f2053402000)
liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1
(0x00007f20531f0000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2052fe8000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f2052de1000)
/lib64/ld-linux-x86-64.so.2 (0x000055c51d666000)
-- System Information:
Debian Release: 9.0
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.9.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages aptitude depends on:
ii aptitude-common 0.8.6-1
ii libapt-pkg5.0 1.4
ii libboost-filesystem1.62.0 1.62.0+dfsg-4
ii libboost-iostreams1.62.0 1.62.0+dfsg-4
ii libboost-system1.62.0 1.62.0+dfsg-4
ii libc6 2.24-9
ii libcwidget3v5 0.5.17-4+b1
ii libgcc1 1:6.3.0-12
ii libncursesw5 6.0+20161126-1
ii libsigc++-2.0-0v5 2.10.0-1
ii libsqlite3-0 3.16.2-3
ii libstdc++6 6.3.0-12
ii libtinfo5 6.0+20161126-1
ii libxapian30 1.4.3-2
Versions of packages aptitude recommends:
ii libparse-debianchangelog-perl 1.2.0-12
ii sensible-utils 0.0.9
Versions of packages aptitude suggests:
ii apt-xapian-index 0.49
ii aptitude-doc-en [aptitude-doc] 0.8.6-1
ii debtags 2.1.2
pn tasksel <none>
-- no debconf information
_______________________________________________
Aptitude-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/aptitude-devel