Closing/exiting Qtractor hangs sometimes

Forums

I use non-mixer-xt to host several reverb plugins. This distributes the realtime load with genuine jack2 to several CPU cores.
And I started to use external hardware, e.g. compressors.

I use audio Insert Sends to connect to non-mixer-xt and external hardware.

With complex sessions I noticed a strange behaviour that I cannot reproduce in a simple test session yet:

  • Closing (close button of main window) or exiting (File->Exit) hangs sometimes.
  • Other running jack-clients like non-mixer-xt or Qjackctl are also hanging and cannot be closed/exited
  • I can kill Qtractor with the session manager or a kill command, then the other jack-clients end

It seems to help when I deactivate those Insert Sends before closing Qtractor, especially those that go to external hardware and back.

Would it be a good idea if Qtractor was deactivating all Insert Sends before disconnecting from jackd and exiting?
At least it cannot hurt, I guess.

Permalink

It seems to help when I deactivate those Insert Sends before closing Qtractor, especially those that go to external hardware and back.

Would it be a good idea if Qtractor was deactivating all Insert Sends before disconnecting from jackd and exiting?
At least it cannot hurt, I guess.

what is the current setting to Track > Auto Deactivate ? does it help if it's on or off ?

Permalink

I had one issue without Auto Deactivate and no issue so far with Auto Deactivate. I'll leave Auto Deactivate on and see what happens.

Permalink

Too bad, after lots of successful tests Qtractor hung again, although it's much less often after the patch.

Do you deactivate the pseudo plugins, too? Especially the Insert Sends?

Do you deaactivate the pseudo plugins, too? Especially the Insert Sends?

yep, it deactivates ALL plugins on close.

maybe you can tell it's a lot less likely to happen or not?

ps. not quite a fix but a tiny shot in the same (dark) direction: v1.6.0.15git.8fc819 [develop]

The first patch was already a big step forward. Qtractor hung only once with this version.

I use v1.6.0.15git.8fc819 and see if it occurs again.

Permalink

On a weaker machine (Sandy Bridge generation) Qtractor is still hanging in a reproducable way.

Permalink

I asked Grok and it says:

-- snip --
This sounds like a known (or at least reported) JACK2 shutdown/disconnection problem that gets worse with a high number of ports/connections. Qtractor (and other clients) get stuck during cleanup when exiting because they can't properly unregister their JACK ports.

Why this happens

Qtractor registers a lot of JACK ports (one pair per track/bus/channel, plus MIDI, etc.) in complex sessions.
On exit, it (and the JACK server) tries to disconnect and unregister everything.
JACK2 can deadlock or hang in this phase under heavy load (many ports + many external connections). Other clients appear frozen because the JACK server itself is blocked in the client shutdown path.
This is more common with jack2 than jack1, and especially when there are complex graphs involving plugins, sends/returns, or many external apps.

This is a classic "JACK graph teardown" fragility that shows up in bigger sessions. Reducing port count or using jack1 often resolves it immediately.
-- snip --

Maybe it can be mitigated if Qtractor disconnects all jack-connections serially before disconnecting from jack. This might make it easier for jackd to cleanup.

On 2 of my 3machines it works like a charm. On one machine (Debian Trixie) it ist still hanging, but it looks as if it's finished with jack. On Qjackctl there is no Qtractor left and I can gracefully close other applications like Qjackctl or non-mixer-xt.

And it makes no difference anymore if I close non-mixer-xt before closing Qtractor, or if I start Qtractor without non-mixer-xt.

So at least jackd is in a working state. This is a progress.

But what ist Qtractor waiting for?

I started Qtractor with strace and copied the output up to the state where Qtractor isn't seen anymore in Qjackctl and hangs. See attachment.

File attachments

In reply to by bluebell

Permalink

so it's been waiting on /etc/xdg/rncbc.org/drumkv1.conf ? all this time?

what's this? is there this file on your system? why? it should be ~/.config/rncbc.org/drumkv1.conf and only! ...

care to explain?

Searching in /etc/xdg seems to be the default and happens on my other machines, too, without any problems.

I've set XDG_CONFIG_DIRS to $HOME/.config and did the test again. Same hanging.

File attachments
Permalink

so you now have only one (old) machine where the issue is fairly reproducible...

from your last strace, supposedly in the old/slow machine, I'm seeing this last:
write(1, "Freeing sfz file from memory...",...
write(1, "OK",...
write(1, "Stopping disk thread...",...
write(1, "OK",...

is it really hanging or just taking longer to exit?

The one machine were it's happening is not the oldest, but it runs Debian Trixie while the other computers run an oldish system.

Since you cannot reproduce it the 99% must be enough. I think I will try Pipewire on Debian Trixie and see if the problem persists. Maybe some day I can figure out what's so special with this session. Other sessions don't have that problem.

I think deactivating all plugins and cutting all jack connections is a definitely good idea.

Thanks a lot.

I installed Pipewire on the machine where Qtractor hangs with a special session when closing it. With Pipewire (pw-jack) Qtractor hangs, too. As with genuine jackd simpler sessions make no problems.

[...] Qtractor hangs with a special session when closing it.

maybe we shall determine how and why so special is that session...

what happens with that very same session but stripped from all content as if loaded like a template?

First: It's a Heisenbug. When I compile Qtractor in DEBUG mode then it goes away. So probably a race condition, and not neccesarily in Qtractor.

I have several tracks with Linuxsampler. In one track I use a kontrabass sfz soundfont. When I use another soundfont then the bug goes away, too.

It's the same .deb binary package of Linuxsampler and Libgig as on the other machines.

I'l investigate what's so special with this soundfont.

No idea why it happens only on the Trixie machine. Maybe I'll compile linuxsampler there.

I recompiled linuxsampler on Trixie. No change. I converted the soundfont wav files, I replaced note names by note numbers in the sfz. No success.

I have no idea why this soundfont leads to these strange problems on the Trixie machine.

Using sfizz instead of linuxsampler did the job.

Problem solved.

Add new comment

The content of this field is kept private and will not be shown publicly.

Markdown

  • Parses markdown and converts it to HTML.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt height width> <strike> <pre> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <b> <i> <pre> <img src alt height width> <strike>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
File attachments
Unlimited number of files can be uploaded to this field.
2 MB limit.
Allowed types: jpg jpeg gif png txt doc docx xls xlsx pdf ppt pps odt ods odp zip gz bz2 xz patch diff wav ogg flac ogv mp4 qtz.