Re: [LAD] PHASEX-0.10.2

From: Nedko Arnaudov <nedko@email-addr-hidden>
Date: Wed May 23 2007 - 14:20:54 EEST

William Weston <sysex.net@email-addr-hidden> 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@email-addr-hidden>
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@email-addr-hidden>
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>

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev

Received on Wed May 23 16:15:02 2007

This archive was generated by hypermail 2.1.8 : Wed May 23 2007 - 16:15:05 EEST