[Jack-Devel] Jack server keeps playing sound after client disconnetcs

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

Re: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

Ralf Mardorf
On Fri, 25 Aug 2017 09:07:38 -0700, Yuri wrote:
>Latency positively has nothing to do with this problem.

Hi,

playing out the buffer was just a careful thought, since it wasn't
clear that it is an endless buzz.

Repeating my own comments, I don't experience this issue with jack 2,
but if everything is ok, then I stop first playing an audio signal and
after that I do not use Ctrl+C to quit the application/s, Instead I'm
using a regular option provided by the application/s to quit. If
something should go wrong, then I kill everything, including jack 2.

I don't know why you want to interrupt a client playing an audio
signal using Ctrl+C, if everything is ok. If you do this, since
something else already went wrong, then I don't understand, why you
don't want to kill jackd.

Even if jackd should need the improvement you requested, consider to do
such things in a logical order, as you would do when using expensive
hardware in an audio studio. You wouldn't pull on a cable, to unplug a
jack, then stop playing your instrument and after that turn of the amp.
You would first stop playing, then turn of the amp and after that hold
the plug to disconnect it. If something should go wrong, you would use
the emergency stop switch to stop everything, you don't want that the
emergency stop switch let the mixing console turned on.

Regards,
Ralf
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

yuri@rawbw.com
On 08/25/17 10:10, Ralf Mardorf wrote:


> Repeating my own comments, I don't experience this issue with jack 2,
I use jack1.
Jack2 is linux- and MacOS-only as it currently is, because it doesn't
build on POSIX systems without platform-specific code.


> I don't know why you want to interrupt a client playing an audio
> signal using Ctrl+C, if everything is ok. If you do this, since
> something else already went wrong, then I don't understand, why you
> don't want to kill jackd.

Because I am not in a production environment. I experiment, and need to
stop looped scripts.


> Even if jackd should need the improvement you requested, consider to do
> such things in a logical order, as you would do when using expensive
> hardware in an audio studio. You wouldn't pull on a cable, to unplug a

This is a major problem with Jack, because clients can crash or be
killed and this likely renders jack server unusable.


Yuri
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

David Kastrup
In reply to this post by Ralf Mardorf
Ralf Mardorf <[hidden email]> writes:

> I don't know why you want to interrupt a client playing an audio
> signal using Ctrl+C, if everything is ok. If you do this, since
> something else already went wrong, then I don't understand, why you
> don't want to kill jackd.

It doesn't matter.  There is no point in Jackd being dependent on other
applications' behavior for sensible behavior of its own, most
particularly not on particular procedures for their termination.  Unless
they have explicitly set up actions to be taken after their termination
(connecting Jack ports may count among that set: it might be an idea to
require applications to mark its connections explicitly if it wants them
to stay around after finishing, like jack_connect obviously would),
Jackd should just revert to a "virgin" state when they terminate.

> Even if jackd should need the improvement you requested, consider to
> do such things in a logical order, as you would do when using
> expensive hardware in an audio studio. You wouldn't pull on a cable,
> to unplug a jack, then stop playing your instrument and after that
> turn of the amp.  You would first stop playing, then turn of the amp
> and after that hold the plug to disconnect it.

You know: mixers that start with a _huuuuuge_ switch-on bump blowing out
the bass speakers and waking all the neighbors are badly designed.  Yes,
one can work even with badly designed equipment, but there is no real
necessity of making Jack badly designed for educational purposes.

> If something should go wrong, you would use the emergency stop switch
> to stop everything,

A "killall" is an emergency switch.  You'll still get that bass bump if
your mixer sucks.

> you don't want that the emergency stop switch let the mixing console
> turned on.

The power supplies give out in order of their buffering capacities even
when the emergency switch is wired to everything at once.

--
David Kastrup
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

Ralf Mardorf
On Fri, 25 Aug 2017 10:24:43 -0700, Yuri wrote:
>Because I am not in a production environment. I experiment, and need
>to stop looped scripts.

Consider that if jackd would include all kinds of protection measures,
the risk of false positives could increase. For experimental circuits
you would use a fast acting fuse, but for the finished circuit you
would use the slow blow fuse. Jackd is a sound server aimed for
pro-audio usage, not for desktop sound, not for experimental usage, at
least not by using default settings. For experimental usage you should
be willing to kill jackd.

>> Even if jackd should need the improvement you requested, consider to
>> do such things in a logical order, as you would do when using
>> expensive hardware in an audio studio. You wouldn't pull on a cable,
>> to unplug a  
>
>This is a major problem with Jack, because clients can crash or be
>killed and this likely renders jack server unusable.

A stable environment for professional usage should be a stable
environment. The premiss that you still could continue a gig, if the
virtual B-3 crashes, as long as the virtual Rhodes continues working, is
a wrong premiss. Nothing should ever crash, if it should, it's an
accident, an exceptional situation. Apps that tend to crash on a
regular basis aren't usable for pro-audio. Again, if jackd could be
improved to fit to your needs, without side-effects for what jackd is
intended to do, it's good. But what you describe isn't a major problem
of jackd. Most users don't experience it.

On Fri, 25 Aug 2017 19:41:00 +0200, David Kastrup wrote:
>It doesn't matter.  There is no point in Jackd being dependent on other
>applications' behavior for sensible behavior of its own, most
>particularly not on particular procedures for their termination.
>Unless they have explicitly set up actions to be taken after their
>termination (connecting Jack ports may count among that set: it might
>be an idea to require applications to mark its connections explicitly
>if it wants them to stay around after finishing, like jack_connect
>obviously would), Jackd should just revert to a "virgin" state when
>they terminate.

You are assuming absolutely clear situations and in my experiences
jackd does the right thing regarding the described issue, if nothing is
fishy. As soon as something is fishy, it's not that easy to decide what
is the right thing.

>You know: mixers that start with a _huuuuuge_ switch-on bump blowing
>out the bass speakers and waking all the neighbors are badly
>designed.  Yes, one can work even with badly designed equipment, but
>there is no real necessity of making Jack badly designed for
>educational purposes.

A a careful audio engineer would always use a sane order to turn on
equipment, even if the equipment should provide all kinds of protection
measures.

Regards,
Ralf
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

yuri@rawbw.com
On 08/25/17 12:26, Ralf Mardorf wrote:
> Consider that if jackd would include all kinds of protection measures,
> the risk of false positives could increase. For experimental circuits
> you would use a fast acting fuse, but for the finished circuit you
> would use the slow blow fuse. Jackd is a sound server aimed for
> pro-audio usage, not for desktop sound, not for experimental usage, at
> least not by using default settings. For experimental usage you should
> be willing to kill jackd.


Are you a musician?


Yuri

_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

Chris Caudle
In reply to this post by yuri@rawbw.com
On Fri, August 25, 2017 12:24 pm, Yuri wrote:
> This is a major problem with Jack, because clients can crash or be
> killed and this likely renders jack server unusable.

When the supercollider script is killed, does jackd still show a
connection to that port?  In other words if you run jack_lsp or look in
the qjackctl patch bay, does that still show a connection?

Does your distribution have the jack_zombie tool built and installed?

--
Chris Caudle


_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

yuri@rawbw.com
On 08/25/17 12:36, Chris Caudle wrote:
> When the supercollider script is killed, does jackd still show a
> connection to that port?  In other words if you run jack_lsp or look in
> the qjackctl patch bay, does that still show a connection?
>
> Does your distribution have the jack_zombie tool built and installed?


No, the connection in Jack disappears.


Yuri

_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

Ralf Mardorf
In reply to this post by yuri@rawbw.com
On Fri, 2017-08-25 at 12:29 -0700, Yuri wrote:
> Are you a musician?

I'm a musician and jackd user and as much likely most users, I don't
experience what you describe as "a major problem with Jack".

I don't claim that there are no issues and perhaps somebody could fix
the issue you experience, I only tried to encourage you to target that
the issue not necessarily most be related to a weakness of jackd, there
might be other sources of error.

Troubleshooting instead of guessing and opinions might be more promising
;).
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

yuri@rawbw.com
On 08/25/17 12:42, Ralf Mardorf wrote:
> I'm a musician and jackd user and as much likely most users, I don't
> experience what you describe as "a major problem with Jack".


Here you are very wrong, because this *is* a major usability problem in
Jack.

If I regularly encounter the problem, this is a major problem.


Yuri

_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

David Kastrup
In reply to this post by Ralf Mardorf
Ralf Mardorf <[hidden email]> writes:

> On Fri, 25 Aug 2017 10:24:43 -0700, Yuri wrote:
>>Because I am not in a production environment. I experiment, and need
>>to stop looped scripts.
>
> Consider that if jackd would include all kinds of protection measures,
> the risk of false positives could increase.

Client death is not "all kind of protection measures".  It is a
completely basic condition that needs to be recognized and dealt with
sensibly.

Now "client hangs in unkillable state due to a driver giving out" is the
kind of condition that is hard to detect reliably and cater for.  I
don't expect Jackd to go out of its depth to detect this condition
specifically.  But it falls under the general "client stopped talking to
me" category that Jackd needs to be able to deal with even if it has to
consider "but it might start talking again eventually".

