[Jack-Devel] Jack thread cancellation

PrevNext  Index
DateFri, 03 May 2013 17:11:16 +0200
From MONTANARO Luciano (MM) <[hidden] at magnetimarelli dot com>
To"[hidden] at lists dot jackaudio dot org" <[hidden] at lists dot jackaudio dot org>
Follow-UpPaul Davis Re: [Jack-Devel] Jack thread cancellation
Follow-UpStéphane Letz Re: [Jack-Devel] Jack thread cancellation
Hi list,

I have an embedded application that makes use of jack (Version 1.9.8).
I have started seeing crashes from the clients in the JackError() call.

The stack trace shows that the thread executing (Which is handling the
JackSocketChannel::Execute call) receives is being killed
(sigcancel_handler is called) and since the thread is in
CANCEL_ASYNCHRONOUS mode, it crashes since an unsafe function is
called (vnsprintf).

The client I am using is actually unaware of using Jack at all, it is
using the alsa jack plugin, and it opens/closes the alsa devices many
times during its lifetime.

Now, I have a few doubts:
- Why are threads created with cancellation type PTHREAD_CANCEL_ASYNCHRONOUS?
  Is this because the realtime threads need this or is there some other reason?
- Would it be possible to mark the threads used by the JackMessageBuffer and
  JackSocketClientChannel as PTHREAD_CANCEL_DELAYED instead?
- Why is fThread.Kill() used in JackSocketClientChannel::Stop instead of fThread.Stop()?
  The latter should still work, and allow the Execute() to terminate it communication
  with the server.

Thanks in advance,
Luciano
--
Luciano Montanaro
EntryNAV - Audio Software Integrator
Magneti Marelli Electronic Systems
Viale Carlo Emanuele II 150, Venaria Reale (To)
Tel. (+39) 011 6879765





VISITA IL NOSTRO NUOVO SITO WEB! - VISIT OUR NEW WEB SITE!   www.magnetimarelli.com

Confidential Notice: This message - including its attachments - may contain proprietary, confidential and/or legally protected information and is intended solely for the use of the designated addressee(s) above. If you are not the intended recipient be aware that any downloading, copying, disclosure, distribution or use of the contents of the above information is strictly prohibited.
If you have received this communication by mistake, please forward the message back to the sender at the email address above, delete the message from all mailboxes and any other electronic storage medium and destroy all copies.
Disclaimer Notice: Internet communications cannot be guaranteed to be safe or error-free. Therefore we do not assure that this message is complete or accurate and we do not accept liability for any errors or omissions in the contents of this message.
PrevNext  Index

1367593890.1594_0.ltw:2,a <67BA5DEFFBE7BF46B4C53F7E5FC5AD4423A192049F at MXCL13 dot fgremc dot it>