Closed JasonFengJ9 closed 1 year ago
@a7ehuo Any luck reproducing the problem with the updated options?
Although we can't reproduce the issue with a log file on VirtualThread.parkNanos(J)V
, we found a partial JIT log file (quit early because of shutdown) in a passed run that has over 200 inlined methods, which is similar to the scenario in a failed run. The log shows after partialRedundancyElimination
, Thread.currentThread
is stored to a temp #2515
and later on is written to AbstractOwnableSynchronizer.exclusiveOwnerThread
[1]. It was a virtual thread when it was stored to #2515.
It would be an issue if it was changed to a carrier thread in between. This finding in the log confirms the scenario that @tajila suspected that Thread.currentThread
was cached. @fengxue-IS in the comment and @0xdaryl pointed out currentThread sym ref set as immutableField. As the log shows, it could be an issue.
Two grinders are currently running. At the moment no failure is observed.
Thread.currentThread
(Grinder 31825
): Iteration 30xsetImmutableField
on currentThread sym ref (Grinder 31840
): Iteration 30xMeanwhile, I'm also running tests to verify a proper fix.
[1]
n8505n BBStart <block_609> (freq 178) [ 0x775746bb5230] bci=[-1,6,523] rc=0 vc=1528 vn=- li=-1 udi=- nc=0
n20491n astore <temp slot 101>[#2515 Auto] [flags 0x7 0x0 ] [ 0x77574481f4b0] bci=[-1,6,523] rc=0 vc=1528 vn=- li=-1 udi=1 nc=1
n34n aload CurrentThread[#318 MethodMeta +168] [flags 0x207 0x400 ] [ 0x775746004430] bci=[-1,6,523] rc=2 vc=1528 vn=- li=- udi=- nc=0
n43n ifacmpne --> block_3 BBStart at n41n () [ 0x775746004700] bci=[-1,10,523] rc=0 vc=1528 vn=- li=-1 udi=- nc=2 flg=0x20
n34n ==>aload
n40n aload this<'this' parm Ljava/lang/VirtualThread;>[#396 Parm] [flags 0x40000107 0x0 ] (X!=0 ) [ 0x775746004610] bci=[-1,9,523] rc=1 vc=1528 vn=- li=- udi=694 nc=0 flg=0x4
n30n BBEnd </block_609> =====
...
...
....
n14436n BBStart <block_1184> (freq 108) [ 0x775745ec9010] bci=[181,19,234] rc=0 vc=1528 vn=- li=-1 udi=- nc=0
n14432n awrtbari java/util/concurrent/locks/AbstractOwnableSynchronizer.exclusiveOwnerThread Ljava/lang/Thread;[#1910 Shadow +24] [flags 0x80607 0x0 ] (X!=0 ) [ 0x775745ec8ed0] bci=[184,2,74] rc=0 vc=1528 vn=- li=-1 udi=- nc=3 flg=0x24
n14430n aload <temp slot 3>[#2277 Auto] [flags 0x20000007 0x0 ] (X!=0 X>=0 ) [ 0x775745ec8e30] bci=[184,0,74] rc=2 vc=1528 vn=- li=- udi=824 nc=0 flg=0x104
n14431n aload <temp slot 101>[#2515 Auto] [flags 0x7 0x0 ] (X!=0 ) [ 0x775745ec8e80] bci=[184,1,74] rc=1 vc=1528 vn=- li=- udi=825 nc=0 flg=0x4
n14430n ==>aload
n17386n BBEnd </block_1184> =====
Grinder run results:
Disable recognizing Thread.currentThread (Grinder 31825): Iteration 30x
29 tests, 29 ok, 0 not ok
: One run exit unexpectedly. It does not look related to PinALot.java
test
java/lang/invoke/defineHiddenClass/BasicTest.java false BasicTest
TEST RESULT: Failed. Unexpected exit from test [exit code: 143]
Remove setImmutableField on currentThread sym ref (Grinder 31840): Iteration 30x
29 tests, 28 ok, 1 not ok
: One run exit unexpectedly. One run with failed tests. They don't look related to PinALot.java
test
(1)
Test finished: java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java: Failed. Unexpected exit from test [exit code: 143]
...
Test finished: java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java: Error. Agent communication error: java.io.EOFException; check console log for any additional details
(2)
Failed test cases:
TEST: java/lang/annotation/Missing/MissingArrayElement/MissingEnumArrayElementTest.java
TEST: java/lang/CompressExpandTest.java
TEST: java/lang/System/LoggerFinder/modules/JDKLoggerForJDKTest.java
TEST: java/lang/System/LoggerFinder/modules/LoggerInImageTest.java
TEST: java/lang/System/LoggerFinder/modules/NamedLoggerForImageTest.java
TEST: java/lang/System/LoggerFinder/modules/NamedLoggerForJDKTest.java
Test results: passed: 855; failed: 4; error: 2
java/lang/annotation/Missing/MissingArrayElement/MissingEnumArrayElementTest.java: getAnnotation() throws an ArrayStoreException when the annotation class not present
I don't find any issues covering those failures. They appear to be new failures we haven't seen before, which makes it likely they are introduced by the change.
@JasonFengJ9 @fengxue-IS Have you seen the failures Annabelle posted above?
java/lang/annotation/Missing/MissingArrayElement/MissingEnumArrayElementTest.java: getAnnotation() throws an ArrayStoreException when the annotation class not present
This is new.
Test finished: java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java: Failed. Unexpected exit from test [exit code: 143] Test finished: java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java: Error. Agent communication error: java.io.EOFException; check console log for any additional details
No existing issue, the console log might have more info.
Have not seen these issues previously
I don't find any issues covering those failures. They appear to be new failures we haven't seen before, which makes it likely they are introduced by the change.
For @a7ehuo's "change 2" above, this is not functionally equivalent to what she actually implemented. "Change 2" simply removed the "immutability" setting on the field which isn't completely correct. However, her PR correctly removes it and marks it "volatile" instead.
It is probably worth running a 30x grinder with the actual PR to verify it is clean.
It is probably worth running a 30x grinder with the actual PR to verify it is clean.
Sounds good! I'll start the grinder runs
An update on the grinder run results:
PR change: Grinder ID 31905
Cancelling nested steps due to timeout
”.master branch: Grinder ID 31906
PinALot.java
master branch excluding test PinALot.java
: Grinder ID 31909
“make[3]: *** [jdk_lang_1] Error 143"
**, which looks similar to one of the failures observed in previous Grinder runs with the experimentsAnother grinder on jdk_lang_1
with the PR #17009 change: Grinder ID 31915
. 30x, all passed
Thanks @a7ehuo.
If I have this right, the summary is:
master
)master
.@pshipton : I think we're ready to merge this.
Re-opening until fixed in 0.37.
Closing since https://github.com/eclipse-openj9/openj9/pull/17021 is merged for 0.37
Failure link
From an internal build(
rhel8le-rt1-4
):Rerun in Grinder - Change TARGET to run only the failed test targets.
Optional info
Failure output (captured from console output)
50x internal grinder - 18/100 failed