Hi @PureTryOut and thank you for maintaining Kasts in Alpine!
When starting kasts from CLI, it gives a Segfault after checking Database version.
I've also tried running it inside debugger through SSH, seems a problem with cryptographic library called through QCryptographicHash
$ gdb --args env QT_QUICK_CONTROLS_MOBILE=1 kastsGNU gdb (GDB) 13.2Copyright (C) 2023 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.Type "show copying" and "show warranty" for details.This GDB was configured as "aarch64-alpine-linux-musl".Type "show configuration" for configuration details.For bug reporting instructions, please see:<https://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>.For help, type "help".Type "apropos word" to search for commands related to "word"...Reading symbols from env...(No debugging symbols found in env)(gdb) runStarting program: /usr/bin/env QT_QUICK_CONTROLS_MOBILE=1 kastsprocess 10398 is executing new program: /usr/bin/kastsProgram received signal SIGILL, Illegal instruction.0x0000fffff4dae000 in ?? () from /lib/libcrypto.so.3(gdb) bt#0 0x0000fffff4dae000 in ?? () from /lib/libcrypto.so.3#1 0x0000020000000000 in ?? ()Backtrace stopped: previous frame identical to this frame (corrupt stack?)(gdb) quit
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
Interesting, for me it launches just fine and I can listen to the postmarketOS podcast without any problems Both on an existing installation (my desktop) and a new installation (my laptop, just now).
Probably something broken in libcrypto3 or whatever is called by kasts...
I'm more of a Debian guy, so I do not exactly look where to look: I've looked in the Alpine wiki but found nothing about dbg packages to get more information about this... both kasts and libcrypto3 seem NOT to have !dbg flag in their APKBUILD, so dbg packages should be available somewhere?
NOT to have !dbg flag in their APKBUILD, so dbg packages should be available somewhere?
No that's not how things work. -dbg packages need to explicitly be enabled by adding both $pkgname-dbg to $subpackages and by making sure the build system actually produces debug symbols. Kasts is build with -DCMAKE_BUILD_TYPE=RelWithDebInfo so the build system part is alright, but it doesn't have the debug package enabled in $subpackages. Debug packages are often quite big and take up a lot of mirror space so to enable it is decided on a case-by-case bases when needed.
libcrypto3 is part of the openssl package which does have openssl-dbg available, so that just needs to be installed.
Ok, building kasts including dbg wasn't that hard.
oneplus-enchilada:~$ apk search -v | grep kastskasts-23.08.3-r0 - Kirigami-based podcast playerkasts-dbg-23.08.3-r0 - Kirigami-based podcast player (debug symbols)kasts-lang-23.08.3-r0 - Languages for package kastsoneplus-enchilada:~$ apk search -v | grep openssl-dbgopenssl-dbg-3.1.4-r1 - Toolkit for Transport Layer Security (TLS) (debug symbols)oneplus-enchilada:~$ gdb kastsGNU gdb (GDB) 13.2Copyright (C) 2023 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.Type "show copying" and "show warranty" for details.This GDB was configured as "aarch64-alpine-linux-musl".Type "show configuration" for configuration details.For bug reporting instructions, please see:<https://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>.For help, type "help".Type "apropos word" to search for commands related to "word"...Reading symbols from kasts...Reading symbols from /usr/lib/debug//usr/bin/kasts.debug...(gdb) runStarting program: /usr/bin/kasts Program received signal SIGILL, Illegal instruction.0x0000fffff4dae000 in ?? () from /lib/libcrypto.so.3(gdb) bt#0 0x0000fffff4dae000 in ?? () from /lib/libcrypto.so.3#1 0x0000020000000000 in ?? ()Backtrace stopped: previous frame identical to this frame (corrupt stack?)(gdb)
Yep, it's the line before launching gdb in my previous comment.
I'm wondering if I've screwed up something when building kasts on the device: in order for the dbg symbols to be recognized, I had to remove kasts from repository and install the 3 local packages kasts, kasts-dbg and kasts-lang. Maybe I have to do the same for openssl?
No that makes no sense. kasts-lang is most definitely not required, that just installs localization files and have no code in them. kasts should've just been upgraded with a simple apk upgrade -a. Only kasts-dbg needs to be explicitly installed.
Adding that I'm seeing the same seg fault on my pine64-pinephone running postmarketos on both 23.12 and edge channels (including a clean install with pmbootstrap today).
@tiol11 I think the SIGILL you are seeing is a CPU capability-probing mechanism by openssl which can be ignored with a gdb option per the OpenSSL FAQ ( https://www.openssl.org/docs/faq.html ) [emphasis mine]:
When debugging I observe SIGILL during OpenSSL initialization: why?
OpenSSL adapts to processor it executes on and for this reason has to query its capabilities. Unfortunately on some processors the only way to achieve this for non-privileged code is to attempt instructions that can cause Illegal Instruction exceptions. The initialization procedure is coded to handle these exceptions to manipulate corresponding bits in capabilities vector. This normally appears transparent, except when you execute it under debugger, which stops prior delivering signal to handler. Simply resuming execution does the trick, but when debugging a lot it might feel counterproductive. Two options. Either set explicit capability environment variable in order to bypass the capability query (see corresponding crypto/*cap.c for details). Or configure debugger not to stop upon SIGILL exception, e.g. in gdb case add ‘handle SIGILL nostop’ to your .gdbinit.
Please let me know if there is any additional information or testing that would help.
@PureTryOut Kasts seems to be broken again unless vlc gets installed, here pmOS edge so kasts-24.02.2-r0 on op6-enchilada. Maybe something got lost in the Qt5->Qt6 transition?
Hmm it does depend on it through so:libvlc.so.5. Did VLC not get installed at all or did you mean some specific subpackage? At least this should pull in vlc-libs.
Same here, I installed postmarketOS plasma-mobile v24.12 on oneplus-enchilada, installed kasts and it would crash after showing the splashscreen for a few seconds. Thanks to @tiol11 I installed vlc, and kasts works now.