HotswapProjects / openjdk-jdk11u-dcevm

Dcevm11 sources, binaries are available at https://travis-ci.org/TravaOpenJDK/trava-jdk-11-dcevm
GNU General Public License v2.0
30 stars 10 forks source link

Invalid layout of java.lang.StackFrameInfo field #6

Closed ebourg closed 4 years ago

ebourg commented 4 years ago

I've built DCEVM 11.0.5+5 in Debian, but it fails to start with the following error (using OpenJDK 11.0.6+10):

$ java -dcevm -version
[0.009s][error][class] Invalid layout of java.lang.StackFrameInfo field: bci type: S
Error occurred during initialization of VM
Invalid layout of preloaded class: use -Xlog:class+load=info to see the origin of the problem class
skybber commented 4 years ago

What version do you need for Ubuntu? Last tag on adopt branch is 11.0.7+6 :

https://github.com/AdoptOpenJDK/openjdk-jdk11u/commits/master

ebourg commented 4 years ago

Debian and Ubuntu follow the GA releases:

https://wiki.openjdk.java.net/display/JDKUpdates/JDK11u

Currently it's 11.0.6+10. OpenJDK 11.0.7 will be released next month.

skybber commented 4 years ago

There is new a branch dcevm11-jdk-11.0.6. It should be checked if it is stable enough.

ebourg commented 4 years ago

Thank you, I'll give it a try.

ebourg commented 4 years ago

It doesn't compile unfortunately (using GCC 9):

* For target hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link:
/usr/bin/ld: /build/openjdk-11-jre-dcevm-11.0.6+1/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/jvmtiEnhancedRedefineClasses.o: in function `VM_EnhancedRedefineClasses::calculate_instance_update_information(Klass*)::CalculateFieldUpdates::do_field(fieldDescriptor*)':
/build/openjdk-11-jre-dcevm-11.0.6+1/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp:1232: undefined reference to `fieldDescriptor::offset() const'
/usr/bin/ld: /build/openjdk-11-jre-dcevm-11.0.6+1/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp:1241: undefined reference to `fieldDescriptor::signature() const'
/usr/bin/ld: /build/openjdk-11-jre-dcevm-11.0.6+1/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp:1243: undefined reference to `fieldDescriptor::field_type() const'
/usr/bin/ld: /build/openjdk-11-jre-dcevm-11.0.6+1/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp:1243: undefined reference to `fieldDescriptor::offset() const'
/usr/bin/ld: /build/openjdk-11-jre-dcevm-11.0.6+1/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp:1245: undefined reference to `fieldDescriptor::offset() const'
/usr/bin/ld: /build/openjdk-11-jre-dcevm-11.0.6+1/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp:1245: undefined reference to `fieldDescriptor::offset() const'
/usr/bin/ld: /build/openjdk-11-jre-dcevm-11.0.6+1/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp:1250: undefined reference to `fieldDescriptor::set_is_field_modification_watched(bool)'
/usr/bin/ld: /build/openjdk-11-jre-dcevm-11.0.6+1/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp:1251: undefined reference to `fieldDescriptor::set_is_field_access_watched(bool)'
skybber commented 4 years ago

I've checked the problem, the offset method is inline and did not change for more then 1 year:

1232: int alignment = fd->offset() - _position;

skybber commented 4 years ago

Looks fixed now, there was some change in include hiearchy: https://travis-ci.org/TravaOpenJDK/trava-jdk-11-dcevm

skybber commented 4 years ago

Look there is another bug. Please don't release it .

skybber commented 4 years ago

It can be released. I have problem with non static inner classes, but it has been in the DCEVM for years. Looks that bytecode verifier could be turned off on redefinition to not have this problems.

ruediste commented 4 years ago

@skybber: any news on this latest problem?

skybber commented 4 years ago

Bytecode verifier is turned off now in redefinition no, to not have problems with inner classes. So it is fixed.

ebourg commented 4 years ago

I confirm it's ok now, thank you.

arjunpidugu642 commented 2 years ago

We got similar issue and below are the details.

Error Message :
""" [0.048s][error][class] Invalid layout of java.lang.StackFrameInfo field: bci type: I Error occurred during initialization of VM Invalid layout of well-known class: use -Xlog:class+load=info to see the origin of the problem class """

JDK Version: 11.0.13+8 (build 11.0.13+8)

Windows OS : 10.

Type of Machine : VM

Observations: Issue is very sporadic .

What could be the root cause for this and can anyone help me on this?