#837366 aptitude: Crash when typing while saying "Updating ... and quitting"

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Axel Beckert
Date:
2017-11-23 21:39:05 UTC
Severity:
normal
#837366#5
Date:
2016-09-11 00:07:19 UTC
From:
To:
Hi Manuel,

after an aptitude "Performing actions" run I typed "q" and pressed
enter.

While the "Updating … and quitting" screen was shown I already started
to type "update-alternatives --config" and aptitude segfaulted with the
following backtraces:

warning: core file may not match specified executable file.
[New LWP 7417]
[New LWP 7428]
[New LWP 7418]
[New LWP 32113]
[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 -u'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fead2446720 in _xend () at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:33
33      ../sysdeps/unix/sysv/linux/x86/elision-unlock.c: No such file or directory.
[Current thread is 1 (Thread 0x7feacebc6700 (LWP 7417))]
(gdb) bt
#0  0x00007fead2446720 in _xend () at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:33
#1  __lll_unlock_elision (lock=0x7fead3689360 <cwidget::toplevel::input_thread::input_event_mutex>, private=0)
    at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:29
#2  0x00007fead33e3b9a in cwidget::toplevel::input_thread::operator()() () from /usr/lib/x86_64-linux-gnu/libcwidget.so.3
#3  0x00007fead33e3bc1 in void* cwidget::threads::thread::bootstrap<cwidget::threads::bootstrap_proxy<cwidget::toplevel::input_thread> >(void*) ()
   from /usr/lib/x86_64-linux-gnu/libcwidget.so.3
#4  0x00007fead243b464 in start_thread (arg=0x7feacebc6700) at pthread_create.c:333
#5  0x00007fead18e297f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
(gdb)

HTH.

#837366#10
Date:
2016-10-10 21:13:18 UTC
From:
To:
Hi,

JFTR: in case this is actually an issue inside cwidget or in the way
cwidget is used by aptitude, the two bug reports 839792 (Segfaults
when typing (into aptitude) during or maybe shortly before package
download) and #837366 (Crash when typing while saying "Updating ...
and quitting") might be the same issue or at least related.

		Regards, Axel

#837366#15
Date:
2016-12-31 17:00:22 UTC
From:
To:
Hi,

2016-10-10 23:13 Axel Beckert:

With an up-to-date unstable and 0.8.4-1, I cannot reproduce this
(neither of them).  Can you still reproduce it?


It seems to me that these recurrent problems involving cwidget, events,
typing and threads have something to do either with the specific locale
settings (mine are the ones below) or temporary ABI incompatibilities,
perhaps due to binNMU recompilations and different order of compilation
of boost, sigc++, cwidget and aptitude.  Something similar to what
happened with the Big GCC5 C++11 ABI break, just at a smaller scale.


# env | grep LANG
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en


Another idea would be a difference between using the minibuffer and not
using it.


Cheers.

#837366#22
Date:
2017-01-01 04:00:45 UTC
From:
To:
Hi Manuel,

Manuel A. Fernandez Montecelo wrote:

I can neither reproduce #839792 nor #837366 with 0.8.4-1 anymore,
hence closing both. Thanks for the heads up!

Sounds likely.

# env | grep LANG
LANGUAGE=en_GB:en
LANG=C.UTF-8

Yeah, except that at least with pressing "b" or "u", no minibuffer is
involved. (But yes, minibuffer often has been the key difference if I
have an issue and you never run into it. :-)

		Regards, Axel

#837366#27
Date:
2017-01-08 23:42:09 UTC
From:
To:
Hi Manuel,

I just ran into #837366 with 0.8.4-1, hence reopening it:

Writing extended state information                      10[1]    27840 segmentation fault (core dumped)  aptitude -u

Backtrace with 0.8.4-1:

Core was generated by `aptitude -u'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f347b781720 in _xend () at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:33
33      ../sysdeps/unix/sysv/linux/x86/elision-unlock.c: No such file or directory.
[Current thread is 1 (Thread 0x7f3477ef4700 (LWP 8259))]
(gdb) bt
#0  0x00007f347b781720 in _xend () at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:33
#1  __lll_unlock_elision (lock=0x7f347c9d6360 <cwidget::toplevel::input_thread::input_event_mutex>, private=0)
    at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:29
#2  0x00007f347c730b9a in cwidget::toplevel::input_thread::operator()() () from /usr/lib/x86_64-linux-gnu/libcwidget.so.3
#3  0x00007f347c730bc1 in void* cwidget::threads::thread::bootstrap<cwidget::threads::bootstrap_proxy<cwidget::toplevel::input_thread> >(void*) ()
   from /usr/lib/x86_64-linux-gnu/libcwidget.so.3
#4  0x00007f347b776464 in start_thread (arg=0x7f3477ef4700) at pthread_create.c:333
#5  0x00007f347ac1c9df in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

		Regards, Axel

#837366#38
Date:
2017-11-23 21:38:08 UTC
From:
To:
Hi,

Axel Beckert wrote:

Today I accidentially typed into the wrong window (probably "!g") and
hit that bug with with 0.8.10-1 on i386:
---8<--- ┌──────────────────────────────┐ │Updating state and quitting...│ └──────────────────────────────┘ Ouch! Got SIGSEGV, dying.. Segmentation fault --->8--- Unfortunately I found no according coredump for a backtrace despite corekeeper is installed on that system. Regards, Axel -- ,''`. | Axel Beckert <abe@debian.org>, https://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE