Bug#1042376: digikam crashes with "Illegal instruction"
Now that 8.3.0-2 has landed in testing, I can confirm that the bug has been fixed. Thanks, Detlef
Bug#1042376: digikam crashes with "Illegal instruction"
On 19.08.23 22:00, Steven Robbins wrote: 1. Test a build without SSE4. I built 8.1.0-2 from sources (which took 70 minutes on my machine, btw), removed the version from "sid" that I had installed the other day and then did: root@fluke:~# dpkg -i digikam_8.1.0-2_amd64.deb digikam-data_8.1.0-2_all.deb digikam-private-libs_8.1.0-2_amd64.deb Lo and behold! It works flawlessly and is even able to show videos (something that the 8.2.0 AppImage from KDE, that I had been using in the meantime (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042376#25), failed at). 2. Dig further with the debugger to understand what the illegal instruction is. I may be completely wrong in assuming it is an SSE4 instruction -- particularly given the fact that the test code we discussed August 13/14 builds the same with/without the -msse4.1 flag. If you are handy with gdb you can probably dig into the assembly and figure out what the instruction is. Now that I'm in the possession of working packages for digikam, I could volunteer to assist you in finding out the root cause of the crash (which I assume probably affects only a small number of users anyway). However, it has been literally decades that I've done any serious programming in C/C++. Any hints on how to use gdb in this regard and what to look for would be highly appreciated. Kind regards, Detlef
Bug#1042376: digikam crashes with "Illegal instruction"
On Saturday, August 19, 2023 11:53:35 A.M. CDT you wrote: >Hi Steve, > >I'm afraid, it doesn't prevent digikam from crashing. > >Here is what I did (after fetching the latest updates from "testing" this > morning): [ ... ] >Not sure if my approach is the preferred way to test something across > different branches, though. I didn't want to switch my entire system to > "sid" (this is my main machine, after all :) ). Hope that's OK. If there's > a better way of testing your version, please let me know. The testing approach is fine. Thanks for this. Given the gdb stack trace, this result is what I expected. I don't understand what the illegal instruction is at that address. I have two ideas at this point. 1. Test a build without SSE4. If you feel up to it, this would be easiest to do on your machine because the build-time detection should simply work fine. If you have sufficient time and interest, please look at https:// www.linuxfordevices.com/tutorials/debian/build-packages-from-source If you aren't able to build from sources, let me know. The alternative is for me to build it here after hacking the sources to disable SSE4 detection. 2. Dig further with the debugger to understand what the illegal instruction is. I may be completely wrong in assuming it is an SSE4 instruction -- particularly given the fact that the test code we discussed August 13/14 builds the same with/without the -msse4.1 flag. If you are handy with gdb you can probably dig into the assembly and figure out what the instruction is. Regards, -Steve signature.asc Description: This is a digitally signed message part.
Bug#1042376: digikam crashes with "Illegal instruction"
Hi Steve, I'm afraid, it doesn't prevent digikam from crashing. Here is what I did (after fetching the latest updates from "testing" this morning): root@fluke:/etc/apt# sed -i 's/trixie/sid/' sources.list root@fluke:/etc/apt# apt-get update Get:1 http://ftp.de.debian.org/debian sid InRelease [210 kB] (...) root@fluke:/etc/apt# apt-get install digikam (...) The following additional packages will be installed: digikam-data digikam-private-libs Suggested packages: digikam-doc The following packages will be upgraded: digikam digikam-data digikam-private-libs 3 upgraded, 0 newly installed, 0 to remove and 212 not upgraded. Need to get 19.2 MB of archives. After this operation, 2,048 B disk space will be freed. Do you want to continue? [Y/n] Get:1 http://ftp.de.debian.org/debian sid/main amd64 digikam amd64 4:8.1.0-3 [100 kB] Get:2 http://ftp.de.debian.org/debian sid/main amd64 digikam-private-libs amd64 4:8.1.0-3 [9,949 kB] Get:3 http://ftp.de.debian.org/debian sid/main amd64 digikam-data all 4:8.1.0-3 [9,121 kB] Fetched 19.2 MB in 2s (12.0 MB/s) Reading changelogs... Done (Reading database ... 475773 files and directories currently installed.) Preparing to unpack .../digikam_4%3a8.1.0-3_amd64.deb ... Unpacking digikam (4:8.1.0-3) over (4:8.1.0-2+b1) ... Preparing to unpack .../digikam-private-libs_4%3a8.1.0-3_amd64.deb ... Unpacking digikam-private-libs (4:8.1.0-3) over (4:8.1.0-2+b1) ... Preparing to unpack .../digikam-data_4%3a8.1.0-3_all.deb ... Unpacking digikam-data (4:8.1.0-3) over (4:8.1.0-2) ... Setting up digikam-private-libs (4:8.1.0-3) ... Setting up digikam-data (4:8.1.0-3) ... Setting up digikam (4:8.1.0-3) ... (...) dm@fluke:~$ digikam Illegal instruction dm@fluke:~$ export DEBUGINFOD_URLS="https://debuginfod.debian.net; dm@fluke:~$ gdb digikam (...) Program received signal SIGILL, Illegal instruction. 0x76cc2103 in operator* (m1=..., m2=...) at /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h:642 642 QMatrix4x4 m = m1; (gdb) bt #0 0x76cc2103 in operator* (m1=..., m2=...) at /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h:642 #1 0x765b861d in __static_initialization_and_destruction_0 () at ./core/libs/video/qtav/utils/ColorTransform.cpp:59 #2 0x77fcfe2e in call_init (env=0x7fffe0b8, argv=0x7fffe0a8, argc=1, l=) at ./elf/dl-init.c:70 #3 call_init (l=, argc=1, argv=0x7fffe0a8, env=0x7fffe0b8) at ./elf/dl-init.c:26 #4 0x77fcff14 in _dl_init (main_map=0x77ffe2c0, argc=1, argv=0x7fffe0a8, env=0x7fffe0b8) at ./elf/dl-init.c:117 #5 0x77fe5170 in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 #6 0x0001 in ?? () #7 0x7fffe3d4 in ?? () #8 0x in ?? () Not sure if my approach is the preferred way to test something across different branches, though. I didn't want to switch my entire system to "sid" (this is my main machine, after all :) ). Hope that's OK. If there's a better way of testing your version, please let me know. I'm willing to repeat the test once 8.1.0-3 lands in "testing" although I'm not expecting the result to be different. Cheers, Detlef
Bug#1042376: digikam crashes with "Illegal instruction"
On Monday, August 14, 2023 8:52:14 A.M. CDT Steven Robbins wrote: > So I'm back to square 1, very confused by your crash. I have made a change to digikam and uploaded 8.1.0-3 last night. It should avoid calling SSE 4 functions if only SSE 2 is detected. I'd appreciate if you could try it out and report back to this bug whether it fixes your crash or not. It's a bit of a shot in the dark since it doesn't affect the specific function pointed at in your back trace. Best, -Steve signature.asc Description: This is a digitally signed message part.
Bug#1042376: digikam crashes with "Illegal instruction"
On Monday, August 14, 2023 1:25:23 A.M. CDT Detlef Matthiessen wrote: >Hi Steve, > >right after I replied to the bug report, I noticed: > > dm@fluke:/tmp$ diff test-no-sse4 test-sse4 > dm@fluke:/tmp$ > >Can you confirm that the attached binaries are identical? Nice catch. They are identical. I repeated the compilations this morning with/without - msse4.1 and the result is indeed identical. In fact, it is the same when I omit *both* - msse2 and -msse4.1. I notice also that nowhere does the code reference the matrix computed. I wondered whether all that code was being optimized away -- so I added code to reference it: std::cout << "Element[0][0] = " << yuv2rgb_bt601(0,0) << "\n"; However, there is no change: the binary is identical regardless of the -m options. So I'm back to square 1, very confused by your crash. -Steve signature.asc Description: This is a digitally signed message part.
Bug#1042376: digikam crashes with "Illegal instruction"
Hi Steve, dm@fluke:/tmp$ g++ matrixtest.cc -I /usr/include/x86_64-linux-gnu/qt5 -msse2 -msse4.1 -fPIC -lQt5Core dm@fluke:/tmp$ ./a.out Hello Hm. Just to be sure, I also ran the attached executables, however they are giving me the same result: dm@fluke:/tmp$ ./test-sse4 Hello dm@fluke:/tmp$ ./test-no-sse4 Hello dm@fluke:/tmp$ g++ --version g++ (Debian 13.2.0-1) 13.2.0 (...) However: dm@fluke:~$ cpuid -1 -l1 CPU: version information (1/eax): processor type = primary processor (0) family = 0x6 (6) model = 0xf (15) stepping id = 0xb (11) extended family = 0x0 (0) extended model = 0x0 (0) (family synth) = 0x6 (6) (model synth) = 0xf (15) miscellaneous (1/ebx): process local APIC physical ID = 0x1 (1) maximum IDs for CPUs in pkg= 0x4 (4) CLFLUSH line size = 0x8 (8) brand index= 0x0 (0) brand id = 0x00 (0): unknown feature information (1/edx): x87 FPU on chip= true VME: virtual-8086 mode enhancement = true DE: debugging extensions = true PSE: page size extensions = true TSC: time stamp counter= true RDMSR and WRMSR support= true PAE: physical address extensions = true MCE: machine check exception = true CMPXCHG8B inst.= true APIC on chip = true SYSENTER and SYSEXIT = true MTRR: memory type range registers = true PTE global bit = true MCA: machine check architecture= true CMOV: conditional move/compare instr = true PAT: page attribute table = true PSE-36: page size extension= true PSN: processor serial number = false CLFLUSH instruction= true DS: debug store= true ACPI: thermal monitor and clock ctrl = true MMX Technology = true FXSAVE/FXRSTOR = true SSE extensions = true SSE2 extensions= true SS: self snoop = true hyper-threading / multi-core supported = true TM: therm. monitor = true IA64 = false PBE: pending break event = true feature information (1/ecx): PNI/SSE3: Prescott New Instructions = true PCLMULDQ instruction= false DTES64: 64-bit debug store = true MONITOR/MWAIT = true CPL-qualified debug store = true VMX: virtual machine extensions = true SMX: safer mode extensions = false Enhanced Intel SpeedStep Technology = true TM2: thermal monitor 2 = true SSSE3 extensions= true context ID: adaptive or shared L1 data = false SDBG: IA32_DEBUG_INTERFACE = false FMA instruction = false CMPXCHG16B instruction = true xTPR disable= true PDCM: perfmon and debug = true PCID: process context identifiers = false DCA: direct cache access= false SSE4.1 extensions = false SSE4.2 extensions = false x2APIC: extended xAPIC support = false MOVBE instruction = false POPCNT instruction = false time stamp counter deadline = false AES instruction = false XSAVE/XSTOR states = false OS-enabled XSAVE/XSTOR = false AVX: advanced vector extensions = false F16C half-precision convert instruction = false RDRAND instruction = false hypervisor guest status = false Regards, Detlef
Bug#1042376: digikam crashes with "Illegal instruction"
Hi Steve, On 13.08.23 00:05, Steven Robbins wrote: There must be more than this? Normally a backtrace shows a number of stack frames. Did you type "bt" in the gdb propmpt after the crash? Sorry, missed that part. My bad. Program received signal SIGILL, Illegal instruction. 0x76cc20a3 in operator* (m1=..., m2=...) at /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h:642 642 QMatrix4x4 m = m1; (gdb) bt #0 0x76cc20a3 in operator* (m1=..., m2=...) at /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h:642 #1 0x765b861d in __static_initialization_and_destruction_0 () at ./core/libs/video/qtav/utils/ColorTransform.cpp:59 #2 0x77fcfe2e in call_init (env=0x7fffe0b8, argv=0x7fffe0a8, argc=1, l=) at ./elf/dl-init.c:70 #3 call_init (l=, argc=1, argv=0x7fffe0a8, env=0x7fffe0b8) at ./elf/dl-init.c:26 #4 0x77fcff14 in _dl_init (main_map=0x77ffe2c0, argc=1, argv=0x7fffe0a8, env=0x7fffe0b8) at ./elf/dl-init.c:117 #5 0x77fe5170 in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 #6 0x0001 in ?? () #7 0x7fffe3d3 in ?? () #8 0x in ?? () (gdb) Cheers, Detlef
Bug#1042376: digikam crashes with "Illegal instruction"
On Sun, 30 Jul 2023 07:27:51 +0200 Detlef Matthiessen wrote: > >Hi Steve, > >I've got: > > Program received signal SIGILL, Illegal instruction. > 0x76cc20d3 in operator* (m1=..., m2=...) at > /usr/include/x86_64-linux-gnu/qt5/ QtGui/qmatrix4x4.h:642 > Downloading source file /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h > 642 /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h: Directory not > empty. > >HTH, Detlef There must be more than this? Normally a backtrace shows a number of stack frames. Did you type "bt" in the gdb propmpt after the crash? Example: (gdb) bt #0 0x747199ef in __GI___poll (fds=0x607d36a0, nfds=13, timeout=4978) at ../ sysdeps/unix/sysv/linux/poll.c:29 #1 0x7fffe5918517 in g_main_context_poll_unlocked (priority=, n_fds=13, fds=0x607d36a0, timeout=, context=0x7fff48000ec0) at ../../../glib/gmain.c:4653 #2 g_main_context_iterate_unlocked (context=context@entry=0x7fff48000ec0, block=block@entry=1, dispatch=dispatch@entry=1, self=) at ../../../glib/ gmain.c:4344 #3 0x7fffe5918bac in g_main_context_iteration (context=0x7fff48000ec0, may_block=1) at ../../../glib/gmain.c:4414 #4 0x74f1c8d6 in QEventDispatcherGlib::processEvents(QFlags) (this=0x55c298c0, flags=...) at kernel/qeventdispatcher_glib.cpp:423 #5 0x74ec1b7b in QEventLoop::exec(QFlags) (this=this@entry=0x7fffd690, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69 #6 0x74eca020 in QCoreApplication::exec() () at ../../include/QtCore/../../src/ corelib/global/qflags.h:121 #7 0x7533258c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1863 #8 0x75b62ca5 in QApplication::exec() () at kernel/qapplication.cpp:2832 #9 0xa0e6 in main(int, char**) (argc=, argv=) at ./core/app/main/main.cpp:478 signature.asc Description: This is a digitally signed message part.
Bug#1042376: digikam crashes with "Illegal instruction"
On Sun, 30 Jul 2023 10:22:19 +0200 Detlef Matthiessen wrote: > On 30.07.23 07:45, Detlef Matthiessen wrote: > > 642QMatrix4x4 m = m1; > >On a related note: a quick search for "digikam" and "642" yields the following bug report: > https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/2000718 > https://bugs.kde.org/show_bug.cgi?id=465548 > >Admittedly, I'm not familiar with the similarities of the instruction sets of an AMD Athlon II vs. my own Intel Q6700 > (or more precise, their lack of complex instructions), but the problem sounds quite similar to mine. > >FWIW, comment https://bugs.kde.org/show_bug.cgi?id=465548#c16 points to AppImages provided by the KDE team. 8.1.0 is no > longer available, but I was able to successfully start https://files.kde.org/ digikam/digiKam-8.2.0-20230724T132443-x86-64.appimage > on my machine. So to me it looks as this bug probably already has been fixed upstream. Thanks for this. Oddly, the KDE bug notes indicate that the fix was put into 8.1.0 -- which is the version that this bug's originator reported on. So it's unclear whether this is the same issue. -Steve signature.asc Description: This is a digitally signed message part.
Bug#1042376: digikam crashes with "Illegal instruction"
On 30.07.23 07:45, Detlef Matthiessen wrote: 642 QMatrix4x4 m = m1; On a related note: a quick search for "digikam" and "642" yields the following bug report: https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/2000718 https://bugs.kde.org/show_bug.cgi?id=465548 Admittedly, I'm not familiar with the similarities of the instruction sets of an AMD Athlon II vs. my own Intel Q6700 (or more precise, their lack of complex instructions), but the problem sounds quite similar to mine. FWIW, comment https://bugs.kde.org/show_bug.cgi?id=465548#c16 points to AppImages provided by the KDE team. 8.1.0 is no longer available, but I was able to successfully start https://files.kde.org/digikam/digiKam-8.2.0-20230724T132443-x86-64.appimage on my machine. So to me it looks as this bug probably already has been fixed upstream. Cheers, Detlef
Bug#1042376: digikam crashes with "Illegal instruction"
On 30.07.23 07:27, Detlef Matthiessen wrote: Program received signal SIGILL, Illegal instruction. 0x76cc20d3 in operator* (m1=..., m2=...) at /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h:642 Downloading source file /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h 642 /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h: Directory not empty. I just realized that the last message was due to not having installed the related dev-packages on my system. So I did: root@fluke:~# apt-get install qtbase5-dev and now the complete error message reads: Program received signal SIGILL, Illegal instruction. 0x76cc20d3 in operator* (m1=..., m2=...) at /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h:642 642 QMatrix4x4 m = m1; Cheers, Kay
Bug#1042376: digikam crashes with "Illegal instruction"
Hi Steve, I've got: Program received signal SIGILL, Illegal instruction. 0x76cc20d3 in operator* (m1=..., m2=...) at /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h:642 Downloading source file /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h 642 /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix4x4.h: Directory not empty. HTH, Detlef
Bug#1042376: digikam crashes with "Illegal instruction"
On Thursday, July 27, 2023 3:23:07 A.M. CDT Detlef Matthiessen wrote: > after updating digikam from 7.9.0-2 to 8.1.0-2, it crashes almost instantly: > dm@fluke:~$ digikam > Illegal instruction > > (...) > > If you need more information, please let me know. Thanks -- we'll need a backtrace from your system. To obtain the trace, there are instructions here: https://wiki.debian.org/ HowToGetABacktrace I got a trace using the following simple recipe: apt install gdb export DEBUGINFOD_URLS="https://debuginfod.debian.net; gdb digikam - answer 'y' when asked "Enable debuginfod for this session?" run Then reproduce your crash, and cut/paste the output into an email to this bug. Thanks, -Steve signature.asc Description: This is a digitally signed message part.
Bug#1042376: digikam crashes with "Illegal instruction"
Package: digikam Version: 4:8.1.0-2 Severity: important Dear Maintainer, after updating digikam from 7.9.0-2 to 8.1.0-2, it crashes almost instantly: dm@fluke:~$ digikam Illegal instruction The CPU I'm running this on is a rather old Quad Core: dm@fluke:~$ lscpu Architecture:x86_64 CPU op-mode(s):32-bit, 64-bit Address sizes: 36 bits physical, 48 bits virtual Byte Order:Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Vendor ID: GenuineIntel Model name:Intel(R) Core(TM)2 Quad CPUQ6700 @ 2.66GHz CPU family: 6 Model: 15 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 Stepping:11 BogoMIPS:5319.94 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 syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm pti tpr_shadow vnmi flexpriority vpid dtherm Virtualization features: Virtualization:VT-x (...) If you need more information, please let me know. Cheers, Detlef -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.3.0-1-amd64 (SMP w/4 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages digikam depends on: ii digikam-data 4:8.1.0-2 ii digikam-private-libs 4:8.1.0-2 ii libc6 2.37-6 ii libgcc-s1 13.1.0-9 ii libkf5configcore5 5.107.0-1 ii libkf5coreaddons5 5.107.0-1 ii libkf5i18n5 5.107.0-1+b1 ii libmagick++-6.q16-8 8:6.9.11.60+dfsg-1.6 ii libqt5core5a 5.15.10+dfsg-2 ii libqt5gui55.15.10+dfsg-2 ii libqt5sql55.15.10+dfsg-2 ii libqt5sql5-mysql 5.15.10+dfsg-2 ii libqt5sql5-sqlite 5.15.10+dfsg-2 ii libqt5widgets55.15.10+dfsg-2 ii libstdc++613.1.0-9 ii perl 5.36.0-7 Versions of packages digikam recommends: ii epiphany-browser [www-browser] 44.5-2 ii ffmpegthumbs4:22.12.3-1 ii firefox-esr [www-browser] 115.0.2esr-1 ii konqueror [www-browser] 4:22.12.3-2 ii lynx [www-browser] 2.9.0dev.12-1 ii w3m [www-browser] 0.5.3+git20230121-2 Versions of packages digikam suggests: ii breeze-icon-theme 4:5.107.0-1 pn digikam-doc ii systemsettings 4:5.27.5-2 -- no debconf information --1690443662-eximdsn-30352056--