[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [a-devel] AGNULA/DeMuDi 1.1.1 and 2.6.x kernel



Paul Brossier <piem-lists@altern.org> writes:

> oops, was not much verbose indeed. thanks for the debuild option
> Junichi. it should be better now, but seems like you knew it
> already Jack. the segfault occurs when calling pthread_cancel in
> jackd/engine.c:

Yes, your traceback looks just like the problem I mentioned...

>         /* JOQ: We need to cancel the watchdog thread and wait for it
>          * to terminate.  For some reason, with the 2.6 kernel this
>          * causes a segfault in pthread_cancel().  I don't know why,
>          * but 2.4 works OK.
>          */
>         VERBOSE (engine, "stopping watchdog thread\n");
>         pthread_cancel (engine->watchdog_thread);
>         pthread_join (engine->watchdog_thread, NULL);

The LD_ASSUME_KERNEL workaround fixes this for me.

> looking on the web, it seems Tilmann found a workaround for a
> similar problem occuring on transcode:

 http://jackit.sourceforge.net/docs/faq.php#a53 

> 2003-11-26 Tilmann Bitterberg <transcode at tibit.org>
> 
> -    // cancel the thread
> -    if (thread) {
> :      pthread_cancel(thread);
> -#ifdef BROKEN_PTHREADS // Used to be MacOSX specific; kernel 2.6 as well?
> -      pthread_cond_signal(&buffer_fill_cv);
> -#endif
> -      pthread_join(thread, &status);
> -      thread = (pthread_t)0;
> -    }

Is there also a pthread_cond_wait() somewhere in that cancelled thread?

> the debug again, with jack-audio-connection-kit recompiled : 

Thanks for doing all this work.  I'm pretty sure you're seeing the
same pthread_cancel() problem I did.  

I'll investigate your suggested fix further.  Defining an environment
variable as a workaround is *very* inconvenient.  

There are several threading problems in JACK we're working on right
now, mostly related to problems or incompatibilties with 2.6 kernels
or NPTL.  Some are bugs in JACK, that never showed up before.  There
will probably be a small, interim JACK release soon to distribute
these fixes and a few other things.
-- 
  joq



Reply to: