Re: [LAU] jackd terminates on its own

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [LAU] jackd terminates on its own

Kjetil Matheussen-2
(cc to the jack-devel mailing list)

 
jonetsu:

> When using the latest Bitwig and loading several projects, enabling
> audio for each one, playing it for a few seconds then loading another
> one, playing it, so on so forth, jackd will steadily terminate, like
> this:
>
> Jack: JackPosixProcessSync::TimedWait time out = 116080
> Jack: JackPosixProcessSync::TimedWait finished delta = 3668.0
> Jack: JackEngine::ClientExternalClose ref = 2
> Jack: JackEngine::ClientCloseAux ref = 2
> Jack: JackEngine::ReleaseRefnum server quit
> Unknown error...
> terminate called after throwing an instance of
> 'Jack::JackTemporaryException' what():


Hi, I just took a glance at the source code of jack2,
and when you get this message:

  "Jack: JackEngine::ClientExternalClose ref = 2"

...and you don't see any message about "Kill", it's the client
that has called jack_close(). So it seems like BitWig has called
jack_close() manually. However, the rest of the messages
indicates that something is wrong somewhere.




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

Re: [LAU] jackd terminates on its own

Kjetil Matheussen-2
(Removed linux-audio-user, only on jack-devel mailing list now)


On Sun, Jun 25, 2017 at 2:20 PM, Kjetil Matheussen <[hidden email]> wrote:
Hi, I just took a glance at the source code of jack2,
and when you get this message:

  "Jack: JackEngine::ClientExternalClose ref = 2"

...and you don't see any message about "Kill", it's the client
that has called jack_close(). So it seems like BitWig has called
jack_close() manually. However, the rest of the messages
indicates that something is wrong somewhere.


jackdmp ends up in this code right after closing the client.

"
            // Last client and temporay case: quit the server
            jack_log("JackEngine::ReleaseRefnum server quit");
            fEngineControl->fTemporary = false;
            throw JackTemporaryException();
"

I don't know what "temporary case" mean...

Does it mean that jackd was started automatically by the client?
(I guess not since "-v" was added explicitly by jonetsu.)

Anyone?



(Sorry for replying to myself, an unrelated compilation task took longer than planned, so I had time to look more into this)


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

Re: [LAU] jackd terminates on its own

Kjetil Matheussen-2


On Sun, Jun 25, 2017 at 5:25 PM, jonetsu <[hidden email]> wrote:
On Sun, 25 Jun 2017 14:34:05 +0200
Kjetil Matheussen <[hidden email]> wrote:

> Does it mean that jackd was started automatically by the client?
> (I guess not since "-v" was added explicitly by jonetsu.)

If jackd is not running then Bitwig 2.1.1 will start it.  Does this
interfere in some way when jackd is already running ?


Not sure. There is something called "Temporary mode" which is enabled
with the option "-T". I can't find documentation about what it does, but
if you start jackd without the "-T" option, we should see a different
output in the terminal.

My _guess_ is that temporary mode automatically shuts down the
jack server when the last client exits, and that this behavior doesn't
work well with bitwig since it opens and closes several clients
during its lifetime.


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

Re: [LAU] jackd terminates on its own

Kjetil Matheussen-2


On Sun, Jun 25, 2017 at 5:40 PM, Kjetil Matheussen <[hidden email]> wrote:


On Sun, Jun 25, 2017 at 5:25 PM, jonetsu <[hidden email]> wrote:
On Sun, 25 Jun 2017 14:34:05 +0200
Kjetil Matheussen <[hidden email]> wrote:

> Does it mean that jackd was started automatically by the client?
> (I guess not since "-v" was added explicitly by jonetsu.)

If jackd is not running then Bitwig 2.1.1 will start it.  Does this
interfere in some way when jackd is already running ?


Not sure. There is something called "Temporary mode" which is enabled
with the option "-T". I can't find documentation about what it does, but
if you start jackd without the "-T" option, we should see a different
output in the terminal.


Oh, right, the man page:

       -T, --temporary
             Exit once all clients have closed their connections.


In my opinion, we should remove the code that automatically starts the jack
server from a client. It's just messy.


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

