Bug#972637: finch: crashes on startup with "illegal instruction"

2020-10-26 Thread Bernhard Übelacker
Hello Karsten,
thanks for the information - that explains why my emulated pentium
failed already at 0x...6bb because not supporting sse at all.

>From wikipedia [1] the pminud instruction at 0x...6fb got
introduced with sse4.1 which seem not supported from your
flags line (while on the other side intel says [2] it is a Penryn).
(Might there be a bios switch?)

Kind regards,
Bernhard

[1] https://en.wikipedia.org/wiki/SSE4
[2] 
https://ark.intel.com/content/www/de/de/ark/products/37253/intel-pentium-processor-t4300-1m-cache-2-10-ghz-800-mhz-fsb.html



Bug#972637: finch: crashes on startup with "illegal instruction"

2020-10-26 Thread Karsten Hilbert
On Mon, Oct 26, 2020 at 11:04:42PM +0100, Bernhard Übelacker wrote:

> From wikipedia [1] the pminud instruction at 0x...6fb got
> introduced with sse4.1 which seem not supported from your
> flags line (while on the other side intel says [2] it is a Penryn).

OTOH, apparently wikipedia knows better than Intel itself :-)

https://en.wikipedia.org/wiki/SSE4#Name_confusion

> (Might there be a bios switch?)

Unfortunately not.

Karsten

> [2] 
> https://ark.intel.com/content/www/de/de/ark/products/37253/intel-pentium-processor-t4300-1m-cache-2-10-ghz-800-mhz-fsb.html
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



Bug#972637: finch: crashes on startup with "illegal instruction"

2020-10-26 Thread Karsten Hilbert
Hello Bernhard,

thanks for your work.

I have (also) filed a bug against intel-media-va-driver which
was invovked from VLC. They have forwarded the issue upstream:

https://github.com/intel/libva/issues/466

My CPU is Penryn, so it supports "less" SSE than what's
attempted to be used by the VA driver at which point the
SIGILL occurrs.

> Therefore it would be interesting to know with which CPU you
> are getting this SIGILL (e.g. 'lscpu' or 'cat /proc/cpuinfo').

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 23
model name  : Pentium(R) Dual-Core CPU   T4300  @ 2.10GHz
stepping: 10
microcode   : 0xa0b
cpu MHz : 1545.084
cache size  : 1024 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 2
apicid  : 0
initial apicid  : 0
fdiv_bug: no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 13
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe nx lm constant_tsc 
arch_perfmon pebs bts cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 
cx16 xtpr pdcm xsave lahf_lm dtherm
bugs: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds 
swapgs itlb_multihit
bogomips: 4189.35
clflush size: 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

> Otherwise finch seems not to depend directly from intel-media-va-driver,

Yeah, I certainly wondered about that, too, it being a console app.

> and from the package description if your CPU is older than "Broadwell",
> then you might even not benefit from this package. Therefore a
> workaround might be to uninstall intel-media-va-driver if no
> other dependencies require it?

Other deps do (see vlc above).

The stranger thing is that running vlc from either an xterm
or the desktop environment fails, while clvc only fails when
running under X and does not fail on the console.

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



Bug#972637: finch: crashes on startup with "illegal instruction"

2020-10-26 Thread Bernhard Übelacker
Hello Karsten,
I tried to collect some more information for the maintainer and
could reproduce this (or nearly) the same SIGILL with a qemu VM limited
to a pentium class CPU.

The instruction in question might these below:

   0xb78816bb <+75>:movd   0x4(%esi),%xmm2 (here I received the SIGILL)
   0xb78816fb <+139>:   pminud %xmm2,%xmm3 (thats from your backtrace 
the similar address offset 0x...6fb)

Both access a register xmm2/xmm3 which seems to be "just"
available on CPUs having the SSE extension.

Therefore it would be interesting to know with which CPU you
are getting this SIGILL (e.g. 'lscpu' or 'cat /proc/cpuinfo').

Otherwise finch seems not to depend directly from intel-media-va-driver,
and from the package description if your CPU is older than "Broadwell",
then you might even not benefit from this package. Therefore a
workaround might be to uninstall intel-media-va-driver if no
other dependencies require it?

Kind regards,
Bernhard


# Bullseye/testing i386 qemu VM 2020-10-26 (with -cpu pentium)


apt update
apt dist-upgrade


apt install systemd-coredump mc htop psmisc net-tools strace gdb 
intel-media-va-driver intel-media-va-driver-dbgsym coreutils-dbgsym


gdb -q
set width 0
set pagination off
file /bin/ls
b main
run

#b call_init
call __dlopen("/usr/lib/i386-linux-gnu/dri/iHD_drv_video.so", 4354)
bt
disassemble

0xb78816b9













benutzer@debian:~$ gdb -q
(gdb) set width 0
(gdb) set pagination off
(gdb) file /bin/ls
Reading symbols from /bin/ls...
Reading symbols from 
/usr/lib/debug/.build-id/00/695414aa5413c8667e62c2362d119cb233a504.debug...
(gdb) b main
Breakpoint 1 at 0x2770: file src/ls.c, line 1622.
(gdb) run
Starting program: /bin/ls 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Breakpoint 1, main (argc=1, argv=0xb744) at src/ls.c:1622
1622src/ls.c: Datei oder Verzeichnis nicht gefunden.
(gdb) call __dlopen("/usr/lib/i386-linux-gnu/dri/iHD_drv_video.so", 4354)

Program received signal SIGILL, Illegal instruction.
std::__cxx11::basic_string, std::allocator 
>::basic_string (__str=..., this=0x42fc50) at 
/usr/include/c++/10/bits/basic_string.h:569
569 /usr/include/c++/10/bits/basic_string.h: Datei oder Verzeichnis nicht 
gefunden.
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(__dlopen) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb) bt
#0  std::__cxx11::basic_string, 
std::allocator >::basic_string (__str=..., this=0x42fc50) at 
/usr/include/c++/10/bits/basic_string.h:569
#1  std::pair, 
std::allocator > const, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)>::pair, std::allocator >, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*), true> (__p=..., this=0x42fc50) at 
/usr/include/c++/10/bits/stl_pair.h:373
#2  
__gnu_cxx::new_allocator, std::allocator > const, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)> > 
>::construct, 
std::allocator > const, DdiMediaDecode* (*)(DDI_DECODE_CONFIG_ATTR*)>, 
std::pair, 
std::allocator >, DdiMediaDecode* (*)(DDI_DECODE_CONFIG_ATTR*)> > 
(this=0xb7ceb8b0 ::GetCreators[abi:cxx11]()::creators>, __p=0x42fc50) at 
/usr/include/c++/10/ext/new_allocator.h:150
#3  
__gnu_cxx::new_allocator, std::allocator > const, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)> > 
>::construct, 
std::allocator > const, DdiMediaDecode* (*)(DDI_DECODE_CONFIG_ATTR*)>, 
std::pair, 
std::allocator >, DdiMediaDecode* (*)(DDI_DECODE_CONFIG_ATTR*)> > 
(__p=0x42fc50, this=0xb7ceb8b0 ::GetCreators[abi:cxx11]()::creators>) at 
/usr/include/c++/10/ext/new_allocator.h:148
#4  
std::allocator_traits, std::allocator > const, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)> > > 
>::construct, 
std::allocator > const, DdiMediaDecode* (*)(DDI_DECODE_CONFIG_ATTR*)>, 
std::pair, 
std::allocator >, DdiMediaDecode* (*)(DDI_DECODE_CONFIG_ATTR*)> > 
(__p=0x42fc50, __a=...) at /usr/include/c++/10/bits/alloc_traits.h:512
#5  std::_Rb_tree, 
std::allocator >, std::pair, std::allocator > const, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)>, 
std::_Select1st, std::allocator > const, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)> >, std::less, std::allocator > >, 
std::allocator, std::allocator > const, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)> > 
>::_M_construct_node, std::allocator >, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)> > (__node=0x42fc40, this=0xb7ceb8b0 
::GetCreators[abi:cxx11]()::creators>) at 
/usr/include/c++/10/bits/stl_tree.h:618
#6  std::_Rb_tree, 
std::allocator >, std::pair, std::allocator > const, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)>, 
std::_Select1st, std::allocator > const, DdiMediaDecode* 
(*)(DDI_DECODE_CONFIG_ATTR*)> >, std::less, std::allocator > >, 
std::allocator, std::allocator > const, DdiMediaDecode* 

Bug#972637: finch: crashes on startup with "illegal instruction"

2020-10-21 Thread Karsten Hilbert
Package: finch
Version: 2.13.0-2.2+b1
Severity: important

Dear maintainers,

on startup this happens (taken from systemd journal):

kernel: traps: finch[25048] trap invalid opcode ip:ad38b6fb sp:bfb44fc0 
error:0 in iHD_drv_video.so[ad0ca000+3c2000]

Running under gdb and backtracing:

Thread 1 "finch" received signal SIGILL, Illegal instruction.
 0xad45d6fb in ?? 
