JDK-8325984 : 4 jcstress tests are failing in Tier6 4 times each
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 23
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64,aarch64
  • Submitted: 2024-02-15
  • Updated: 2024-08-06
  • Resolved: 2024-06-07
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 23 JDK 24
23Fixed 24 b02Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8326062 :  
Description
The following tests are failing in Tier6:

   4 applications/jcstress/accessAtomic.java
   4 applications/jcstress/acqrel.java
   4 applications/jcstress/atomicity.java
   4 applications/jcstress/coherence.java

The linux-x64-debug failure logs all look like this:

applications/jcstress/coherence.java

org.openjdk.jcstress.tests.coherence.varHandles.byteArray.big.acqrel.CharTest [-Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9900/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/261e7f75-1b2e-4b6b-9b5d-456a51428f67/runs/5cfdfc2d-0d7a-4f85-98c5-62d0d63a5cdd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/scratch, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9900/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/261e7f75-1b2e-4b6b-9b5d-456a51428f67/runs/5cfdfc2d-0d7a-4f85-98c5-62d0d63a5cdd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/scratch, -XX:MaxRAMPercentage=25, -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/21/35/bundles/linux-x64/jdk-21_linux-x64_bin.tar.gz/jdk-21, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9900/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/261e7f75-1b2e-4b6b-9b5d-456a51428f67/runs/5cfdfc2d-0d7a-4f85-98c5-62d0d63a5cdd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/tmp, -XX:+HeapDumpOnOutOfMemoryError, -XX:+CrashOnOutOfMemoryError, -Xmx768M] had failed with the pre-test error.


applications/jcstress/acqrel.java

org.openjdk.jcstress.tests.acqrel.varHandles.byteBuffer.heap.big.acqrel.IntShortTest [-Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9900/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/261e7f75-1b2e-4b6b-9b5d-456a51428f67/runs/5cfdfc2d-0d7a-4f85-98c5-62d0d63a5cdd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/scratch, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9900/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/261e7f75-1b2e-4b6b-9b5d-456a51428f67/runs/5cfdfc2d-0d7a-4f85-98c5-62d0d63a5cdd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/scratch, -XX:MaxRAMPercentage=25, -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/21/35/bundles/linux-x64/jdk-21_linux-x64_bin.tar.gz/jdk-21, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9900/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/261e7f75-1b2e-4b6b-9b5d-456a51428f67/runs/5cfdfc2d-0d7a-4f85-98c5-62d0d63a5cdd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/tmp, -XX:+HeapDumpOnOutOfMemoryError, -XX:+CrashOnOutOfMemoryError, -Xmx768M] had failed with the pre-test error.


applications/jcstress/accessAtomic.java

org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.little.acqrel.IntTest [-Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9900/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/261e7f75-1b2e-4b6b-9b5d-456a51428f67/runs/5cfdfc2d-0d7a-4f85-98c5-62d0d63a5cdd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/scratch, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9900/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/261e7f75-1b2e-4b6b-9b5d-456a51428f67/runs/5cfdfc2d-0d7a-4f85-98c5-62d0d63a5cdd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/scratch, -XX:MaxRAMPercentage=25, -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/21/35/bundles/linux-x64/jdk-21_linux-x64_bin.tar.gz/jdk-21, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S9900/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/261e7f75-1b2e-4b6b-9b5d-456a51428f67/runs/5cfdfc2d-0d7a-4f85-98c5-62d0d63a5cdd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/tmp, -XX:+HeapDumpOnOutOfMemoryError, -XX:+CrashOnOutOfMemoryError, -Xmx768M] had failed with the pre-test error.


applications/jcstress/atomicity.java

