LS cvs + debian lenny + jack 0.116.1 = segfault

You're new to the LinuxSampler world? You don't know where to start and nothing works? Here's the place to ask for help.
dakylla
User
Posts: 51
Joined: Wed Jan 14, 2009 11:08 am

LS cvs + debian lenny + jack 0.116.1 = segfault

Post by dakylla » Wed Jan 14, 2009 11:21 am

hi,

it's been several days i try to get LS cvs + debian lenny + jack 0.116.1 to work together.
when using alsa, everything is fine, but wehn creating a jack audio device, LS just segfault with no errors whatsoever.
i did compile with debug (level 10). still no errors, nothing related to the jack device creation crash.

does someone here know of any workaround ?
if you want more details (logs,...) just ask :)

Andreas
Developer
Posts: 214
Joined: Sun Feb 03, 2008 8:33 am

Re: LS cvs + debian lenny + jack 0.116.1 = segfault

Post by Andreas » Sat Jan 17, 2009 9:34 am

Do you get a core dump file? If you don't, you can try to run "ulimit -c unlimited" first.

If you have a core file, run gdb <path to linuxsampler binary> <core file>, and then enter bt.

dakylla
User
Posts: 51
Joined: Wed Jan 14, 2009 11:08 am

bt's output

Post by dakylla » Mon Jan 19, 2009 3:45 am

hi, thx for the tip, here's bt's output


#0 0xb7abe728 in jack_activate () from /usr/local/lib/libjack.so.0
#1 0xb7f51865 in JackClient (this=0x9123e68, Name=
{static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb78775e8 "\034\004\020\t$r���v\207��v\207��v\207�\ra���v\207�xv\020\t�v\207�\220�̷\001"}})
at AudioOutputDeviceJack.cpp:320
#2 0xb7f52ca4 in LinuxSampler::JackClient::CreateAudio (Name=
{static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb78776b4 "\034\004\020\t\v`��$r��8M\022\t�v\207�\030w\207�-���8M\022\t�v\207��v\207�$r��p\200\020\t$r��\030w\207�T���8\035\020\tp\201\020\t"}}) at AudioOutputDeviceJack.cpp:344
#3 0xb7f5610d in AudioOutputDeviceJack (this=0x9124d38, Parameters=
{_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, LinuxSampler::DeviceCreationParameter*> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, LinuxSampler::DeviceCreationParameter*> > >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = 3079108344, _M_parent = 0xb7fc7224, _M_left = 0x9108070, _M_right = 0xb7fc7224}, _M_node_count = 3079108376}}}) at AudioOutputDeviceJack.cpp:181
#4 0xb7f3fd2d in LinuxSampler::AudioOutputDeviceFactory::InnerFactoryTemplate<LinuxSampler::AudioOutputDeviceJack>::Create (
this=0x90f0768, Parameters=
{_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, LinuxSampler::DeviceCreationParameter*> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, LinuxSampler::DeviceCreationParameter*> > >> = {<No data fi---Type <return> to continue, or q <return> to quit---
elds>}, <No data fields>}, _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = 3079108532, _M_parent = 0xb7cca160, _M_left = 0xb7cca198, _M_right = 0x20}, _M_node_count = 3079108560}}})
at AudioOutputDeviceFactory.h:51
#5 0xb7f3f137 in LinuxSampler::AudioOutputDeviceFactory::Create (DriverName=
{static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb78778a4 "�\005\020\t�\005\020\t$r��4y\207��x\207�Hy\207��j��\220\025\017\t4y\207��x\207�$r��\020y\207��F��\020I�����������\017���F��"}}, Parameters=
{_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = 3079108736, _M_parent = 0xb7daf43f, _M_left = 0xffffffff, _M_right = 0xb7ff0ff4}, _M_node_count = 3085124900}}}) at AudioOutputDeviceFactory.cpp:103
#6 0xb7e799cb in LinuxSampler::Sampler::CreateAudioOutputDevice (this=0x90f1590, AudioDriver=
{static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb7877934 "�\005\020\t\034!\017\t$r����\207���\207���\207�=z����\207�\220\026\017\t��\207�\f�\207�$�\207�"}}, Parameters=
{_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, st---Type <return> to continue, or q <return> to quit---
d::char_traits<char>, std::allocator<char> > > > >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = 3086774820, _M_parent = 0xb7877910, _M_left = 0xb7e346c4, _M_right = 0xb7fd4910}, _M_node_count = 3085428665}}}) at Sampler.cpp:543
#7 0xb7ed6af5 in LinuxSampler::LSCPServer::CreateAudioOutputDevice (this=0x90f1690, Driver=
{static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb787adf0 "�\005\020\t"}}, Parameters=
{_M_t = {_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = 3079121700, _M_parent = 0x0, _M_left = 0x0, _M_right = 0x0}, _M_node_count = 0}}}) at lscpserver.cpp:818
#8 0xb7ea7a3d in yyparse (yyparse_param=0x90f211c) at lscp.y:344
#9 0xb7ed3561 in LinuxSampler::LSCPServer::Main (this=0x90f1690) at lscpserver.cpp:570
#10 0xb7f7b94e in __pthread_launcher (thread=0x90f1690) at Thread.cpp:388
#11 0xb7cd34c0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#12 0xb7c526de in clone () from /lib/i686/cmov/libc.so.6

dakylla
User
Posts: 51
Joined: Wed Jan 14, 2009 11:08 am

Re: LS cvs + debian lenny + jack 0.116.1 = segfault

Post by dakylla » Mon Jan 19, 2009 10:29 pm

i installed jack 0.109 from the debian repositories and everything is working fine, so there is definitely a problem with jack 1.116.1 and linuxsampler

songshop
Newbie
Posts: 27
Joined: Thu Jan 24, 2008 2:28 am
Location: Lower Templestowe, Victoria. Australia
Contact:

Re: LS cvs + debian lenny + jack 0.116.1 = segfault

Post by songshop » Tue Jan 20, 2009 11:22 am

i second this. bug 115.
on Arch linux, 2.6.25.4-rt5,jack0.116.1-svn, LS, Jsampler,Qsampler et al all cvs

g.

Andreas
Developer
Posts: 214
Joined: Sun Feb 03, 2008 8:33 am

Re: LS cvs + debian lenny + jack 0.116.1 = segfault

Post by Andreas » Wed Jan 21, 2009 10:25 pm

Unfourtunately the stack trace didn't tell me much. Some of the values in the c++ structs look strange, but after some tests I think that it's just gdb that is confused.

Do you have valgrind installed? Can you try to linuxsampler in it (just "valgrind linuxsampler" should be enough).

dakylla
User
Posts: 51
Joined: Wed Jan 14, 2009 11:08 am

Re: LS cvs + debian lenny + jack 0.116.1 = segfault

Post by dakylla » Fri Jan 23, 2009 11:11 am

hi,

unfortunately, i uninstalled jack 0.116.1 (to have LS working). I'll reinstall it soon to help debugging LS+jack0.116.1, or maybe someone else can help if they still have LS+jack0.116.1 segfaulting ?
once reinstalled, I'll tell you guys

dakylla
User
Posts: 51
Joined: Wed Jan 14, 2009 11:08 am

Re: LS cvs + debian lenny + jack 0.116.1 = segfault

Post by dakylla » Wed Feb 04, 2009 4:04 am

hi, im back with my LS+ jack 0.116.1 errors :)
i recompiled LS and jackd on an other machine (ubuntu 8.10 instead of debian) and here's the valging output, i hope it will help :


LinuxSampler initialization completed. :-)