() from /usr/lib/i386-linux-gnu/dri/iHD_drv_video.so
(gdb) bt
#0  0xad45d6fb in ?? () from 
/usr/lib/i386-linux-gnu/dri/iHD_drv_video.so
#1  0xad45fb61 in ?? () from 
/usr/lib/i386-linux-gnu/dri/iHD_drv_video.so
#2  0xad1ab0a6 in ?? () from 
/usr/lib/i386-linux-gnu/dri/iHD_drv_video.so
#3  0xb7fe5e9c in call_init (l=, argc=argc@entry=1, 
argv=argv@entry=0xb634, env=0xb63c) at dl-init.c:72
#4  0xb7fe5fa2 in call_init (env=0xb63c, argv=0xb634, argc=1, 
l=) at dl-init.c:30
#5  _dl_init (main_map=, argc=1, argv=0xb634, 
env=0xb63c) at dl-init.c:119
#6  0xb7fe92a7 in call_dl_init (closure=0xbfffe870) at dl-open.c:469
#7  0xb79a9524 in __GI__dl_catch_exception (exception=, 
operate=, args=) at dl-error-skeleton.c:182
#8  0xb7fea08d in dl_open_worker (a=) at dl-open.c:758
#9  0xb79a94c9 in __GI__dl_catch_exception (exception=0xbfffe9a0, 
operate=0xb7fe9990 , args=0xbfffe9ac) at dl-error-skeleton.c:208
#10 0xb7fe95e6 in _dl_open (file=0x7bc970 
"/usr/lib/i386-linux-gnu/dri/iHD_drv_video.so", mode=-2147479294, 
caller_dlopen=0xad918cc3, nsid=, argc=1, argv=0xb634, 
env=0xb63c) at dl-open.c:837
#11 0xb78652c8 in dlopen_doit (a=0xbfffebac) at dlopen.c:66
#12 0xb79a94c9 in __GI__dl_catch_exception (exception=0xbfffeb40, 
operate=0xb7865250 , args=0xbfffebac) at dl-error-skeleton.c:208
#13 0xb79a9590 in __GI__dl_catch_error (objname=0x45d68c, 
errstring=0x45d690, mallocedp=0x45d688, operate=0xb7865250 , 
args=0xbfffebac) at dl-error-skeleton.c:227
#14 0xb7865b11 in _dlerror_run (operate=0xb7865250 , 
args=0xbfffebac) at dlerror.c:170
#15 0xb7865364 in __dlopen (file=0x7bc970 
"/usr/lib/i386-linux-gnu/dri/iHD_drv_video.so", mode=4354) at dlopen.c:87
#16 0xad918cc3 in ?? () from /usr/lib/i386-linux-gnu/libva.so.2
#17 0xad919f90 in vaInitialize () from 
/usr/lib/i386-linux-gnu/libva.so.2
#18 0xada1b525 in ?? () from 
/usr/lib/i386-linux-gnu/gstreamer-1.0/libgstva.so
#19 0xada1bfe7 in ?? () from 
/usr/lib/i386-linux-gnu/gstreamer-1.0/libgstva.so
#20 0xada1c3b9 in ?? () from 
/usr/lib/i386-linux-gnu/gstreamer-1.0/libgstva.so
#21 0xada15568 in ?? () from 
/usr/lib/i386-linux-gnu/gstreamer-1.0/libgstva.so
#22 0xb7e4d26e in ?? () from 
/usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0
#23 0xb7e4f24e in ?? () from 
/usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0
#24 0xb7e5d0cd in ?? () from 
/usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0
#25 0xb7e5e05b in ?? () from 
/usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0
#26 0xb7e5e33e in ?? () from 
/usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0
#27 0xb7e5fe8e in gst_update_registry () from 
/usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0
#28 0xb7df10be in ?? () from 
/usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0
#29 0xb7c7569b in g_option_context_parse () from 
/usr/lib/i386-linux-gnu/libglib-2.0.so.0
#30 0xb7df1d25 in gst_init_check () from 
/usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0
#31 0x0042e5a8 in finch_sound_init () at ././finch/gntsound.c:383
#32 0x004313ed in gnt_ui_init () at ././finch/gntui.c:68
#33 0xb7ac2c29 in purple_core_init () from /usr/lib/libpurple.so.0
#34 0x0040f344 in init_libpurple (argv=0xb634, argc=1) at 
././finch/finch.c:383
#35 gnt_start (argc=, argv=) at 
././finch/finch.c:434
#36 main (argc=, argv=) at 
././finch/finch.c:456
(gdb)

Thanks,
Karsten



-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug')
Architecture: i386 (i686)

Kernel: Linux 5.8.0-3-686-pae (SMP w/2 CPU threads)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages finch depends on:
ii  libc6  2.31-4
ii  libglib2.0-0   2.66.1-2
ii  libgstreamer1.0-0  1.18.0-3
ii  libncursesw6   6.2+20200918-1
ii  libpurple0 2.13.0-2.2+b1
ii  libtinfo6  6.2+20200918-1
ii  libxml22.9.10+dfsg-6.1
ii  pidgin-data2.13.0-2.2

finch recommends no packages.

Versions of packages finch suggests:
ii  libx11-6  2:1.6.12-1

-- no debconf information