Re: Bug#385784: aptitude: crash with basic_string::_S_construct NULL not valid [stacktrace]
Here's the stack trace, which seems to indicate something going wrong
in libc (or the kernel?), with libstdc++ possibly adding another layer
of error on top of that.
I don't know if the low-level exception is considered normal enough
that it should be caught and dealt with. An excerpt from the gdb
session follows, and then some more background info:
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Reading package fields... Done
Reading package status... Done
Retrieving bug reports... Done
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
dpkg: error processing preview-latex-style (--purge):
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Program received signal SIGABRT, Aborted.
[Switching to Thread -1480337728 (LWP 12222)]
0xffffe410 in __kernel_vsyscall ()
(gdb) Errors were encountered while processing:
preview-latex-style
(gdb) backtrace
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xa7c6c6d1 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xa7c6df9b in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xa7e61644 in __gnu_cxx::__verbose_terminate_handler ()
from /usr/lib/libstdc++.so.6
#4 0xa7e5f035 in std::set_unexpected () from /usr/lib/libstdc++.so.6
#5 0xa7e5f072 in std::terminate () from /usr/lib/libstdc++.so.6
#6 0xa7e5f1aa in __cxa_throw () from /usr/lib/libstdc++.so.6
#7 0xa7df410f in std::__throw_logic_error () from /usr/lib/libstdc++.so.6
#8 0xa7e3ab5f in std::string::_S_copy_chars () from /usr/lib/libstdc++.so.6
#9 0xa7e3aca9 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () from /usr/lib/libstdc++.so.6
#10 0xa7f8210f in pkgDPkgPM::Go () from /usr/lib/libapt-pkg-libc6.3-6.so.3.11
#11 0xa7f321f0 in pkgPackageManager::DoInstall ()
from /usr/lib/libapt-pkg-libc6.3-6.so.3.11
#12 0x0820e89b in download_install_manager::execute_install_run (
this=0xafdd6f0c, res=pkgAcquire::Continue, progress=@0xafdd6dc0)
at download_install_manager.cc:136
#13 0x0820e9db in download_install_manager::finish (this=0xafdd6f0c,
res=pkgAcquire::Continue, progress=@0xafdd6dc0)
at download_install_manager.cc:175
#14 0x08161aeb in cmdline_do_download (m=0xafdd6f0c) at cmdline_util.cc:185
#15 0x0814a988 in cmdline_do_action (argc=2, argv=0xafdd7338,
status_fname=0x0, simulate=false, assume_yes=false, download_only=false,
fix_broken=false, showvers=false, showdeps=false, showsize=false,
visual_preview=false, always_prompt=false, queue_only=false, verbose=0)
at cmdline_do_action.cc:243
#16 0x08054060 in main (argc=3, argv=0xafdd7334) at main.cc:473
(gdb)
Background:
I built the debug program, copied it over to the system with the
error, and ran it under gdb as root. The invoking line was
aptitude purge preview-latex-style
The first time I got
W: Could not lock the cache file. Opening in read-only mode; any changes you make to the states of packages will NOT be preserved!
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
Presumably this was from my previous attempt with apt-get. I
Though both systems are basically testing/etch, they are not
identical.
Build system: 2.4 kernel, Athlon chip, all build-deps of aptitude
ii libstdc++6 4.1.1-5
ii libstdc++6-4.0-dev 4.0.3-3
ii libstdc++6-4.1-dev 4.1.1-5
also has versions before libstdc++6.
ii libc6 2.3.6-15 GNU C Library: Shared libraries
ii libc6-dbg 2.3.6-15 GNU C Library: Libraries with debugging symb
ii libc6-dev 2.3.6-15 GNU C Library: Development Libraries and Hea
ii libc6-pic 2.3.6-15 GNU C Library: PIC archive library
Run System: 2.6 kernel, P4 chip, lacks some build depends
ii libstdc++6 4.1.1-5
ii libstdc++6-4.1-dev 4.1.1-5
ii libc6 2.3.6-15 GNU C Library: Shared libraries
ii libc6-dev 2.3.6-15 GNU C Library: Development Libraries and Hea
ii libc6-i686 2.3.6-15 GNU C Library: Shared libraries [i686 optimi
same version of aptitude
Reply to: