RFR: 8320655: awt screencast robot spin and sync issues with native libpipewire api
Alexander Zvegintsev
azvegint at openjdk.org
Fri Dec 1 14:04:08 UTC 2023
On Thu, 23 Nov 2023 13:00:06 GMT, Anton Bobrov <duke at openjdk.org> wrote:
> This patch addresses the issues described in the https://bugs.openjdk.org/browse/JDK-8320655 by fixing the proper locking and signalling around libpipewire thread loop condition variables and also fixing libpipewire error detection and signalling and propagation to the screencast API. This makes the screencast robot stable enough to consistently make it thru the entire javax/swing jtreg suite without hanging and also significantly reduces CPU consumption as there is no longer any burning spinners since they are now waiting on related conditions proper.
src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c line 928:
> 926: fp_pw_thread_loop_wait(pw.loop);
> 927: if (hasPipewireFailed) {
> 928: fp_pw_thread_loop_unlock(pw.loop);
The session may not be closed [immediately](https://github.com/openjdk/jdk/blob/master/src/java.desktop/unix/classes/sun/awt/screencast/ScreencastHelper.java#L62), so it could be reused later by a subsequent call.
So I suggest making it explicit:
Suggestion:
fp_pw_thread_loop_unlock(pw.loop);
doCleanup();
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16794#discussion_r1412117392
More information about the client-libs-dev
mailing list