org.openjdk.jcstress.tests.atomicity.varHandles.byteArray.little.CASTest.CompareAndSetInt [-Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/73e57426-9086-438c-bf1c-51bfaf1790ad-S52585/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/651a8f9b-291f-40bb-b55a-c9e84806430d/runs/f59230eb-1eb0-4ae6-a8b5-071009fa085b/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part3/scratch, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/73e57426-9086-438c-bf1c-51bfaf1790ad-S52585/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/651a8f9b-291f-40bb-b55a-c9e84806430d/runs/f59230eb-1eb0-4ae6-a8b5-071009fa085b/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part3/scratch, -XX:MaxRAMPercentage=25, -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/21/35/bundles/linux-x64/jdk-21_linux-x64_bin.tar.gz/jdk-21, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/73e57426-9086-438c-bf1c-51bfaf1790ad-S52585/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/651a8f9b-291f-40bb-b55a-c9e84806430d/runs/f59230eb-1eb0-4ae6-a8b5-071009fa085b/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part3/tmp, -XX:+HeapDumpOnOutOfMemoryError, -XX:+CrashOnOutOfMemoryError, -Xmx768M] had failed with the pre-test error.


All of these pre-test error msgs happen after the logs were limited
with this error mesg:

...
Output overflow:
JT Harness has limited the test output to the text
at the beginning and the end, so that you can see how the
test began, and how it completed.

If you need to see more of the output from the test,
set the system property javatest.maxOutputSize to a higher
value. The current value is 100000
...

so whatever happened was not captured in the log files.

There are a total of 12 change sets tested in jdk-23+10-720-tier6
and none of them jumps out at me as an obvious candidate for
the root cause of these failures.

I'm starting this bug in hotspot/runtime just as a place to land
it since I have no idea what's going in here.
Comments
A pull request was submitted for review. Branch: jdk23 URL: https://git.openjdk.org/jdk/pull/20239 Date: 2024-07-18 16:09:31 +0000
18-07-2024

Changeset: ee82346b Author: Jorn Vernee <jvernee@openjdk.org> Date: 2024-06-07 15:40:59 +0000 URL: https://git.openjdk.org/jdk/commit/ee82346bd5ecf3024d6dc7b7529598099483a42c
07-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19565 Date: 2024-06-05 19:21:56 +0000
05-06-2024

CODETOOLS-7903695 allows jcstress to skip the tests that throw UOEs like this. With current jcstress-tests-all-20240314.jar build, these tests fully "pass". Well, they are skipped on API mismatch, but at least they are not failing hard.
14-03-2024

Still looking into tests. I don't really want to amend them in such a way that we lose JDK 21 coverage. CODETOOLS-7903695 allows both running on JDK 21 and skipping on JDK 23. Either way, you would need to wait for jcstress release to update the JDK tests, so you would need to wait anyway.
14-03-2024

Thanks. I think we still want to wait until https://bugs.openjdk.org/browse/CODETOOLS-7903671 is fixed before we turn these tests back on though, right?
14-03-2024

CODETOOLS-7903671 should update these tests on jcstress side.
19-02-2024

[~jvernee] - I'll take a look at doing the ProblemListing.
16-02-2024

Moved to core-libs/java.lang.invoke to match JDK-8318966.
16-02-2024

[~dcubed] I had a look, and it seems that these tests pull in a jar file with the actual test classes, which I _think_ are in the jcstress repo e.g. https://github.com/openjdk/jcstress/blob/84bd76e115604e81e721674eff0ff39c5a3bf3b8/jcstress-test-gen/src/main/resources/accessAtomic/X-VarHandleByteArrayViewAtomicityTest.java.template It looks like these tests are using the affected methods in an incompatible way, and should be fixed in the jcstress repo. Might be best to problemlist them for now. [~lmesnik] You seem to have updated the test jar that's being used 7 months ago. Do you know how to address these failures? i.e. what is the process for modifying those tests?
16-02-2024

[~jvernee] - Can you please take a look at these new jcstress failures that started happening in Tier6? They started in the build-ID that contains your fix for: JDK-8318966 Some methods make promises about Java array element alignment that are too strong
16-02-2024

I did a bisection of one test task from Tier6 and that testing shows that this bug started happening in jdk-23-10-715 which only contains the fix for: JDK-8318966 Some methods make promises about Java array element alignment that are too strong
16-02-2024