Details
-
Bug
-
Resolution: Fixed
-
P4
-
21, 22
-
b27
Description
[ filed on behalf of Anton Bobrov who has not yet got a JBS account ]
The current implementation of the screencast robot has various synchronization
issues in its implementation with the native libpipewire API which leads to
cpu burn spinning and occasional hanging in the native
Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl
function when trying to run jtreg swing tests. This causes related tests to
timeout and fail.
This is easily reproducible on a stock Fedora 38 when running something like
make test TEST="javax/swing/plaf/nimbus/TestNimbusBGColor.java" JTREG="JAVA_OPTIONS=-Dawt.robot.screenshotMethod=dbusScreencast -Dawt.robot.screenshotDebug=true"
which does succeed sometimes but most of the time just timeouts and fails.
The root cause is that the synchronization for the libpipewire API thread loop
is not correctly implemented in the screencast robot native code, specifically
around the pw_thread_loop_wait API and associated condition variables. In fact
it is rather surprising it works at all sometimes in the current implementation.
There will be PR to address these issues that can hopefully highlight them more
clearly in the code so the reason for filing this issue is to get that PR going.
The current implementation of the screencast robot has various synchronization
issues in its implementation with the native libpipewire API which leads to
cpu burn spinning and occasional hanging in the native
Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl
function when trying to run jtreg swing tests. This causes related tests to
timeout and fail.
This is easily reproducible on a stock Fedora 38 when running something like
make test TEST="javax/swing/plaf/nimbus/TestNimbusBGColor.java" JTREG="JAVA_OPTIONS=-Dawt.robot.screenshotMethod=dbusScreencast -Dawt.robot.screenshotDebug=true"
which does succeed sometimes but most of the time just timeouts and fails.
The root cause is that the synchronization for the libpipewire API thread loop
is not correctly implemented in the screencast robot native code, specifically
around the pw_thread_loop_wait API and associated condition variables. In fact
it is rather surprising it works at all sometimes in the current implementation.
There will be PR to address these issues that can hopefully highlight them more
clearly in the code so the reason for filing this issue is to get that PR going.
Attachments
Issue Links
- relates to
-
JDK-8321176 [Screencast] make a second attempt on screencast failure
- Resolved