Re: [Jack-Devel] Jack shutdown action

PrevNext  Index
DateSat, 17 Mar 2012 19:08:55 -0400
From Paul Davis <[hidden] at linuxaudiosystems dot com>
ToFons Adriaensen <[hidden] at linuxaudio dot org>
CcJack Developers <[hidden] at lists dot jackaudio dot org>
In-Reply-ToFons Adriaensen Re: [Jack-Devel] Jack shutdown action
Follow-UpFons Adriaensen Re: [Jack-Devel] Jack shutdown action
On Sat, Mar 17, 2012 at 5:32 PM, Fons Adriaensen <[hidden]> wrote:
> On Sat, Mar 17, 2012 at 05:15:16PM -0400, Paul Davis wrote:
>
>> all other exits from within libjack are via pthread_exit() which
>> should not take down a process. running inside gdb() with a breakpoint
>> at _exit and then a backtrace may prove revealing.
>
> Indeed:
>
> jack_client_thread zombified - exiting from JACK
>
> Program received signal SIGPIPE, Broken pipe.

SIGPIPE is delivered to a process when it tries to do I/O on a
socket/FIFO that has been closed.

the code path here is:

-------------------------------------------------------------------------------------------------
static void
jack_client_thread_suicide (jack_client_t* client, const char* reason)
{
#ifdef JACK_USE_MACH_THREADS
        client->rt_thread_ok = FALSE;
#endif

	if (client->on_info_shutdown) {
		jack_error ("%s - calling shutdown handler", reason);
		client->on_info_shutdown (JackClientZombie, reason,
client->on_info_shutdown_arg);
	} else if (client->on_shutdown) {
		jack_error ("%s - calling shutdown handler", reason);
		client->on_shutdown (client->on_shutdown_arg);
	} else {
		jack_error ("jack_client_thread: %s - exiting from JACK", reason);
		jack_client_close_aux (client);
		/* Need a fix : possibly make client crash if
		 * zombified without shutdown handler
		 */
	}

	pthread_exit (0);
	/*NOTREACHED*/
}

---------------------------------------------------------------------------------------

note the call to pthread_exit(). this does not cause an exit from the
process, just the end of this thread.

i don't recall any specific changes to this area. the SIGPIPE has been
received since time began - its not something sent by the server or
some other part of JACK.
PrevNext  Index

1332025744.23494_0.ltw:2,a <CAFa_cKk2FcO_rEJO44nAsqdZjftXdLgO-ji+6jNs6Df7Pqg0YQ at mail dot gmail dot com>