LSCPServer: Client connection established on socket:4.
LSCPServer: Client connection established on socket:5.
--19009-- REDIR: 0x4536d90 (strcpy) redirected to 0x4026490 (strcpy)
--19009-- REDIR: 0x4536bb0 (index) redirected to 0x4026170 (index)
--19009-- REDIR: 0x4533c80 (realloc) redirected to 0x4025d80 (realloc)
--19009-- REDIR: 0x4536d20 (strcmp) redirected to 0x4026730 (strcmp)
--19009-- REDIR: 0x4539650 (rawmemchr) redirected to 0x4027450 (rawmemchr)
--19009-- REDIR: 0x4536a00 (strcat) redirected to 0x4026200 (strcat)
--19009-- REDIR: 0x45374b0 (strncmp) redirected to 0x40266a0 (strncmp)
--19009-- Reading syms from /usr/lib/alsa-lib/libasound_module_conf_pulse.so (0x41D9000)
--19009-- Reading debug info from /usr/lib/alsa-lib/libasound_module_conf_pulse.so...
--19009-- ... CRC mismatch (computed 2052c007 wanted b1ce9a03)
--19009-- object doesn't have a symbol table
--19009-- Reading syms from /usr/lib/libpulse.so.0.4.1 (0x4AB4000)
--19009-- Reading debug info from /usr/lib/libpulse.so.0.4.1...
--19009-- ... CRC mismatch (computed 321a6eb6 wanted 234c760d)
--19009-- object doesn't have a symbol table
--19009-- Reading syms from /usr/lib/libSM.so.6.0.0 (0x41DC000)
--19009-- Reading debug info from /usr/lib/libSM.so.6.0.0...
--19009-- ... CRC mismatch (computed 8af05547 wanted 366be93b)
--19009-- object doesn't have a symbol table
--19009-- Reading syms from /usr/lib/libICE.so.6.3.0 (0x4B04000)
--19009-- Reading debug info from /usr/lib/libICE.so.6.3.0...
--19009-- ... CRC mismatch (computed 64e8278a wanted 55dd049d)
--19009-- object doesn't have a symbol table
--19009-- Reading syms from /usr/lib/libX11.so.6.2.0 (0x4B1C000)
--19009-- Reading debug info from /usr/lib/libX11.so.6.2.0...
--19009-- ... CRC mismatch (computed bef163bd wanted 55780a10)
--19009-- object doesn't have a symbol table
--19009-- Reading syms from /lib/libcap.so.1.10 (0x41E5000)
--19009-- Reading debug info from /lib/libcap.so.1.10...
--19009-- ... CRC mismatch (computed e44a5008 wanted 83ee6697)
--19009-- object doesn't have a symbol table
--19009-- Reading syms from /usr/lib/libxcb-xlib.so.0.0.0 (0x4C0B000)
--19009-- Reading debug info from /usr/lib/libxcb-xlib.so.0.0.0...
--19009-- ... CRC mismatch (computed 80e6042e wanted f7fde2bd)
--19009-- object doesn't have a symbol table
--19009-- Reading syms from /usr/lib/libxcb.so.1.0.0 (0x4C0E000)
--19009-- Reading debug info from /usr/lib/libxcb.so.1.0.0...
--19009-- ... CRC mismatch (computed 7f2f73cb wanted 887aca04)
--19009-- object doesn't have a symbol table
--19009-- Reading syms from /usr/lib/libXau.so.6.0.0 (0x4C27000)
--19009-- Reading debug info from /usr/lib/libXau.so.6.0.0...
--19009-- ... CRC mismatch (computed 35ad968f wanted 479ee57d)
--19009-- object doesn't have a symbol table
--19009-- Reading syms from /usr/lib/libXdmcp.so.6.0.0 (0x4C2A000)
--19009-- Reading debug info from /usr/lib/libXdmcp.so.6.0.0...
--19009-- ... CRC mismatch (computed 7892784a wanted 1c340519)
--19009-- object doesn't have a symbol table
--19009-- REDIR: 0x45b7900 (__strcpy_chk) redirected to 0x40279f0 (__strcpy_chk)
--19009-- REDIR: 0x4538600 (memset) redirected to 0x4027340 (memset)
--19009-- REDIR: 0x45375c0 (strncpy) redirected to 0x4026560 (strncpy)
--19009-- REDIR: 0x4538100 (memchr) redirected to 0x4026850 (memchr)
--19009-- Discarding syms at 0x41D9000-0x41DC000 in /usr/lib/alsa-lib/libasound_module_conf_pulse.so due to munmap()
--19009-- Discarding syms at 0x4AB4000-0x4B04000 in /usr/lib/libpulse.so.0.4.1 due to munmap()
--19009-- Discarding syms at 0x41DC000-0x41E5000 in /usr/lib/libSM.so.6.0.0 due to munmap()
--19009-- Discarding syms at 0x4B04000-0x4B1C000 in /usr/lib/libICE.so.6.3.0 due to munmap()
--19009-- Discarding syms at 0x4B1C000-0x4C0B000 in /usr/lib/libX11.so.6.2.0 due to munmap()
--19009-- Discarding syms at 0x41E5000-0x41E9000 in /lib/libcap.so.1.10 due to munmap()
--19009-- Discarding syms at 0x4C0B000-0x4C0E000 in /usr/lib/libxcb-xlib.so.0.0.0 due to munmap()
--19009-- Discarding syms at 0x4C0E000-0x4C27000 in /usr/lib/libxcb.so.1.0.0 due to munmap()
--19009-- Discarding syms at 0x4C27000-0x4C2A000 in /usr/lib/libXau.so.6.0.0 due to munmap()
--19009-- Discarding syms at 0x4C2A000-0x4C2F000 in /usr/lib/libXdmcp.so.6.0.0 due to munmap()
--19009-- REDIR: 0x44560f0 (operator delete[](void*)) redirected to 0x40240f0 (operator delete[](void*))
Thread: WARNING, can't assign realtime scheduling to thread!
Thread: WARNING, can't mlockall() memory!
==19009==
==19009== Process terminating with default action of signal 11 (SIGSEGV)
==19009== Bad permissions for mapped region at address 0x4A20FCC
==19009== at 0x4295D74: jack_activate (client.c:1937)
==19009== by 0x4159CF4: LinuxSampler::JackClient::JackClient(std::string) (AudioOutputDeviceJack.cpp:320)
==19009== by 0x415B133: LinuxSampler::JackClient::CreateAudio(std::string) (AudioOutputDeviceJack.cpp:344)
==19009== by 0x415E59C: LinuxSampler::AudioOutputDeviceJack::AudioOutputDeviceJack(std::map<std::string, LinuxSampler::DeviceCreationParameter*, std::less<std::string>, std::allocator<std::pair<std::string const, LinuxSampler::DeviceCreationParameter*> > >) (AudioOutputDeviceJack.cpp:181)
==19009== by 0x4147B9C: LinuxSampler::AudioOutputDeviceFactory::InnerFactoryTemplate<LinuxSampler::AudioOutputDeviceJack>::Create(std::map<std::string, LinuxSampler::DeviceCreationParameter*, std::less<std::string>, std::allocator<std::pair<std::string const, LinuxSampler::DeviceCreationParameter*> > >) (AudioOutputDeviceFactory.h:51)
==19009== by 0x4146FA6: LinuxSampler::AudioOutputDeviceFactory::Create(std::string, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >) (AudioOutputDeviceFactory.cpp:118)
==19009== by 0x4083C6A: LinuxSampler::Sampler::CreateAudioOutputDevice(std::string, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >) (Sampler.cpp:543)
==19009== by 0x40BFCCC: LinuxSampler::LSCPServer::CreateAudioOutputDevice(std::string, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >) (lscpserver.cpp:818)
==19009== by 0x40B0FE6: yyparse(void*) (lscp.y:344)
==19009== by 0x40C9089: LinuxSampler::LSCPServer::Main() (lscpserver.cpp:570)
==19009== by 0x4183CBD: _ZN12LinuxSamplerL18__pthread_launcherEPv (Thread.cpp:388)
==19009== by 0x437B50E: start_thread (in /lib/tls/i686/cmov/libpthread-2.8.90.so)
==19009==
==19009== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 98 from 2)
--19009--
--19009-- supp: 85 dl-hack3-cond-1
--19009-- supp: 13 dl-hack5-32bit-addr-1
==19009== malloc/free: in use at exit: 78,380 bytes in 1,915 blocks.
==19009== malloc/free: 28,422 allocs, 26,507 frees, 1,450,025 bytes allocated.
==19009==
==19009== searching for pointers to 1,915 not-freed blocks.
==19009== checked 9,229,920 bytes.
==19009==
==19009== LEAK SUMMARY:
==19009== definitely lost: 1,321 bytes in 98 blocks.
==19009== possibly lost: 34,814 bytes in 662 blocks.
==19009== still reachable: 42,245 bytes in 1,155 blocks.
==19009== suppressed: 0 bytes in 0 blocks.
==19009== Rerun with --leak-check=full to see details of leaked memory.
--19009-- memcheck: sanity checks: 78 cheap, 5 expensive
--19009-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--19009-- memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10
--19009-- memcheck: auxmaps_L2: 0 searches, 0 nodes
--19009-- memcheck: SMs: n_issued = 77 (1232k, 1M)
--19009-- memcheck: SMs: n_deissued = 5 (80k, 0M)
--19009-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M)
--19009-- memcheck: SMs: max_undefined = 6 (96k, 0M)
--19009-- memcheck: SMs: max_defined = 383 (6128k, 5M)
--19009-- memcheck: SMs: max_non_DSM = 72 (1152k, 1M)
--19009-- memcheck: max sec V bit nodes: 1 (0k, 0M)
--19009-- memcheck: set_sec_vbits8 calls: 2 (new: 1, updates: 1)
--19009-- memcheck: max shadow mem size: 1456k, 1M
--19009-- translate: fast SP updates identified: 26,542 ( 88.1%)
--19009-- translate: generic_known SP updates identified: 2,511 ( 8.3%)
--19009-- translate: generic_unknown SP updates identified: 1,074 ( 3.5%)
--19009-- tt/tc: 94,027 tt lookups requiring 111,328 probes
--19009-- tt/tc: 94,027 fast-cache updates, 12 flushes
--19009-- transtab: new 20,821 (484,679 -> 6,829,075; ratio 140:10) [0 scs]
--19009-- transtab: dumped 0 (0 -> ??)
--19009-- transtab: discarded 2,614 (51,904 -> ??)
--19009-- scheduler: 8,023,328 jumps (bb entries).
--19009-- scheduler: 78/139,546 major/minor sched events.
--19009-- sanity: 79 cheap, 5 expensive checks.
--19009-- exectx: 6,151 lists, 4,694 contexts (avg 0 per list)
--19009-- exectx: 55,027 searches, 58,401 full compares (1,061 per 1000)
--19009-- exectx: 0 cmp2, 374 cmp4, 0 cmpAll
--19009-- errormgr: 19 supplist searches, 184 comparisons during search
--19009-- errormgr: 98 errlist searches, 462 comparisons during search
Killed



