mod-audio / mod-desktop

MOD Audio for the desktop
https://mod.audio/
GNU Affero General Public License v3.0
169 stars 9 forks source link

0.0.8 segfault in Ubuntu 23.10 #44

Closed protectorateindustrial closed 7 months ago

protectorateindustrial commented 9 months ago

Cant start 0.0.8 in ubuntu 23.10. It segfaults and gives an error message about qt threads.

protectorateindustrial commented 9 months ago
MOD Desktop DEBUG: jacklib syms 0x7f0d06644d40 (nil) | 65 | failed
QSocketNotifier: Can only be used with threads started with QThread
--------------------------------------------------------
libjack.so.0 loaded successfully!
Segmentation fault (core dumped)
falkTX commented 9 months ago

please try with the 0.0.8 debug build https://github.com/moddevices/mod-desktop/actions/runs/7805175163/artifacts/1225112876

and run the mod-desktop tool through gdb please, so we know why it crashed.

protectorateindustrial commented 9 months ago

and run the mod-desktop tool through gdb please,

how do I do this?

falkTX commented 9 months ago

extract tar, open terminal to where it is located, and do more or less:

# go to dir where the tar was extracted to
cd /path/to/mod-desktop-0.0.8-debug

# go to mod-desktop dir inside
cd mod-desktop

# start gdb
gdb ./mod-desktop

# press 'r' and enter to run
# press 'bt' once it crashes to get a backtrace
vvatelot commented 9 months ago

Same here. Here is the backtrace

❯ gdb ./mod-desktop
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 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 "x86_64-linux-gnu".
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 ./mod-desktop...
(gdb) r
Starting program: /home/vvatelot/Téléchargements/mod-desktop-0.0.8-linux-x86_64-debug/mod-desktop/mod-desktop 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
MOD Desktop DEBUG: jacklib syms 0x7ffff3bbbe30 (nil) | 65 | failed
[New Thread 0x7ffff253d640 (LWP 52381)]
[New Thread 0x7ffff0a40640 (LWP 52382)]
[New Thread 0x7fffebfff640 (LWP 52383)]
[New Thread 0x7fffeb7fe640 (LWP 52384)]
[New Thread 0x7fffeaffd640 (LWP 52402)]
[New Thread 0x7fffea7fc640 (LWP 52403)]
--------------------------------------------------------
libjack.so.0 loaded successfully!
[New Thread 0x7fffe9318640 (LWP 52405)]

Thread 1 "mod-desktop" received signal SIGSEGV, Segmentation fault.
0x0000555555689650 in ?? ()
(gdb) bt
#0  0x0000555555689650 in  ()
#1  0x00007fffe987dfab in  ()
#2  0x6320746f6e6e6143 in  ()
#3  0x74207463656e6e6f in  ()
#4  0x726576726573206f in  ()
#5  0x2074656b636f7320 in  ()
#6  0x6f4e203d20727265 in  ()
#7  0x6966206863757320 in  ()
#8  0x696420726f20656c in  ()
#9  0x0079726f74636572 in  ()
#10 0x0000001fffffff88 in  ()
#11 0x00000000000001e0 in  ()
#12 0x0000555555d71600 in  ()
#13 0x9b94403cd0aefbd8 in  ()
#14 0x000000000000002d in  ()
#15 0x0000000000000210 in  ()
#16 0x0000000000000007 in  ()
#17 0x000000370000001f in  ()
#18 0x0000000000000000 in  ()
(gdb) 

BTW, thank you for this software :heart:

protectorateindustrial commented 9 months ago

Heres the output of gdb:

GNU gdb (Ubuntu 14.0.50.20230907-0ubuntu1) 14.0.50.20230907-git
Copyright (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 "x86_64-linux-gnu".
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 ./mod-desktop...
(gdb) r
Starting program: /home/cpu/mod-desktop-0.0.8-linux-x86_64-debug/mod-desktop/mod-desktop 

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]                                   
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
MOD Desktop DEBUG: jacklib syms 0x7ffff5a55d40 (nil) | 65 | failed              
[New Thread 0x7ffff258e6c0 (LWP 3963)]                                          
QSocketNotifier: Can only be used with threads started with QThread
[New Thread 0x7ffff0bf26c0 (LWP 3965)]                                          
[New Thread 0x7fffebfff6c0 (LWP 3966)]
[New Thread 0x7fffeb7fe6c0 (LWP 3967)]
[New Thread 0x7fffeaffd6c0 (LWP 3968)]                                          
[New Thread 0x7fffea7fc6c0 (LWP 3969)]
[New Thread 0x7fffe9ef86c0 (LWP 3970)]                                          
[New Thread 0x7fffe96f76c0 (LWP 3971)]
--------------------------------------------------------                        
libjack.so.0 loaded successfully!                                               
[New Thread 0x7fffe89276c0 (LWP 3972)]

