Audio4Linux / JDSP4Linux

An audio effect processor for PipeWire and PulseAudio clients
GNU General Public License v3.0
915 stars 35 forks source link

Crash after 20 seconds of audio playback (Convolver benchmark) #143

Closed escapables closed 1 year ago

escapables commented 1 year ago

When the convolver is enabled and playback starts, a benchmark begins and when it is finished the application crashes. This only started happening after restarting for the first time after installing the application. Using version 4.01 from Flatpak with pipewire 0.3.71.

[23:35:06.650] [KNL] Log::kernel: EffectDSPMain: Buffer size changed, update convolution object to maximize performance [23:35:32.610] [KNL] Log::kernel: EffectDSPMain: Benchmark start [23:35:52.722] [KNL] Log::kernel: EffectDSPMain: Benchmark done [23:35:52.737] [KNL] Log::kernel: EffectDSPMain: Benchmark flag == 1, refreshing convolutions [23:35:52.737] [KNL] Log::kernel: EffectDSPMain: Buffer size changed, update convolution object to maximize performance

Nothing else after this in the terminal, it just closes.

timschneeb commented 1 year ago

If it suddenly closed without any log output indicating a crash, it was likely killed by the operating system.

I have had similar problems in the past, although I'm not entirely sure what causes this. PipeWire marks audio-related threads/processes of its clients with real-time priority by default, including JamesDSP. Realtime threads have an RT CPU time limit, so the heavy load caused by the benchmarking might exceed this limit and cause the OS to send a kill signal.

For now, I've added a switch to disable convolver benchmarking on boot as a workaround. That will be available when the next stable release is ready.