But "client died" is something that should confuse Jackd only under most
exceptional circumstances.

>>You know: mixers that start with a _huuuuuge_ switch-on bump blowing
>>out the bass speakers and waking all the neighbors are badly designed.
>>Yes, one can work even with badly designed equipment, but there is no
>>real necessity of making Jack badly designed for educational purposes.
>
> A a careful audio engineer would always use a sane order to turn on
> equipment, even if the equipment should provide all kinds of
> protection measures.

So you insist that Jackd should be badly designed with regard to client
death, as a disciplinary measure?

I think our time is better spent improving Jackd rather than improving
Yuri.  Because improving Jackd will help a lot of users while improving
Yuri will only help a single one.

--
David Kastrup
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

yuri@rawbw.com
On 08/25/17 12:48, David Kastrup wrote:
> So you insist that Jackd should be badly designed with regard to client
> death, as a disciplinary measure?
>
> I think our time is better spent improving Jackd rather than improving
> Yuri.  Because improving Jackd will help a lot of users while improving
> Yuri will only help a single one.


A rational opinion in the sea of laymanship and blathering.


Yuri

_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

Ralf Mardorf
On Fri, 25 Aug 2017 12:58:18 -0700, Yuri wrote:
>A rational opinion in the sea of laymanship and blathering.

Consider to be more rational. Chris offers help:

On Fri, 25 Aug 2017 14:36:09 -0500, Chris Caudle wrote:
>Does your distribution have the jack_zombie tool built and installed?
                                 ^^^^^^^^^^^^^^^^
                                 ^^^^^^^^^^^^^^^^

;)
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

Malik Costet
In reply to this post by Ralf Mardorf
On 2017-08-25 21:42, Ralf Mardorf wrote:

> I'm a musician and jackd user and as much likely most users, I don't
> experience what you describe as "a major problem with Jack".
>
> I don't claim that there are no issues and perhaps somebody could fix
> the issue you experience, I only tried to encourage you to target that
> the issue not necessarily most be related to a weakness of jackd, there
> might be other sources of error.
>
> Troubleshooting instead of guessing and opinions might be more promising
> ;).

Well, I'm no musician. I'm a software engineer. And while I definitely
don't want to drag this into ad hominem territory, allow me to outline
what is perhaps a difference in approach.

For a software engineer, when a problem is encountered, the focus is
*not* an troubleshooting and making things work again. The focus is on
understanding the problem as comprehensively as possible. Only then,
when you have as clear a picture as you can, or are willing to, get, do
you weigh costs and benefits.
Just because a software isn't perfect doesn't mean it's to blame. Almost
always, software isn't perfect, and can be improved. Whether it can or
should be improved is another matter; sometimes -- indeed, always, if
you just crank the scope up enough -- it's not "worth" putting the
energy into the software to make it handle a certain situation. But
sometimes it is. For purely subjective values of "worth", of course.

The point is that first comes understanding, and only then decision on
whether to change or adapt. Troubleshooting and jury-rigging is easy.
Putting in effort so that you don't have to jury-rig, is art.

M.
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

John Rigg-16
In reply to this post by yuri@rawbw.com
On Fri, Aug 25, 2017 at 12:29:10PM -0700, Yuri wrote:

> On 08/25/17 12:26, Ralf Mardorf wrote:
>> Consider that if jackd would include all kinds of protection measures,
>> the risk of false positives could increase. For experimental circuits
>> you would use a fast acting fuse, but for the finished circuit you
>> would use the slow blow fuse. Jackd is a sound server aimed for
>> pro-audio usage, not for desktop sound, not for experimental usage, at
>> least not by using default settings. For experimental usage you should
>> be willing to kill jackd.
>
>
> Are you a musician?
>
>
> Yuri