if you need more information just ask ;)

Andreas
Developer
Posts: 214
Joined: Sun Feb 03, 2008 8:33 am

Re: LS cvs + debian lenny + jack 0.116.1 = segfault

Post by Andreas » Sun Feb 08, 2009 10:27 am

Weird, valgrind doesn't seem to catch the error.

Maybe you can try this small program that does the same jack function calls as LS does before it crashes. You should compile it with similar flags as the linuxsampler makefile is using when it compiles AudioOutputDeviceJack.cpp.

#include <cstdio>
#include <jack/jack.h>
int jacktest_process(jack_nframes_t nframes, void* arg) {
return 0;
}
void jacktest_shutdown(void* arg) {
fprintf(stderr, "Jack: Jack server shutdown, exiting.\n");
}
int main() {
jack_client_t* client = jack_client_open("jacktest", JackNullOption, 0);
jack_set_process_callback(client, jacktest_process, 0);
jack_on_shutdown(client, jacktest_shutdown, 0);
printf("jack_activate=>%d\n", jack_activate(client));
}

/Andreas

dakylla
User
Posts: 51
Joined: Wed Jan 14, 2009 11:08 am

Re: LS cvs + debian lenny + jack 0.116.1 = segfault

Post by dakylla » Mon Feb 09, 2009 5:00 pm

hi man,

i'll try this tonight

Post Reply