RFR: 8364434: Inconsistent BufferedContext state after GC [v5]

Alexander Zvegintsev azvegint at openjdk.org
Wed Aug 13 13:52:12 UTC 2025


On Tue, 12 Aug 2025 17:13:42 GMT, Nikita Gubarkov <ngubarkov at openjdk.org> wrote:

>> test/jdk/java/awt/ColorClass/WeakColorTest.java line 39:
>> 
>>> 37:  * @summary Check that garbage-collecting Color before accelerated painting is complete does not cause artifacts.
>>> 38:  * @library /test/lib
>>> 39:  * @run main/othervm -Xms16m -Xmx16m WeakColorTest
>> 
>> I tried 3 different pipelines on Linux:
>> 
>> 
>>  * @run main/othervm -Xms16m -Xmx16m -Dsun.java2d.opengl=false -Dsun.java2d.xrender=false WeakColorTest
>>  * @run main/othervm -Xms16m -Xmx16m -Dsun.java2d.opengl=true -Dsun.java2d.xrender=false WeakColorTest
>>  * @run main/othervm -Xms16m -Xmx16m -Dsun.java2d.opengl=false -Dsun.java2d.xrender=true WeakColorTest // default
>> 
>> 
>> OGL is the only one using the `BufferedContext`.
>> It passes on SW, and OGL pipelines, the test is skipped on Xrender (the default pipeline).
>> The results are the same with or without the fix.
>> 
>> As we know that the test is always skipped on Linux on the default pipeline, shouldn't we just just do not run it with ` @requires (os.family != "linux")` to save some CI resources?
>
> Although the issues are theoretically possible on any platform when using `BufferedContext`, in practice it is only known to reproduce on Metal.
> So if we consider only known scenarios, we could as well limit it to macOS. If we consider a theoretical regression scenario, having it on every platform could also be helpful (but not with default XRender mode on Linux of course).
> But having a non-accelerated pipeline on Linux by default may not be permanent either - when we finish our ongoing Vulkan work under Wakefield, we could eventually make it default. So maybe just leave it for all platforms, wdyt?

I am not opposed to running the test on all platforms.
Windows and Mac work well, but in the case of Linux and XRender, at this point, we know for certain that the test is not useful and will simply waste 5-15 seconds of CI time on each build.

We can file an issue for Linux to enable the test back on it when we switch to Vulkan (and investigate the XRender case).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26576#discussion_r2273539244


More information about the client-libs-dev mailing list