Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay appending VirtualThread objects to liveVirtualThreadList #16293

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

babsingh
Copy link
Contributor

@babsingh babsingh commented Nov 8, 2022

Currently, VirtualThread objects are appended to liveVirtualThreadList
in JVM_VirtualThreadMountBegin.

To assist GC with synchronizing while scanning continuations and
VirtualThread objects, VirtualThread objects are appended to
liveVirtualThreadList in JVM_VirtualThreadMountEnd.

This delay will prevent race conditions for the GC while scanning the
VirtualThread objects.

Related: #16290
Related: #16259

Signed-off-by: Babneet Singh [email protected]

Currently, VirtualThread objects are appended to liveVirtualThreadList
in JVM_VirtualThreadMountBegin.

To assist GC with synchronizing while scanning continuations and
VirtualThread objects, VirtualThread objects are appended to
liveVirtualThreadList in JVM_VirtualThreadMountEnd.

This delay will prevent race conditions for the GC while scanning the
VirtualThread objects.

Related: eclipse-openj9#16259

Signed-off-by: Babneet Singh <[email protected]>
@babsingh
Copy link
Contributor Author

babsingh commented Nov 8, 2022

@babsingh
Copy link
Contributor Author

babsingh commented Nov 9, 2022

https://hyc-runtimes-jenkins.swg-devops.com/job/Test_openjdk19_j9_extended.openjdk_aarch64_mac_Personal/7/consoleFull

These are known failures, which are reported in #15967.

## java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java

14:50:35  sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
14:50:35  	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
14:50:35  	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
14:50:35  	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
14:50:35  	at jdk.test.lib.security.CertUtils.build(CertUtils.java:604)
14:50:35  	at BuildEEBasicConstraints.main(BuildEEBasicConstraints.java:77)
14:50:35  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
14:50:35  	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
14:50:35  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
14:50:35  	at java.base/java.lang.Thread.run(Thread.java:1573)

## java/security/cert/pkix/policyChanges/TestPolicy.java

14:50:36  java.security.cert.CertPathValidatorException: validity check failed
14:50:36  	at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
14:50:36  	at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:224)
14:50:36  	at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:144)
14:50:36  	at java.base/sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:83)
14:50:36  	at java.base/java.security.cert.CertPathValidator.validate(CertPathValidator.java:309)
14:50:36  	at TestPolicy.main(TestPolicy.java:102)
14:50:36  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
14:50:36  	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
14:50:36  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
14:50:36  	at java.base/java.lang.Thread.run(Thread.java:1573)
14:50:36  Caused by: java.security.cert.CertificateExpiredException: NotAfter: Mon Nov 07 06:57:03 EST 2022
14:50:36  	at java.base/sun.security.x509.CertificateValidity.valid(CertificateValidity.java:277)
14:50:36  	at java.base/sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:619)
14:50:36  	at java.base/sun.security.provider.certpath.BasicChecker.verifyValidity(BasicChecker.java:190)
14:50:36  	at java.base/sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:144)
14:50:36  	at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
14:50:36  	... 9 more

@babsingh
Copy link
Contributor Author

babsingh commented Nov 9, 2022

https://hyc-runtimes-jenkins.swg-devops.com/job/Test_openjdk19_j9_extended.functional_x86-64_linux_Personal/35/tapResults/

GC failure.

## SyntheticGCWorkload_concurrentSlackAuto_10M_J9_0_FAILED

Legend: 
. = Scavenge
, = Global
f = Failed flip
F = Failed tenure
p = Percolate collect
c = Concurrent aborted
| = Minute marker
x = Warning: aborted collection due to insufficient free space
s = Warning: scan cache overflow (storage acquired from heap)
X = Other warning
T = Total throughput
S = Concurrent slack (-1 = auto)
? = Unknown event
---------------------------------------------------------
/home/jenkins/workspace/Test_openjdk19_j9_extended.functional_x86-64_linux_Personal_testList_1/aqa-tests/TKG/../TKG/output_16679385495615/SyntheticGCWorkload_concurrentSlackAuto_10M_J9_0/config_10M_0.3.xml_2022-11-08T_12-36-07_verbose_original.xml: 
.................,.......F|,.......F,...f.....F,........F,........F,.|......fFxpc,.....f.F,........Fp,..X....F,....f.|...F,.....f.F,........fFxp,........F,.f...|...F,........F,.......F,...f....F,.......F,|.......fFxp,......F,..f......F,........Fpc,..|.....F,......F,.....f.F,........F,...|.....Fp,......f.F,........fFxp,......F,..f.|.....F,........Fp,.....f.F,.......F,.......fFxp,|......F,.......f.F,........F,.......F,...|..
.	,	x	f	F	p	c	X	S	T	
303	40	5	17	39	9	2	1	0	31.9GB
---------------------------------------------------------
/home/jenkins/workspace/Test_openjdk19_j9_extended.functional_x86-64_linux_Personal_testList_1/aqa-tests/TKG/../TKG/output_16679385495615/SyntheticGCWorkload_concurrentSlackAuto_10M_J9_0/config_10M_0.3.xml_2022-11-08T_12-36-07_verbose_concurrentSlackAuto.xml: 
.................,........fFxp,.f.|........Fpc,.......F,.......F,......|..f.F,..........F,.........fFxp,........fFxp,..|....F,........F,........F,...f...|...F,..........F,.........F,....f.....F,..|.........F,.........fFxp,...X.....fFxp,.f.....|.F,.........F,.........fFxp,........fFxp,.f..|.....F,..f.....F,.......Fp,.......F,..f.|....f.F,........F,.........F,........F,.|.......fFxp,....f....F,......f...F,.......f.F
.	,	x	f	F	p	c	X	S	T	
300	34	8	20	34	10	1	1	-2	31.4GB
---------------------------------------------------------
Test results: 
Warning: aborted collection due to insufficient free space (x): before 5, after 8, ratio 1.6 > 0.15 --> failed
Percolate collect (p): before 9, after 10, ratio 1.1111111111111112 > 0.75 --> failed

