Stazed / rakarrack-plus

Rakarrack plus LV2s
GNU General Public License v2.0
36 stars 8 forks source link

Rakarrack-plus segfault with some presets when used with a RT kernel #51

Open ycollet opened 2 days ago

ycollet commented 2 days ago

I used rakarrack-plus 1.2.6 on Fedora 40. When I use rakarrack-plus on a standard kernel, everything works fine. When used on a RT kernel (standard kernel with "preempt=full nopti threadirqs" on the command line) rakarrack-plus segfault. I use the Noise Synth (Bank 1 / 55). Here is the stack trace:

[New Thread 0x7ffff5fd46c0 (LWP 4669)]
[Thread 0x7ffff5fd46c0 (LWP 4669) exited]
[New Thread 0x7ffff5fd46c0 (LWP 4670)]
[New Thread 0x7ffff57d36c0 (LWP 4671)]
[New Thread 0x7fffe1e916c0 (LWP 4673)]
*** buffer overflow detected ***: terminated

Thread 1 "rakarrack-plus" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) where
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff6ca86d3 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:78
#2  0x00007ffff6c4fc4e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff6c37902 in __GI_abort () at abort.c:79
#4  0x00007ffff6c38767 in __libc_message_impl (fmt=fmt@entry=0x7ffff6dc21a7 "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:132
#5  0x00007ffff6d36969 in __GI___fortify_fail (msg=msg@entry=0x7ffff6dc218e "buffer overflow detected") at fortify_fail.c:24
#6  0x00007ffff6d36304 in __GI___chk_fail () at chk_fail.c:28
#7  0x00007ffff6c93d50 in __vsprintf_internal (string=string@entry=0x7fffffd5cb70 "1069.82%", maxlen=maxlen@entry=8, format=<optimized out>, args=args@entry=0x7fffffd5ca80, 
    mode_flags=mode_flags@entry=6) at iovsprintf.c:67
#8  0x00007ffff6d37baf in ___sprintf_chk (s=s@entry=0x7fffffd5cb70 "1069.82%", flag=flag@entry=2, slen=slen@entry=8, format=format@entry=0x55555599f0f1 "%5.2f%%") at sprintf_chk.c:40
#9  0x00005555558a3873 in sprintf (__s=0x7fffffd5cb70 "1069.82%", __fmt=0x55555599f0f1 "%5.2f%%") at /usr/include/bits/stdio2.h:30
#10 RKRGUI::GuiTimeout (this=0x555556c73530) at /usr/src/debug/rakarrack-plus-1.2.6-2.fc40.x86_64/src/UI/rkrprocess_gui.cxx:328
#11 0x00007ffff7ea546c in Fl::wait (time_to_wait=time_to_wait@entry=1e+20) at /usr/src/debug/fltk-1.3.8-9.fc40.x86_64/src/Fl.cxx:595
#12 0x00007ffff7ea5659 in Fl::wait () at /usr/src/debug/fltk-1.3.8-9.fc40.x86_64/src/Fl.cxx:672
#13 Fl::wait () at /usr/src/debug/fltk-1.3.8-9.fc40.x86_64/src/Fl.cxx:670
#14 0x0000555555853a1a in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/rakarrack-plus-1.2.6-2.fc40.x86_64/src/main.C:445

This issue occurs when the load is quite high and some xruns are generated.

Stazed commented 2 days ago

Try the wip branch, should be fixed now for this case. Thanks for the report!

ycollet commented 1 day ago

Thanks a lot for this kick fix ! I will check today.