Control: reassign -1 zynaddsubfx-dssi 3.0.3-1 Control: affects -1 + audacity
Hello Tjeerd, > Thanks for coming back, I'm not in a hurry... > > The problem is that I can not trigger specific bugs (they seem to happen > somewhat random). So a made some more valgrinds: valgrind.dat Because the error des not manifest each run in the same location this might be thread related e.g. two threads are working on the same memory. > I had zynaddsubfx installed to try it out and see if I like it, but did > not uninstall after the tries (sufficient diskspace luxury). I could > uninstall zynadd, zynsaddsubfx and zynaddsubfx-dssi, the data package is > depended on by the lmms-common package. I tried to install some more lv2 plugins and bridges and after enabling all in audacity I got the shared library loaded libzynaddsubfx_dssi.so by just starting audacity - but still cannot reproduce a crash. (Details attached.) > And audacity runs without crashing (thanks for the hint) but still gives > a lot of debug output: audacity_debug.dat Most of the remaining output seems gui related - seems to be harmless. > So at least the the source of all evil is now clear... and the bug > "resolved". Do you have contact with the zynaddsubfx devs and file a bug > there? Devs amongst each other might talk clearer? Otherwise I'm happy > to do it. It might not be that clear - depending on e.g. libzynaddsubfx_dssi.so is intended to work multi threaded ... When I did run audacity in my test environment I get some "Possible data race" with valgrind's helgrind tool. At least it might be related to some plugins, either direct or via some bridges, therefore I hope it is ok to reassign. Bringing the issue upstream might also not be a bad idea. Kind regards, Bernhard
# Buster/stable amd64 qemu VM 2020-01-27 apt update apt dist-upgrade apt install systemd-coredump xserver-xorg sddm openbox xterm mc strace valgrind gdb audacity jackd2 lmms zynadd zynaddsubfx-dssi liblv2dynparamhost1-1 naspro-bridges audacity-dbgsym libstdc++6-8-dbg zynaddsubfx-dssi-dbgsym naspro-bridges-dbgsym libjack-jackd2-0-dbgsym libwxbase3.0-0v5-dbgsym libportaudio2-dbgsym libnabrit-dbg liblilv-0-0-dbgsym reboot # dpkg -l | grep -i -E "audacity|jack|zynaddsubfx|lmms" ii audacity 2.2.2-1+b1 amd64 fast, cross-platform audio editor ii audacity-data 2.2.2-1 all fast, cross-platform audio editor (data) ii audacity-dbgsym 2.2.2-1+b1 amd64 debug symbols for audacity ii jackd 5+nmu1 all JACK Audio Connection Kit (default server package) ii jackd2 1.9.12~dfsg-2 amd64 JACK Audio Connection Kit (server and example clients) ii jackd2-firewire 1.9.12~dfsg-2 amd64 JACK Audio Connection Kit (FFADO and FreeBoB backends) ii libjack-jackd2-0:amd64 1.9.12~dfsg-2 amd64 JACK Audio Connection Kit (libraries) ii libjack-jackd2-0-dbgsym:amd64 1.9.12~dfsg-2 amd64 debug symbols for libjack-jackd2-0 ii lmms 1.1.3-8.1 amd64 Linux Multimedia Studio ii lmms-common 1.1.3-8.1 all Linux Multimedia Studio - common files ii qjackctl 0.5.0-1 amd64 User interface for controlling the JACK sound server ii zynadd 1+git.20100609+dfsg0-4 amd64 ZynAddSubFX engines converted to LV2 plugin format ii zynaddsubfx 3.0.3-1 amd64 Realtime software synthesizer for Linux ii zynaddsubfx-data 3.0.3-1 all Realtime software synthesizer for Linux (data) ii zynaddsubfx-dssi 3.0.3-1 amd64 dssi plugin of zynaddsubfx ii zynaddsubfx-dssi-dbgsym 3.0.3-1 amd64 debug symbols for zynaddsubfx-dssi export LANG=C export DISPLAY=:0 qjackctl # Start audacity # Select all new plugins and enable # Close gdb -q set width 0 set pagination off set breakpoint pending on file /usr/bin/audacity break _ZN3zyn10MiddleWare4tickEv run break _ZN3zyn4Bank9addtobankEiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ cont break free cont generate /home/benutzer/core (gdb) bt #0 __GI___libc_free (mem=0x55555652b0c0) at malloc.c:3083 #1 0x00007fffe9511f3d in zyn::Bank::addtobank(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () from /usr/lib/dssi/libzynaddsubfx_dssi.so #2 0x00007fffe95138a1 in zyn::Bank::loadbank(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () from /usr/lib/dssi/libzynaddsubfx_dssi.so #3 0x00007fffe955b29c in ?? () from /usr/lib/dssi/libzynaddsubfx_dssi.so #4 0x00007fffe95fd0ea in rtosc::Ports::dispatch(char const*, rtosc::RtData&, bool) const () from /usr/lib/dssi/libzynaddsubfx_dssi.so #5 0x00007fffe955d959 in zyn::MiddleWareImpl::bToUhandle(char const*) () from /usr/lib/dssi/libzynaddsubfx_dssi.so #6 0x00007fffe955dcbf in zyn::MiddleWare::tick() () from /usr/lib/dssi/libzynaddsubfx_dssi.so #7 0x00007fffe950f3fd in ?? () from /usr/lib/dssi/libzynaddsubfx_dssi.so #8 0x00007ffff3a64b2f in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #9 0x00007ffff3b40fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486 #10 0x00007ffff37444cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 gdb -q /usr/bin/audacity --core /home/benutzer/core set width 0 set pagination off bt # Same as above but with debug symbols installed (gdb) bt #0 __GI___libc_free () at malloc.c:3083 #1 0x00007ffff3a3a265 in operator delete () at ../../../../src/libstdc++-v3/libsupc++/del_op.cc:49 #2 0x00007fffe9511f3d in __gnu_cxx::new_allocator<char>::deallocate () at /usr/include/c++/7/ext/new_allocator.h:125 #3 std::allocator_traits<std::allocator<char> >::deallocate () at /usr/include/c++/7/bits/alloc_traits.h:462 #4 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy () at /usr/include/c++/7/bits/basic_string.h:226 #5 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose () at /usr/include/c++/7/bits/basic_string.h:221 #6 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string () at /usr/include/c++/7/bits/basic_string.h:647 #7 zyn::Bank::addtobank () at ./src/Misc/Bank.cpp:530 #8 0x00007fffe95138a1 in zyn::Bank::loadbank () at ./src/Misc/Bank.cpp:267 #9 0x00007fffe955b29c in zyn::MiddleWareImpl::loadPendingBank () at ./src/Misc/MiddleWare.cpp:477 #10 zyn::<lambda(char const*, rtosc::RtData&)>::operator() () at ./src/Misc/MiddleWare.cpp:1557 #11 std::_Function_handler<void(char const*, rtosc::RtData&), zyn::<lambda(char const*, rtosc::RtData&)> >::_M_invoke(const std::_Any_data &, const char *&&, rtosc::RtData &) () at /usr/include/c++/7/bits/std_function.h:316 #12 0x00007fffe95fd0ea in std::function<void (char const*, rtosc::RtData&)>::operator()(char const*, rtosc::RtData&) const () at /usr/include/c++/7/bits/std_function.h:706 #13 rtosc::Ports::dispatch () at ./rtosc/src/cpp/ports.cpp:634 #14 0x00007fffe955d959 in zyn::MiddleWareImpl::bToUhandle () at ./src/Misc/MiddleWare.cpp:1905 #15 0x00007fffe955dcbf in zyn::MiddleWareImpl::tick () at ./src/Misc/MiddleWare.cpp:698 #16 zyn::MiddleWare::tick () at ./src/Misc/MiddleWare.cpp:2142 #17 0x00007fffe950f3fd in DSSIaudiooutput::<lambda()>::operator() () at ./src/Output/DSSIaudiooutput.cpp:635 #18 std::__invoke_impl<void, DSSIaudiooutput::DSSIaudiooutput(long unsigned int)::<lambda()> > () at /usr/include/c++/7/bits/invoke.h:60 #19 std::__invoke<DSSIaudiooutput::DSSIaudiooutput(long unsigned int)::<lambda()> > () at /usr/include/c++/7/bits/invoke.h:95 #20 std::thread::_Invoker<std::tuple<DSSIaudiooutput::DSSIaudiooutput(long unsigned int)::<lambda()> > >::_M_invoke<0> () at /usr/include/c++/7/thread:234 #21 std::thread::_Invoker<std::tuple<DSSIaudiooutput::DSSIaudiooutput(long unsigned int)::<lambda()> > >::operator() () at /usr/include/c++/7/thread:243 #22 std::thread::_State_impl<std::thread::_Invoker<std::tuple<DSSIaudiooutput::DSSIaudiooutput(long unsigned int)::<lambda()> > > >::_M_run(void) () at /usr/include/c++/7/thread:186 #23 0x00007ffff3a64b2f in std::execute_native_thread_routine () at ../../../../../src/libstdc++-v3/src/c++11/thread.cc:80 #24 0x00007ffff3b40fa3 in start_thread () at pthread_create.c:486 #25 0x00007ffff37444cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 https://sources.debian.org/src/zynaddsubfx/3.0.3-1/src/Misc/Bank.cpp/#L530 https://sources.debian.org/src/zynaddsubfx/3.0.3-1/src/Misc/Bank.cpp/#L267 ########## script -c "valgrind --tool=helgrind audacity --num-callers=100" -a helgrind_$(date +%Y-%m-%d_%H-%M-%S).txt grep bToUhandle -C100 helgrind_2020-01-27_15-08-02.txt | head -n200 ... ==5855== ---------------------------------------------------------------- ==5855== ==5855== Lock at 0x1274D6E0 was first observed ==5855== at 0x483DB1D: pthread_mutex_init (hg_intercepts.c:787) ==5855== by 0x5911729: wxMutexInternal::wxMutexInternal(wxMutexType) (threadpsx.cpp:243) ==5855== by 0x5911AF1: wxMutex::wxMutex(wxMutexType) (thrimpl.cpp:19) ==5855== by 0x5911F03: wxThreadModule::OnInit() (threadpsx.cpp:1775) ==5855== by 0x5878B25: Init (module.h:40) ==5855== by 0x5878B25: wxModule::DoInitializeModule(wxModule*, wxModuleList&) (module.cpp:131) ==5855== by 0x587A68B: wxModule::InitializeModules() (module.cpp:162) ==5855== by 0x585E2AD: DoCommonPostInit() (init.cpp:285) ==5855== by 0x585EB5D: wxEntryStart(int&, wchar_t**) (init.cpp:347) ==5855== by 0x585EC9C: wxInitialize(int, wchar_t**) (init.cpp:542) ==5855== by 0x585ECBA: wxInitializer (init.h:92) ==5855== by 0x585ECBA: wxEntry(int&, wchar_t**) (init.cpp:473) ==5855== by 0x4F31A1: main (AudacityApp.cpp:687) ==5855== Address 0x1274d6e0 is 0 bytes inside a block of size 56 alloc'd ==5855== at 0x4836E3F: operator new(unsigned long) (vg_replace_malloc.c:334) ==5855== by 0x5911AE3: wxMutex::wxMutex(wxMutexType) (thrimpl.cpp:19) ==5855== by 0x5911F03: wxThreadModule::OnInit() (threadpsx.cpp:1775) ==5855== by 0x5878B25: Init (module.h:40) ==5855== by 0x5878B25: wxModule::DoInitializeModule(wxModule*, wxModuleList&) (module.cpp:131) ==5855== by 0x587A68B: wxModule::InitializeModules() (module.cpp:162) ==5855== by 0x585E2AD: DoCommonPostInit() (init.cpp:285) ==5855== by 0x585EB5D: wxEntryStart(int&, wchar_t**) (init.cpp:347) ==5855== by 0x585EC9C: wxInitialize(int, wchar_t**) (init.cpp:542) ==5855== by 0x585ECBA: wxInitializer (init.h:92) ==5855== by 0x585ECBA: wxEntry(int&, wchar_t**) (init.cpp:473) ==5855== by 0x4F31A1: main (AudacityApp.cpp:687) ==5855== Block was alloc'd by thread #1 ==5855== ==5855== Possible data race during write of size 1 at 0x129DE2E8 by thread #2 ==5855== Locks held: none ==5855== at 0x8E07E19: assign (char_traits.h:287) ==5855== by 0x8E07E19: _M_set_length (basic_string.h:206) ==5855== by 0x8E07E19: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (basic_string.tcc:274) ==5855== by 0x137FF8A2: assign (basic_string.h:1347) ==5855== by 0x137FF8A2: operator= (basic_string.h:766) ==5855== by 0x137FF8A2: operator= (Bank.h:74) ==5855== by 0x137FF8A2: zyn::Bank::clearbank() (Bank.cpp:475) ==5855== by 0x1380157C: zyn::Bank::loadbank(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (Bank.cpp:216) ==5855== by 0x1384929B: loadPendingBank (MiddleWare.cpp:477) ==5855== by 0x1384929B: operator() (MiddleWare.cpp:1557) ==5855== by 0x1384929B: std::_Function_handler<void (char const*, rtosc::RtData&), zyn::{lambda(char const*, rtosc::RtData&)#57}>::_M_invoke(std::_Any_data const&, char const*&&, rtosc::RtData&) (std_function.h:316) ==5855== by 0x138EB0E9: operator() (std_function.h:706) ==5855== by 0x138EB0E9: rtosc::Ports::dispatch(char const*, rtosc::RtData&, bool) const (ports.cpp:634) ==5855== by 0x1384B958: zyn::MiddleWareImpl::bToUhandle(char const*) (MiddleWare.cpp:1905) ==5855== by 0x1384BCBE: tick (MiddleWare.cpp:698) ==5855== by 0x1384BCBE: zyn::MiddleWare::tick() (MiddleWare.cpp:2142) ==5855== by 0x137FD3FC: operator() (DSSIaudiooutput.cpp:635) ==5855== by 0x137FD3FC: __invoke_impl<void, DSSIaudiooutput::DSSIaudiooutput(long unsigned int)::<lambda()> > (invoke.h:60) ==5855== by 0x137FD3FC: __invoke<DSSIaudiooutput::DSSIaudiooutput(long unsigned int)::<lambda()> > (invoke.h:95) ==5855== by 0x137FD3FC: _M_invoke<0> (thread:234) ==5855== by 0x137FD3FC: operator() (thread:243) ==5855== by 0x137FD3FC: std::thread::_State_impl<std::thread::_Invoker<std::tuple<DSSIaudiooutput::DSSIaudiooutput(unsigned long)::{lambda()#1}> > >::_M_run() (thread:186) ==5855== by 0x8DA5B2E: execute_native_thread_routine (thread.cc:80) ==5855== by 0x483C8B6: mythread_wrapper (hg_intercepts.c:389) ==5855== by 0x8CC6FA2: start_thread (pthread_create.c:486) ==5855== by 0x91044CE: clone (clone.S:95) ==5855== ==5855== This conflicts with a previous write of size 1 by thread #1 ==5855== Locks held: 1, at address 0x1274D6E0 ==5855== at 0x8E07E19: assign (char_traits.h:287) ==5855== by 0x8E07E19: _M_set_length (basic_string.h:206) ==5855== by 0x8E07E19: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (basic_string.tcc:274) ==5855== by 0x137FF8A2: assign (basic_string.h:1347) ==5855== by 0x137FF8A2: operator= (basic_string.h:766) ==5855== by 0x137FF8A2: operator= (Bank.h:74) ==5855== by 0x137FF8A2: zyn::Bank::clearbank() (Bank.cpp:475) ==5855== by 0x1380157C: zyn::Bank::loadbank(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (Bank.cpp:216) ==5855== by 0x137FE460: DSSIaudiooutput::mapNextBank() (DSSIaudiooutput.cpp:689) ==5855== by 0x137FE7E7: DSSIaudiooutput::getProgram(unsigned long) (DSSIaudiooutput.cpp:335) ==5855== by 0x1319963C: plugin_load (plugin.c:252) ==5855== by 0x1319908E: pluglib_load (pluglib.c:49) ==5855== by 0x1339E5E4: nabrit_util_load_all_in_dir (util.c:113) ==5855== Address 0x129de2e8 is 4,360 bytes inside a block of size 25,704 alloc'd ==5855== at 0x4836E3F: operator new(unsigned long) (vg_replace_malloc.c:334) ==5855== by 0x1384FACF: zyn::MiddleWareImpl::MiddleWareImpl(zyn::MiddleWare*, zyn::SYNTH_T, zyn::Config*, int) (MiddleWare.cpp:1610) ==5855== by 0x13850199: zyn::MiddleWare::MiddleWare(zyn::SYNTH_T, zyn::Config*, int) (MiddleWare.cpp:2058) ==5855== by 0x137FE21E: DSSIaudiooutput::DSSIaudiooutput(unsigned long) (DSSIaudiooutput.cpp:631) ==5855== by 0x137FE316: DSSIaudiooutput::instantiate(_LADSPA_Descriptor const*, unsigned long) (DSSIaudiooutput.cpp:159) ==5855== by 0x13199617: plugin_load (plugin.c:247) ==5855== by 0x1319908E: pluglib_load (pluglib.c:49) ==5855== by 0x1339E5E4: nabrit_util_load_all_in_dir (util.c:113) ==5855== by 0x13198FC6: bridge_load_all (bridge.c:208) ==5855== by 0x7EA7307: lilv_world_load_dyn_manifest (world.c:537) ==5855== by 0x7EA7307: lilv_world_load_bundle (world.c:792) ==5855== by 0x7EA76E1: load_dir_entry (world.c:903) ==5855== by 0x7EA4DF5: lilv_dir_for_each (util.c:559) ==5855== Block was alloc'd by thread #1 ==5855== ==5855== ---------------------------------------------------------------- ...