Thread 1 "mod-desktop" received signal SIGSEGV, Segmentation fault.
0x00005555556eebc0 in ?? ()
(gdb) bt
#0  0x00005555556eebc0 in ?? ()
#1  0x00007fffe8c02046 in jack_format_and_log(int, const char *, const char *, typedef __va_list_tag __va_list_tag *) (level=level@entry=2, 
    prefix=prefix@entry=0x0, 
    fmt=0x7fffe8c27da0 "Cannot callback the server in notification thread!", 
    ap=ap@entry=0x7fffffffcca0) at ../common/JackError.cpp:89
#2  0x00007fffe8c02197 in jack_error (fmt=<optimized out>)
    at ../common/JackError.cpp:96
#3  0x00007fffe8c07c7e in Jack::JackGenericClientChannel::ServerSyncCall (
    this=0x7fffe8530530, req=0x7fffffffce10, res=0x7fffffffcdb0, 
    result=0x7fffffffcef4) at ../common/JackGenericClientChannel.cpp:51
#4  0x00007fffe8c07df0 in Jack::JackGenericClientChannel::ClientCheck (
    this=0x7fffe8530530, name=<optimized out>, uuid=<optimized out>, 
    name_res=0x7fffffffcf70 "\240\354?\350\377\177", protocol=<optimized out>, 
    options=<optimized out>, status=0x7fffffffd100, result=0x7fffffffcef4, 
    open=1) at ../common/JackGenericClientChannel.cpp:104
#5  0x00007fffe8c222c8 in Jack::JackSocketClientChannel::Open (
    this=0x7fffe8530530, server_name=<optimized out>, 
    name=0x555555449b22 "MOD Desktop", uuid=0, 
    name_res=0x7fffffffcf70 "\240\354?\350\377\177", client=<optimized out>, 
    options=JackNoStartServer, status=0x7fffffffd100)
    at ../posix/JackSocketClientChannel.cpp:59
#6  0x00007fffe8c1f1f0 in Jack::JackLibClient::Open (this=0x7fffe8530280, 
    server_name=0x7fffe8c238b6 "default", name=0x555555449b22 "MOD Desktop", 
    uuid=0, options=JackNoStartServer, status=0x7fffffffd100)
    at ../common/JackLibClient.cpp:113
#7  0x00007fffe8c1fe49 in jack_client_open_aux (ap=0x7fffffffd030, 
    status=0x7fffffffd100, options=JackNoStartServer, 
    client_name=0x555555449b22 "MOD Desktop") at ../common/JackLibAPI.cpp:165
#8  jack_client_open (ext_client_name=0x555555449b22 "MOD Desktop", 
    options=JackNoStartServer, status=<optimized out>)
    at ../common/JackLibAPI.cpp:186
#9  0x0000555555429747 in jackbridge_client_open (
    client_name=0x555555449b22 "MOD Desktop", options=1, status=0x7fffffffd100)
    at src/hostapi/jack/JackBridge.c:536
#10 0x000055555542ab8a in PaJack_Initialize (hostApi=0x555555b22390, 
    hostApiIndex=0) at src/hostapi/jack/pa_jack.c:615
#11 0x000055555542809e in InitializeHostApis () at src/common/pa_front.c:226
#12 0x00005555554283dd in Pa_Initialize () at src/common/pa_front.c:374
#13 0x000055555541c127 in AppWindow::fillInDeviceList (this=0x7fffffffd9e0)
    at mod-desktop.hpp:500
#14 0x000055555541b12c in AppWindow::AppWindow (this=0x7fffffffd9e0)
    at mod-desktop.hpp:206
--Type <RET> for more, q to quit, c to continue without paging--c
#15 0x00005555554238c4 in main (argc=1, argv=0x7fffffffdf18) at main.cpp:26
falkTX commented 9 months ago

I found the culprit, kinda. seems on some old distros we cannot rely on dlmopen working correctly, which is used for opening libjack. we only need it for pipewire, we can use the old regular dlopen on systems without pipewire.

since pipewire systems are newer, I am going with the assumption that we can rely on the dlmopen working proper on such systems (which is already the case for 0.0.8 release).

so for 0.0.9 I will fallback to the old method of opening libjack in case of no pipewire detected. and hopefully that sorts out the crash.

release coming soon.

falkTX commented 9 months ago

ok 0.0.9 release is tagged, with new binaries.

the issue should be fixed, please confirm, thanks!

vvatelot commented 9 months ago

I confirm that it is working for me ! :slightly_smiling_face: Thank you very much ! :clap:

falkTX commented 7 months ago

was waiting for @protectorateindustrial to confirm, but someone else did so I am closing this and assuming to be really fixed