During investigation of JDK-8240654 it was found that some of the Windows GDI functions don't work with our numa interleaving implementation (-XX:+UseNUMAInterleaving). This causes severe repaint issues.
The underlying issue is that these functions don't accept memory spanning over multiple memory reservations.
The problem can easily be seen with the Java2D demos, where the drawn UI is grayed out instead of containing all relevant components.
This can be reproduced by running building J2DBench and running:
java -Xmx1g -Xms1g -XX:+UseNUMAInterleaving -Dsun.java2d.opengl=False -Dsun.java2d.d3d=False -jar dist/J2DBench.jar
The -Dsun.java2d.d3d property is used to ensure that that java2d doesn't enable the alternative, D3D implementation instead of GDI. -Dsun.java2d.opengl is turned off for the same reason.
NOTE about NUMA interleaving:
- Make sure that you run the test on a machine with more than one NUMA node.