-
Notifications
You must be signed in to change notification settings - Fork 716
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
Crash with value type array element flattening enabled with -Xint #13848
Comments
@tajila @hangshao0 fyi |
We may want to add the test here into the build once the issue is fixed. |
@a7ehuo
|
I could still reproduce the crash with the build mentioned above and also the latest JDKNext build. Attached the class file Archive2.tar.gz.
|
Looking at the info from the description:
The arrayref is |
Most likely there is stall pointer to |
Annabelle didn't save the core for the crash #13848 (comment), she reproduced the crash on her machine and gave me a new core. It is still crashing at the same palce, just with a different stall object pointer value
The stall object pointer (arrayRef) is 0xfffb5030, the forward address 0xffe17400 is the valid object pointer.
From the source code openj9/runtime/vm/BytecodeInterpreter.hpp Lines 6154 to 6175 in d13611e
arrayRef (=0xfffb5030) is read from the stack at line 6154, However, at the time of crash, the value on the stack is already updated to 0xffe17400
|
So at line Concurrent Scavenge seems to be off: It worth mentioning we entered |
Allocate APIs should return valid at the moment object address. The problem should occur after object pointer is received and stored somewhere where next GC can not fix it up (not a root) and invalidate it. |
So if understand this code correctly another GC occur between point
If this is correct refreshing |
And yes, this is the bug: |
Please note that |
I ran the change from #13935. I no longer see the crash with ==== #13935 ====
==== master branch ====
|
In the slow path, loadFlattenableArrayElement() could call into J9AllocateObject() which might trigger GC. Push/pop the array object into/from special frame so that we always have the correct array object. Closes eclipse-openj9#13848 Signed-off-by: Hang Shao <hangshao@ca.ibm.com>
When we create LoadFlattenableArrayElementSymbolRef, openj9/runtime/compiler/compile/J9SymbolReferenceTable.cpp Lines 292 to 294 in 2579502
|
To the best of my knowledge that is correct |
I ran into a crash in
GC_ArrayletObjectModel::getDataSizeInBytes
[1] with the following code [2] when value type array element flattening is enabled (JDK18). It looksclazzPtr
is not a legitJ9Class
. Attached the test code [3].new SingleFieldPrimitive(j)
to create value type arrays is fine but usingnew SingleFieldPrimitive()
causes the crashOptions used
Running the following option without array element flattening is fine
[1]
[2]
[3]
Archive.zip
The text was updated successfully, but these errors were encountered: