[LAD] PHASEX-0.10.2

Nedko Arnaudov nedko at arnaudov.name
Wed May 23 11:20:54 UTC 2007


William Weston <sysex.net at sysex.net> writes:

>> The patch does not help. I beleive the AFAIK the jack_shutdown_handler()
>> is called only when jackd is being shut down, not during jack client
>> shutdown. I added printf in the function and it does not show during
>> phasex shutdown. It appeared however when I tried to stop jackd while
>> phasex was running (and there were some other strange messagest too):
>> 
>> # phasex 
>> JACK tmpdir identified as [/tmp]
>> cannot read server event (Success)
>> cannot complete execution of the processing graph (Resource temporarily unavailable)
>> zombified - calling shutdown handler
>> jack_shutdown_handler() called.
>
> Finally figured what's going on here.  It turns out that the engine
> thread will shut down cleanly, even if currently blocked on the
> pthread_cond_wait() after the jack thread goes away.  The segfault
> is being caused by the jack_shutdown_handler() being called from a
> thread other than the jack thread, thus calling jack_deactivate()
> and jack_client_close() from the wrong thread.  Try this one:
>
> --- phasex-0.10.2/src/jack.c	2007-05-22 15:38:29.000000000 -0700
> +++ phasex/src/jack.c	2007-05-22 15:38:50.000000000 -0700
> @@ -231,11 +231,6 @@
>   *****************************************************************************/
>  void 
>  jack_shutdown_handler(void *arg) {
> -    if (client != NULL) {
> -	jack_deactivate(client);
> -	jack_client_close(client);
> -	client = NULL;
> -    }
>      phasex_shutdown("JACK shut down client.\n");
>  }
>  
>
> The phasex_shutdown() function already handles a clean shutdown of
> phasex's jack thread (and the jack_deactivate() and
> jack_client_close() calls are already made in the normal thread
> cleanup handler), so this appears to be the best way to handle it.
>
> Let me know if it still gives you any troubles.

[start jackd]

[start phasex]

JACK tmpdir identified as [/tmp]

[stop phasex]

Thank you for using PHASEX!
(C) 1999-2007 William Weston <weston at sysex.net>
Released under the GNU Public License, Ver. 2
Segmentation fault

[start phasex]

JACK tmpdir identified as [/tmp]

[stop jackd]

cannot read server event (Success)
cannot complete execution of the processing graph (Resource temporarily unavailable)
zombified - calling shutdown handler
jack_shutdown_handler() called.
JACK shut down client.
Thank you for using PHASEX!
(C) 1999-2007 William Weston <weston at sysex.net>
Released under the GNU Public License, Ver. 2
Segmentation fault

As I already noted jack_shutdown_handler() is not called on phasex stop
at all.

-- 
Nedko Arnaudov <GnuPG KeyID: DE1716B0>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20070523/3e98e197/attachment.pgp>


More information about the Linux-audio-dev mailing list