https://bugs.winehq.org/show_bug.cgi?id=47458
Bug ID: 47458 Summary: Sleeping while pthreads mutex held from the driver code in winepulse-PulseAudio_Support Product: Wine-staging Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: bill.huey@gmail.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
The SetEvent call in the function pulse_timer_cb() sleeps, calls into the wineserver, while a pthread mutex is held. This can cause long delays in releasing the "pulse_lock" mutex, anywhere from 1-2ms to 90ms that I can see with my custom instrumentation.
It potentially can cause dropouts and other issues with audio handling. It seems to be in the main core audio processing loop.
The general practice here is to avoid sleeping operations within critical sections.