[Jack2] JackPosixSemaphore::TimedWait crash

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jack2] JackPosixSemaphore::TimedWait crash

Gabriel M. Beddingfield-2

Some stretchplayer users experience an immediate disconnect
from Jack2 as soon as they hit the "File Open" button.  I
can't reproduce it, and I'm out of ideas on how to trace it.
I doubt it's a bug in Jack2... but I was hoping someone here
could lend some insight.

The error message is:

JackPosixSemaphore::TimedWait err = Unterbrechung während des Betriebssystemaufrufs
SuspendRefNum error
JackClient::Execute error name = StretchPlayer

The code where this happens is inside JackPosixSemaphore::TimedWait:

     if ((res = sem_timedwait(fSemaphore, &time)) != 0) {
         jack_error("JackPosixSemaphore::TimedWait err = %s", strerror(errno));
         jack_log("now %ld %ld ", now.tv_sec, now.tv_usec);
         jack_log("next %ld %ld ", time.tv_sec, time.tv_nsec/1000);
     }

Some digging finds that errno == EINTR, "The call was
interrupted by a signal handler"

Any idea what's happening here... or how to trace the
problem?  I've tried running jackd through gdb... but
haven't had a lot of luck catching signals.

Details:

    OS: squeeze and sidux, 32-bit
    Jack: Both are using squeeze's 1.9.5~dfsg-13, which
          traces to SVN 4008
    Hardware: x86 and AMD64, very fast, with gobs of
          memory.

-gabriel
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: [Jack2] JackPosixSemaphore::TimedWait crash

Fons Adriaensen-2
On Sun, Jun 13, 2010 at 01:04:05PM -0500, Gabriel M. Beddingfield wrote:

>
> The code where this happens is inside JackPosixSemaphore::TimedWait:
>
>     if ((res = sem_timedwait(fSemaphore, &time)) != 0) {
>         jack_error("JackPosixSemaphore::TimedWait err = %s", strerror(errno));
>         jack_log("now %ld %ld ", now.tv_sec, now.tv_usec);
>         jack_log("next %ld %ld ", time.tv_sec, time.tv_nsec/1000);
>     }
>
> Some digging finds that errno == EINTR, "The call was interrupted by
> a signal handler"

I'd say that is a bug in JackPosixSemaphore. A sem_timedwait()
(and many similar calls) can be interrupted by a signal that has
no relation at all to the event being waited for. The normal action
in that case is to restart the sem_timedwait().

Ciao,

--
FA

O tu, che porte, correndo si ?
E guerra e morte !
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: [Jack2] JackPosixSemaphore::TimedWait crash

Stéphane Letz

Le 13 juin 2010 à 21:54, [hidden email] a écrit :

> On Sun, Jun 13, 2010 at 01:04:05PM -0500, Gabriel M. Beddingfield wrote:
>>
>> The code where this happens is inside JackPosixSemaphore::TimedWait:
>>
>>    if ((res = sem_timedwait(fSemaphore, &time)) != 0) {
>>        jack_error("JackPosixSemaphore::TimedWait err = %s", strerror(errno));
>>        jack_log("now %ld %ld ", now.tv_sec, now.tv_usec);
>>        jack_log("next %ld %ld ", time.tv_sec, time.tv_nsec/1000);
>>    }
>>
>> Some digging finds that errno == EINTR, "The call was interrupted by
>> a signal handler"
>
> I'd say that is a bug in JackPosixSemaphore. A sem_timedwait()
> (and many similar calls) can be interrupted by a signal that has
> no relation at all to the event being waited for. The normal action
> in that case is to restart the sem_timedwait().
>
> Ciao,
>
Should be fixed in http://trac.jackaudio.org/changeset/4023

Can you test and report?

Thanks

Stéphane

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: [Jack2] JackPosixSemaphore::TimedWait crash

Dragan Noveski
Stéphane Letz wrote:

> Le 13 juin 2010 à 21:54, [hidden email] a écrit :
>
>  
>> On Sun, Jun 13, 2010 at 01:04:05PM -0500, Gabriel M. Beddingfield wrote:
>>    
>>> The code where this happens is inside JackPosixSemaphore::TimedWait:
>>>
>>>    if ((res = sem_timedwait(fSemaphore, &time)) != 0) {
>>>        jack_error("JackPosixSemaphore::TimedWait err = %s", strerror(errno));
>>>        jack_log("now %ld %ld ", now.tv_sec, now.tv_usec);
>>>        jack_log("next %ld %ld ", time.tv_sec, time.tv_nsec/1000);
>>>    }
>>>
>>> Some digging finds that errno == EINTR, "The call was interrupted by
>>> a signal handler"
>>>      
>> I'd say that is a bug in JackPosixSemaphore. A sem_timedwait()
>> (and many similar calls) can be interrupted by a signal that has
>> no relation at all to the event being waited for. The normal action
>> in that case is to restart the sem_timedwait().
>>
>> Ciao,
>>
>>    
> Should be fixed in http://trac.jackaudio.org/changeset/4023
>
> Can you test and report?
>
> Thanks
>
> Stéphane
>
>  
hallo,

i just installed jack2 from svn over the 'squeeze's 1.9.5~dfsg-13' one
from the repository and i can confirm that stretchplayer now works as
expected when pressing the 'open file' button.
it is still printing following lines in the console in the movement of
pressing the button:


JackPosixSemaphore::TimedWait err = Unterbrechung während des
Betriebssystemaufrufs
JackPosixSemaphore::TimedWait err = Unterbrechung während des
Betriebssystemaufrufs
JackPosixSemaphore::TimedWait err = Unterbrechung während des
Betriebssystemaufrufs
JackPosixSemaphore::TimedWait err = Unterbrechung während des
Betriebssystemaufrufs


....but this is not affecting the stretchplayer in any way i can see.

thanks again for your effort gabriel and stephane!

cheers,
doc

cheers,
doc
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: [Jack2] JackPosixSemaphore::TimedWait crash

Gabriel M. Beddingfield-2


On Mon, 14 Jun 2010, Dragan Noveski wrote:

>> Should be fixed in http://trac.jackaudio.org/changeset/4023
>>
>> Can you test and report?
>
> hallo,
>
> i just installed jack2 from svn over the 'squeeze's 1.9.5~dfsg-13' one from
> the repository and i can confirm that stretchplayer now works as expected
> when pressing the 'open file' button.
[snip]
>
> ....but this is not affecting the stretchplayer in any way i can see.
>
> thanks again for your effort gabriel and stephane!

woot!  Thanks Dragon for testing it so quickly!

Ivan: If you need, I can provide a debian-styled source
package to test.

Thanks,
Gabriel
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org