Ralf is well known on these lists for derailing threads like this.
(I only know he is participating here due to quotes in other posts.
I set procmail to send Ralf's emails to /dev/null years ago).

John
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

John Rigg-16
In reply to this post by yuri@rawbw.com
On 08/25/17 10:10, Ralf Mardorf wrote:
> Repeating my own comments, I don't experience this issue with jack 2

Possibly OT, but I have experienced similar behaviour with jack2.

John
_______________________________________________
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: ?==?utf-8?q? Jack server keeps playing sound after client disconnetcs

Ralf Mardorf
On Sat, 26 Aug 2017 10:33:42 +0000, John Rigg wrote:
>On 08/25/17 10:10, Ralf Mardorf wrote:
>> Repeating my own comments, I don't experience this issue with jack
>> 2  
>
>Possibly OT, but I have experienced similar behaviour with jack2.

OT, since the OP is using jack1, but still important.

Hi John,

if I would know a jack2 bug or a seriously missing feature affecting
other users, too (excepted of issues where I know the community doesn't
share my point of view), I open a new issue at
https://github.com/jackaudio/jack2/issues . Neither among the 94 open,
nor within the 80 closed issues seems to be one related to the issue of
this thread.

Regards,
Ralf
_______________________________________________
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: Jack server keeps playing sound after client disconnetcs

Thomas Brand
On Sat, August 26, 2017 16:20, Ralf Mardorf wrote:

> On Sat, 26 Aug 2017 10:33:42 +0000, John Rigg wrote:
>
>> On 08/25/17 10:10, Ralf Mardorf wrote:
>>
>>> Repeating my own comments, I don't experience this issue with jack
>>> 2
>>>
>>
>> Possibly OT, but I have experienced similar behaviour with jack2.
>>
>

Hi, i'm sure i missed a lot of this discussion but i wondered if there can
be a single jack client c file that can trigger the issue. Such a client
will allow the specialists to accurately trace the problem with their
tools. I'm sure this will get (more) attention, and if the issue is
understood the chances it gets fixed are good.
Best regards
Tom

_______________________________________________
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: Jack server keeps playing sound after client disconnetcs

Fons Adriaensen-3
On Mon, Aug 28, 2017 at 06:02:26PM +0200, Thomas Brand wrote:

> On Sat, August 26, 2017 16:20, Ralf Mardorf wrote:
> > On Sat, 26 Aug 2017 10:33:42 +0000, John Rigg wrote:
> >
> >> On 08/25/17 10:10, Ralf Mardorf wrote:
> >>
> >>> Repeating my own comments, I don't experience this issue with jack
> >>> 2
> >>>
> >>
> >> Possibly OT, but I have experienced similar behaviour with jack2.
> >>
> >
>
> Hi, i'm sure i missed a lot of this discussion but i wondered if there can
> be a single jack client c file that can trigger the issue. Such a client
> will allow the specialists to accurately trace the problem with their
> tools. I'm sure this will get (more) attention, and if the issue is
> understood the chances it gets fixed are good.

I'm using ALSA's jack plugin to route sound from a web browser
to Jack. This works OK, but when using the back arrow in the
browser (i.e. terminating the web page that provided the sound)
the last buffer will be repeated for a time apparently equal
to Jack's timeout. The client that terminates in a not so
clean way in this case is ALSA's Jack plugin. This is easy
to reproduce.


Ciao,

--
FA

A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)

_______________________________________________
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: Jack server keeps playing sound after client disconnetcs

Thomas Brand
On Mon, August 28, 2017 20:40, Fons Adriaensen wrote:

> On Mon, Aug 28, 2017 at 06:02:26PM +0200, Thomas Brand wrote:
>
>> On Sat, August 26, 2017 16:20, Ralf Mardorf wrote:
>>
>>> On Sat, 26 Aug 2017 10:33:42 +0000, John Rigg wrote:
>>>
>>>
>>>> On 08/25/17 10:10, Ralf Mardorf wrote:
>>>>
>>>>
>>>>> Repeating my own comments, I don't experience this issue with
>>>>> jack 2
>>>>>
>>>>>
>>>>
>>>> Possibly OT, but I have experienced similar behaviour with jack2.
>>>>
>>>>
>>>
>>
>> Hi, i'm sure i missed a lot of this discussion but i wondered if there
>> can be a single jack client c file that can trigger the issue. Such a
>> client will allow the specialists to accurately trace the problem with
>> their tools. I'm sure this will get (more) attention, and if the issue
>> is understood the chances it gets fixed are good.
>
> I'm using ALSA's jack plugin to route sound from a web browser
> to Jack. This works OK, but when using the back arrow in the browser (i.e.
> terminating the web page that provided the sound) the last buffer will be
> repeated for a time apparently equal to Jack's timeout. The client that
> terminates in a not so clean way in this case is ALSA's Jack plugin. This
> is easy to reproduce.
>

If a client would catch Ctrl+C it can fill the buffers zero and this would
be a non-issue?
Cheers
Tom


_______________________________________________
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: Jack server keeps playing sound after client disconnetcs

yuri@rawbw.com
On 08/28/17 14:32, Thomas Brand wrote:
> If a client would catch Ctrl+C it can fill the buffers zero and this would
> be a non-issue?


No, it will still be an issue in a general case. because one can't
guarantee behavior of arbitrary clients. One also can't guarantee that
clients can't crash.


Yuri

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