[Aptitude-devel] Bug#819840: aptitude: Segfaults if suspended and foregrounded on virtual linux console

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Tue Apr 5 13:24:26 UTC 2016


2016-04-05 12:26 GMT+01:00 Axel Beckert <abe at debian.org>:
> Hi Manuel,
>
>> >This does not happen, if
>> >
>> >* if tried inside an xterm
>> >* if just TERM is set to "linux", but the terminal is no virtual linux
>> > console, i.e. "env TERM=linux aptitude" does not exhibit the issue.
>>
>> What's "TERM" in the vt console?
>
> linux
>
>> Mine is "linux", and as you noted, it works fine.
>
> I didn't say that. I just said that in a non-virtual-console (i.e. an
> xterm), "env TERM=linux aptitude" does not crash. I didn't say, that
> TERM=linux in general prevents the crash. It's just not sufficient to
> provoke the crash.

Ah, OK, I misunderstood.  I was testing those in Linux virtual console
(more details below).  I hoped that your default in virtual console
was not "linux" so I could reproduce it and see what was going on.


> But if you don't get the crash on the vt console, I wonder what else
> is needed to provoke the crash as I was able to reproduce it on two Sid
> machines with different architectures out of the box.
>
> Is there a chance that LC_CHAR is involved? That's usually set to
> something with .UTF-8 at the end for me, either en_{GB,US,DK}.UTF-8 or
> C.UTF-8.

# env | egrep '^(TERM|LC|LANG)'
TERM=linux
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en

Setting "LANG=C.UTF-8" also doesn't trigger the crash when starting
aptitude, control-z, fg.


>> If I "unset TERM" or set it to the empty string, aptitude refuses to
>> start ("Error opening terminal: unknown"). If I set it to "linux",
>> "xterm" or "xterm-256color" it works fine. "vt100" works fine, but
>> no colours.
>
> Did you try these variants inside an terminal emulator under X or on a
> Linux virtual console?

I had tested all of the above in the virtual console; and then I tried
some of them also in xterms (xterm and konsole in particular), just as
a matter of trying to see if it was triggered there.


>> In any case, I couldn't get it to crash by suspending and restoring.
>
> Can you cross-check if you really had the same environment (vt
> console)? It seems there may have been some misunderstanding wrt. just
> setting $TERM vs the really used type of terminal. The latter matters,
> the former is either irrelevant or at least not sufficient.

So yes, I was testing all of the above in the virtual consoles.


>> None of the functions which name appears are from aptitude, cwidget or
>> apt, unfortunately.
>
> Oops. So this might be somewhere deeper down?

Not sure.

I was trying to say that the functions whose name appear
(vsnprintf_chk and the other _chk) are not part of
aptitude/apt/cwidget, and other of the functions in the backtrace
don't show names, so if you have of you have dbgsym of aptitude
installed (as the message of "loading symbols" indicate), it's not
part of aptitude.

If you install libcwidget*-dbg, libapt*-dbg and any other -dbg of the
"aptitude software stack" (sigc++, boost, libc6...) maybe something
appears in that backtrace.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list