@amicic
Copy link
Contributor

amicic commented Nov 9, 2022

GC failure.
SyntheticGCWorkload_concurrentSlackAuto_10M_J9_0_FAILED

unrelated

@babsingh
Copy link
Contributor Author

babsingh commented Nov 9, 2022

https://hyc-runtimes-jenkins.swg-devops.com/job/Test_openjdk19_j9_sanity.openjdk_x86-64_linux_Personal/22/consoleFull

GC assertion triggered.

## jdk/java/lang/Thread/virtual/stress/GetStackTraceALot.java

15:41:13  20:41:07.097 0x7f8ac4009f00    j9mm.141    *   ** ASSERTION FAILED ** at /home/jenkins/workspace/Build_JDK19_x86-64_linux_Personal/omr/gc/base/standard/Scavenger.cpp:1657: ((false))

@amicic
Copy link
Contributor

amicic commented Nov 9, 2022

I'm ok with this change (and leaving removal from the list in unmount-being is ok, too).

Scavenger.cpp

Could be due to many sorts of root causes. We saw it here already, though: #16259 (comment)

@amicic
Copy link
Contributor

amicic commented Nov 9, 2022

Despite the assert failure (not being fixed), I think this is a reasonable change (and leaving removal from the list in unmount-begin is consistent - the steps in mount and unmount should mirror each other).

@babsingh
Copy link
Contributor Author

babsingh commented Nov 9, 2022

https://hyc-runtimes-jenkins.swg-devops.com/job/Test_openjdk19_j9_extended.openjdk_x86-64_linux_Personal/20/testReport/

https://hyc-runtimes-jenkins.swg-devops.com/job/Test_openjdk19_j9_extended.openjdk_x86-64_windows_Personal/10/testReport/

These are known failures, which are reported in #15967.

https://hyc-runtimes-jenkins.swg-devops.com/job/Test_openjdk19_j9_sanity.openjdk_x86-64_windows_Personal/10/consoleFull

This is a variant of the JVM_VirtualThreadUnmountBegin crash (#16259) on Windows.

### java/lang/Thread/virtual/ParkWithFixedThreadPool.java

19:12:33  j9port_isCompatible+0x1a08b (0x00007FFB7501CC3B [j9prt29+0x1cc3b])
19:12:33  J9VMDllMain+0x14fdcb (0x00007FFB71430DDB [j9gc_full29+0x150ddb])
19:12:33  omrthread_get_category+0xa42 (0x00007FFB7CF24232 [j9thr29+0x4232])
19:12:33  _o__realloc_base+0x60 (0x00007FFB8443FB80 [ucrtbase+0x1fb80])
19:12:33  BaseThreadInitThunk+0x14 (0x00007FFB861E84D4 [KERNEL32+0x84d4])
19:12:33  RtlUserThreadStart+0x21 (0x00007FFB86FD1791 [ntdll+0x51791])

@babsingh babsingh marked this pull request as ready for review November 9, 2022 21:04
@babsingh
Copy link
Contributor Author

babsingh commented Nov 9, 2022

This PR is ready for review. I don't see any new failures introduced by these changes. @gacholio Can you please review?

@amicic Will this PR + #16290 resolve the race condition? or do we require more changes?

@gacholio gacholio self-requested a review November 9, 2022 21:10
@amicic
Copy link
Contributor

amicic commented Nov 9, 2022

This PR is ready for review. I don't see any new failures introduced by these changes. @gacholio Can you please review?

@amicic Will this PR + #16290 resolve the race condition? or do we require more changes?

#16290 should fix a race and some problems related to walking VT stack etc, but I don't think it will fix problems with VT list (what appears more to be we GC a live VT object)

@gacholio
Copy link
Contributor

gacholio commented Nov 9, 2022

jenkins test sanity zlinux jdk19

@gacholio gacholio merged commit 78db7ef into eclipse-openj9:master Nov 10, 2022
babsingh added a commit to babsingh/aqa-tests that referenced this pull request Nov 21, 2022
babsingh added a commit to babsingh/aqa-tests that referenced this pull request Nov 21, 2022
eclipse-openj9/openj9#16212 was fixed by
1. eclipse-openj9/openj9#16290; and
2. eclipse-openj9/openj9#16293.

eclipse-openj9/openj9#16275 is a duplicate of
eclipse-openj9/openj9#16212.

eclipse-openj9/openj9#16229 was fixed by eclipse-openj9/openj9#16323.

FramePop/framepop02 fails with another issue, which is reported in
eclipse-openj9/openj9#16346.

Signed-off-by: Babneet Singh <[email protected]>
Mesbah-Alam pushed a commit to adoptium/aqa-tests that referenced this pull request Nov 22, 2022
eclipse-openj9/openj9#16212 was fixed by
1. eclipse-openj9/openj9#16290; and
2. eclipse-openj9/openj9#16293.

eclipse-openj9/openj9#16275 is a duplicate of
eclipse-openj9/openj9#16212.

eclipse-openj9/openj9#16229 was fixed by eclipse-openj9/openj9#16323.

FramePop/framepop02 fails with another issue, which is reported in
eclipse-openj9/openj9#16346.

Signed-off-by: Babneet Singh <[email protected]>

Signed-off-by: Babneet Singh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants