[LAU] Segfault using zita-j2a

Jannis Achstetter jannis_achstetter at web.de
Thu Oct 25 17:37:24 UTC 2012


Am 25.10.2012 17:51, schrieb Fons Adriaensen:
> On Thu, Oct 25, 2012 at 05:23:28PM +0200, Robin Gareus wrote:
> 
>> Classic race condition. The jack_client is activated before the
>> resampler is initialized.
>>
>> zita-j2a.cc:200 creates the jack-client and calls jack_activate.
>> process_callbacks can arrive starting now.
>>
>> but not until zita-j2a.cc:211 calls J->start() the data-structures
>> required to do the processing are initialized.
>>
>> Easiest solution is probably to check if start() has been called in the
>> process callback:
> 
> The code to do that is already present: jackclient:cc line 311.
> There must be some other problem.

In my last mail I forgot: zresample works perfectly fine on the files
and with the rates I tried. Output sounds okay, too. However, I don't
know if that uses the same code-paths as the ajbridge.

I tried zita-a2j (the other way round) and the result is about the same:
kripton at miramis ~/audio/zita-resampler-1.2.0/libs $ gdb zita-a2j
GNU gdb (Gentoo 7.5 p1) 7.5
Copyright (C) 2012 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-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/zita-a2j...done.
(gdb) r -d hw:UA101 -v
Starting program: /usr/bin/zita-a2j -d hw:UA101 -v
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
playback : not enabled
capture  :
  nchan  : 12
  fsamp  : 48000
  fsize  : 256
  nfrag  : 2
  format : S32_LE
[New Thread 0x7ffff7f9f700 (LWP 6173)]
[New Thread 0x7ffff7f1e700 (LWP 6174)]
[New Thread 0x7ffff7e9d700 (LWP 6175)]
[New Thread 0x7ffff7fcc700 (LWP 6176)]
Starting synchronisation.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7e9d700 (LWP 6175)]
0x00007ffff7bd8760 in VResampler::process (this=0x626680) at
vresampler.cc:217
217                             _c2 [i] = a * q2 [i] + b * q2 [i - hl];
(gdb) bt
#0  0x00007ffff7bd8760 in VResampler::process (this=0x626680) at
vresampler.cc:217
#1  0x0000000000403a21 in Jackclient::capture (this=0x6263b0,
nframes=256) at jackclient.cc:245
#2  0x00000000004043a5 in Jackclient::jack_process (this=0x6263b0,
nframes=256) at jackclient.cc:470
#3  0x00007ffff779c61a in ?? () from /usr/lib64/libjack.so.0
#4  0x00007ffff77af760 in ?? () from /usr/lib64/libjack.so.0
#5  0x00007ffff7575ec6 in start_thread () from /lib64/libpthread.so.0
#6  0x00007ffff6aa08ad in clone () from /lib64/libc.so.6

	Jannis


More information about the Linux-audio-user mailing list