JDK-8369911 : Test sun/java2d/marlin/ClipShapeTest.java#CubicDoDash, #Cubic and #Poly fail intermittent
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 26
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2025-10-15
  • Updated: 2025-11-29
  • Resolved: 2025-11-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 masterFixed
Related Reports
Relates :  
Relates :  
Description
We see a number of failures in the test sun/java2d/marlin/ClipShapeTest.java#CubicDoDash  .
Output looks like this :

----------System.out:(0/0)----------
----------System.err:(113/6520)----------
Oct 15, 2025 12:23:16 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: ===============================================================================
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: Marlin software rasterizer           = ENABLED
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: Version                              = [marlin-0.9.4.6.1-Unsafe-OpenJDK]
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer                  = sun.java2d.marlin.DMarlinRenderingEngine
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.useThreadLocal   = true
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.useRef           = soft
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.edges            = 4096
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.pixelWidth       = 4096
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.pixelHeight      = 2176
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.profile          = quality
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.subPixel_log2_X  = 8
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.subPixel_log2_Y  = 3
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.tileSize_log2    = 5
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.tileWidth_log2   = 5
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.blockSize_log2   = 5
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.forceRLE         = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.forceNoRLE       = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.useTileFlags     = true
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.useTileFlags.useHeuristics = true
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.rleMinWidth      = 64
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.useSimplifier    = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.usePathSimplifier= false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.pathSimplifier.pixTol = 0.125
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.stroker.joinError= 0.125
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.stroker.joinStyle= -1
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.clip             = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.clip.runtime.enable = true
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.clip.subdivider  = true
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.clip.subdivider.minLength = -1.0
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.doStats          = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.doMonitors       = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.doChecks         = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.skip_rdr         = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.skip_pipe        = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.useLogger        = true
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.logCreateContext = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.logUnsafeMalloc  = false
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.curve_len_err    = 1.0E-4
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.cubic_dec_d2     = 0.001
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.cubic_inc_d1     = 1.0E-4
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: sun.java2d.renderer.quad_dec_d2      = 5.0E-4
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: Renderer settings:
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: MergeSort: DPQS_THRESHOLD: 256
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: MergeSort: DISABLE_ISORT_THRESHOLD: 1000
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: SORT         = DPQS_20191112
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: CUB_DEC_BND  = 0.25600001215934753
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: CUB_INC_BND  = 0.025599999353289604
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: QUAD_DEC_BND = 0.12800000607967377
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: INITIAL_EDGES_CAPACITY               = 98304
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: INITIAL_CROSSING_COUNT               = 1024
Oct 15, 2025 12:23:17 AM sun.java2d.marlin.MarlinUtils logInfo
INFO: ===============================================================================
java.lang.RuntimeException: Marlin renderer not used at runtime !
	at ClipShapeTest.main(ClipShapeTest.java:250)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1474)
Comments
> It is surprising not to be have been a problem since it was added in 2018. indeed !
29-11-2025

Changeset: 150def42 Branch: master Author: Matthias Baesken <mbaesken@openjdk.org> Date: 2025-11-27 12:42:42 +0000 URL: https://git.openjdk.org/jdk/commit/150def42dd7f22d949b4d788bfe5986f236b9b37
27-11-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/28507 Date: 2025-11-26 12:57:03 +0000
26-11-2025

Thanks for the advice [~rriggs] - seems this helps. I created a PR . Some other tests in the java2d area might need adjustment too, I created JDK-8372592 for this.
26-11-2025

Hi Roger , so should we better have a "static final Logger" in the ClipShapeTest class (and then do only the init in the static block) ? https://github.com/openjdk/jdk/blob/d94c52ccf2fed3fc66d25a34254c9b581c175fa1/test/jdk/sun/java2d/marlin/ClipShapeTest.java#L163 > Loggers need to be stored in statics ... but it seems this is not the case currently for the other marlin tests too where Loggers are used, see the example from https://github.com/openjdk/jdk/blob/35f4a7410cdaaa9d3ce68148cb81e893ad0d93de/test/jdk/sun/java2d/marlin/Bug8341381.java#L99 .
25-11-2025

Loggers need to be stored in statics or they get GC'd and later requests get a new instance (without the added handler). It is surprising not to be have been a problem since it was added in 2018.
25-11-2025

I noticed that some other tests covering java2d use the logging too e.g. https://github.com/openjdk/jdk/blob/35f4a7410cdaaa9d3ce68148cb81e893ad0d93de/test/jdk/sun/java2d/marlin/Bug8341381.java#L99 and we never see errors there. Any idea why? The Logger in the other test seems to be initialized in main instead, does that make a difference ? [~rriggs] any comments on the logger issue ?
25-11-2025

We see the issues since 22nd September (almost) every day, so maybe something changed (shortly?) before. machines where we see the issues : macOS aarch64 macOS 14.5 Linux Alpine x86_64 Linux ALPINE 3.19.0, Linux ALPINE 3.22.0 I added 2 jtr files , one from macOS , one from Alpine. We see the issues with fastdebug binaries (but most of the time we run with fastdebug so this might be the reason).
06-11-2025

> The bug is related to jul.logging.handler not working: Yes, that much is clear. I commented on this earlier. > I suspect that despite the same name, different loggers are being used which makes me wonder how this works at all It is possibly (likely) a problem in the logger code, but it needs some digging to prove that.
05-11-2025

See test code: https://github.com/openjdk/jdk/blob/b0536f9c2a6ddfa27be8fad8f53783c6b28d22c9/test/jdk/sun/java2d/marlin/ClipShapeTest.java#L160 How can it now not work?
05-11-2025

The bug is related to jul.logging.handler not working: " java.lang.RuntimeException: Marlin renderer not used at runtime ! "
05-11-2025

As far as I remember, these tests use random numbers but fixed seed to be reproduceable and were stable for years... at least on x86_64 machines. If it becomes unstable, are you sure your hardware (memory) and the jvm jit compiler is still stable on your hardware ? Please share your full logs (hw & software info + jtreg outputs) to let me understand what's going on?
05-11-2025

> I can reproduce this on exploded builds, but never on image builds. Hi Phil [~prr] , we run our central tests with image builds and there we see the failures quite often. So it is not only an issue that can be observed in exploded builds.
05-11-2025

We also saw sun/java2d/marlin/ClipShapeTest.java#Cubic failing in a similar way, on macOS aarch64 and linuxmuslx86_64 / Alpine.
05-11-2025

Hmm the same pattern is used in the test in this PR https://github.com/openjdk/jdk/pull/27641 And that passes for me. Very odd. A race condition ?
16-10-2025

I can reproduce this on exploded builds, but never on image builds. On exploded builds it is 100% reproducible for me - on macOS. If I make an image build out of the same build, the test passes. Also I can reproduce it with a JDK 25 exploded build, so it doesn't seem like a new problem. Also nothing has changed in the test, or marlin since 2024. And the message it is looking for clearly appears in the stdout, but the Logger's "publish()" over-ride in the test isn't being notified of this mesage. In fact it isn't being notified at all. I suspect that despite the same name, different loggers are being used which makes me wonder how this works at all.
16-10-2025

We saw the issue recently on macOS, Linux Alpine and also Windows. sun/java2d/marlin/ClipShapeTest.java#Poly seems to fail in a similar way. The errors show up in jdk26, since September 2026 .
15-10-2025