JDK-8256051 : nmethod_entry_barrier stub miscalculates xmm spill size on x86_32
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 14,15,16
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-11-09
  • Updated: 2024-12-13
  • Resolved: 2020-11-11
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 15 JDK 16
15.0.2Fixed 16 b24Fixed
Related Reports
Relates :  
Description
Reproducible with:
$ CONF=linux-x86-server-fastdebug make images run-test TEST=java/lang/invoke/VarHandles/ TEST_VM_OPTS="-XX:+UseShenandoahGC"

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR   
>> jtreg:test/jdk/java/lang/invoke/VarHandles           37    31     6     0 <<
==============================


Most of them fail only with Shenandoah with:

java.lang.AssertionError: success compareAndExchangeRelease float value expected [1.690906E7] but found [0.0]
	at org.testng.Assert.fail(Assert.java:94)
	at org.testng.Assert.failNotEquals(Assert.java:496)
	at org.testng.Assert.assertEquals(Assert.java:125)
	at VarHandleTestByteArrayAsFloat.testArrayReadWrite(VarHandleTestByteArrayAsFloat.java:1243)
	at VarHandleTestByteArrayAsFloat.lambda$accessTestCaseProvider$11(VarHandleTestByteArrayAsFloat.java:190)
	at VarHandleBaseTest$AccessTestCase.testAccess(VarHandleBaseTest.java:405)

Comments
Fix Request (15u) Fixes the regression since JDK 14. While the fix is in the shared x86_32 code, that path is only used by Shenandoah. Patch applies cleanly to 15u, passes java/lang/invoke/VarHandles tests on x86_32, passes hotspot_gc_shenandoah on x86_32.
18-11-2020

Changeset: bfa060f0 Author: Zhengyu Gu <zgu@openjdk.org> Date: 2020-11-11 19:12:55 +0000 URL: https://github.com/openjdk/jdk/commit/bfa060f0
11-11-2020

nmethod_entry_barrier stub miscalculates xmm spill size on x86_32, instead of 4 * wordSize, it uses 2 * wordSize.
11-11-2020

Looks like that it indeed has something to do with concurrent class unloading. Tests passed with -XX:-ClassUnloading. But also passed with -Xint.
10-11-2020

Bisection points to JDK-8228720.
09-11-2020