Re: [LAU] jackd terminates on its own

Kjetil Matheussen-2
(Just forwarding the reply to list now. Sorry if there's html in this mail, it seems
like gnome terminal has started to copy fonts/colors/as well when copying to the clipboard
(why?). Hope this doesn't manifest itself as html in the email.)



On Sun, 25 Jun 2017 17:43:33 +0200
Kjetil Matheussen <[hidden email]> wrote:

(I haven't subscribed to the list yet, so I'm also sending to your
address just in case)

> In my opinion, we should remove the code that automatically starts
> the jack server from a client. It's just messy.

I removed the -T switch.

The current calling is:

/usr/bin/jackd -v --sync -P80 -ndefault -dalsa -dhw:M1010LT -r44100
-p256 -n8

The behaviour without the -T switch has indeed changed although the
problem remains as described.  At one point in loading projects Bitwig
will not be able to enable audio.  Here's the change in behaviour.

These few lines from jackd were taken when Bitwig cannot enable audio.


[...]
Jack: JackRequest::UnRegisterPort
Jack: JackEngine::PortUnRegister ref = 2 port_index = 39
Jack: JackEngine::PortDisconnect ref = -1 src = 39 dst = 65535
Jack: JackGraphManager::DisconnectAllOutput port_index = 39
Jack: JackConnectionManager::RemoveOutputPort ref = 2 port_index = 39
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 9
Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 10
Jack: JackRequest::UnRegisterPort
Jack: JackEngine::PortUnRegister ref = 2 port_index = 40
Jack: JackEngine::PortDisconnect ref = -1 src = 40 dst = 65535
Jack: JackGraphManager::DisconnectAllOutput port_index = 40
Jack: JackConnectionManager::RemoveOutputPort ref = 2 port_index = 40
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 9
Jack: JackRequest::Notification
Jack: JackDriver::ClientNotify ref = 1 driver = freewheel name =
freewheel notify = 18 Jack: JackDriver::ClientNotify ref = 1 driver =
freewheel name = freewheel notify = 18 Jack: JackDriver::ClientNotify
ref = 1 driver = freewheel name = freewheel notify = 18 Jack:
JackDriver::ClientNotify ref = 1 driver = freewheel name = freewheel
notify = 18 Jack: JackEngine::ClientNotify: no callback for
notification = 4 Jack: JackEngine::ClientNotify: no callback for
notification = 4 Jack: JackEngine::ClientNotify: no callback for
notification = 4 Jack: JackSocketServerChannel::Execute : fPollTable i
= 2 fd = 10 Jack: JackSocketServerChannel::Execute : fPollTable i = 1
fd = 9 Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd =
10 Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 9
Jack: JackSocketServerChannel::Execute : fPollTable i = 2 fd = 10 Jack:
JackSocketServerChannel::Execute : fPollTable i = 1 fd = 9 Jack:
JackSocketServerChannel::Execute : fPollTable i = 2 fd = 10 Jack:
JackSocketServerChannel::Execute : fPollTable i = 1 fd = 9 Jack:
JackSocketServerChannel::Execute : fPollTable i = 2 fd = 10 Jack:
JackSocketServerChannel::Execute : fPollTable i = 1 fd = 9 Jack:
JackSocketServerChannel::Execute : fPollTable i = 2 fd = 10

It loops endlessly with the last two lines during which time the
audio is not enabled in the newly loaded Bitwig project.  The
loop frequency is slow, perhaps each 5 seconds.

Curiously, after closing Bitwig jackd will continue looping with
the last line below.

Jack: JackDriver::ClientNotify ref = 2 driver = sys



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

Re: [LAU] jackd terminates on its own

Thomas Brand
In reply to this post by Kjetil Matheussen-2
On Sun, June 25, 2017 17:43, Kjetil Matheussen wrote:
>
> In my opinion, we should remove the code that automatically starts the
> jack server from a client. It's just messy.

Same opinion here, this is probably the source for many problems.
Fortunately the clients can opt-out to autostart 'default' JACK if none is
running, that could be the default behavior. However changing established
defaults is hard (i think).


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