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

valhalla: JVM_IsValhallaEnabled is required #16010

Closed
JasonFengJ9 opened this issue Sep 28, 2022 · 3 comments · Fixed by #16019
Closed

valhalla: JVM_IsValhallaEnabled is required #16010

JasonFengJ9 opened this issue Sep 28, 2022 · 3 comments · Fixed by #16019
Assignees
Labels
comp:vm project:valhalla Used to track Project Valhalla related work

Comments

@JasonFengJ9
Copy link
Member

From a local build after resolving merging conflict:

Undefined symbols for architecture x86_64:
  "_JVM_IsValhallaEnabled", referenced from:
      _Java_jdk_internal_misc_ValhallaFeatures_isValhallaEnabled in ValhallaFeatures.o

FYI @hangshao0

@JasonFengJ9 JasonFengJ9 added comp:vm project:valhalla Used to track Project Valhalla related work labels Sep 28, 2022
@hangshao0 hangshao0 self-assigned this Sep 29, 2022
@gacholio
Copy link
Contributor

The implementation will almost certainly not want the leading underscore.

@hangshao0
Copy link
Contributor

There seems to be a merge issue. After adding the method JVM_IsValhallaEnabled(), I get:

Creating java.base.jmod
Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.base/java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:175)
        at java.base/java.lang.invoke.VarHandle$VarHandleDesc$Kind.<clinit>(VarHandle.java:2305)
        at java.base/java.lang.invoke.VarHandle$1.<clinit>(VarHandle.java:2316)
        at java.base/java.lang.invoke.VarHandle$AccessType.accessModeType(VarHandle.java:1691)
        at java.base/java.lang.invoke.VarHandleByteArrayAsInts$ArrayHandle.accessModeTypeUncached(VarHandleByteArrayAsInts.java:97)
        at java.base/java.lang.invoke.VarHandle.accessModeTypeUncached(VarHandle.java:2115)
        at java.base/java.lang.invoke.VarHandle.accessModeType(VarHandle.java:2109)
        at java.base/sun.security.provider.ByteArrayAccess.b2iBig64(ByteArrayAccess.java:101)
        at java.base/sun.security.provider.SHA2.implCompress0(SHA2.java:145)
        at java.base/sun.security.provider.SHA2.implCompress(SHA2.java:123)
        at java.base/sun.security.provider.DigestBase.engineUpdate(DigestBase.java:123)
        at java.base/java.security.MessageDigest$Delegate.engineUpdate(MessageDigest.java:653)
        at java.base/java.security.MessageDigest.update(MessageDigest.java:347)
        at java.base/jdk.internal.module.ModuleHashes.lambda$computeHash$0(ModuleHashes.java:125)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:523)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:512)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at java.base/jdk.internal.module.ModuleHashes.computeHash(ModuleHashes.java:120)
        at java.base/jdk.internal.module.ModuleHashes.generate(ModuleHashes.java:168)
        at java.base/jdk.internal.module.ModuleHashesBuilder.lambda$computeHashes$3(ModuleHashesBuilder.java:120)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.ArrayDeque$DeqSpliterator.forEachRemaining(ArrayDeque.java:848)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:522)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:512)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:239)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at java.base/jdk.internal.module.ModuleHashesBuilder.computeHashes(ModuleHashesBuilder.java:104)
        at jdk.jlink/jdk.tools.jmod.JmodTask$Hasher.computeHashes(JmodTask.java:938)
        at jdk.jlink/jdk.tools.jmod.JmodTask$JmodFileWriter.computeHashes(JmodTask.java:660)
        at jdk.jlink/jdk.tools.jmod.JmodTask$JmodFileWriter.writeModuleInfo(JmodTask.java:591)
        at jdk.jlink/jdk.tools.jmod.JmodTask$JmodFileWriter.write(JmodTask.java:487)
        at jdk.jlink/jdk.tools.jmod.JmodTask.create(JmodTask.java:444)
        at jdk.jlink/jdk.tools.jmod.JmodTask.run(JmodTask.java:198)
        at jdk.jlink/jdk.tools.jmod.Main.main(Main.java:35)
Caused by: java.lang.IllegalArgumentException: not a valid reference type descriptor: Ljava/lang/Object;
        at java.base/java.lang.constant.ClassDescImpl.<init>(ClassDescImpl.java:58)
        at java.base/java.lang.constant.ClassDesc.ofDescriptor(ClassDesc.java:175)
        at java.base/java.lang.constant.ClassDesc.of(ClassDesc.java:81)
        at java.base/java.lang.constant.ConstantDescs.<clinit>(ConstantDescs.java:67)
        ... 41 more

ConstantUtils.skipOverFieldSignature() returns incorrect value on Ljava/lang/Object;. I see there was a recent conflict merge of file ConstantUtils.java. @JasonFengJ9

@JasonFengJ9 JasonFengJ9 changed the title valhalla: _JVM_IsValhallaEnabled is required valhalla: JVM_IsValhallaEnabled is required Sep 29, 2022
@hangshao0
Copy link
Contributor

With the latest commit ibmruntimes/openj9-openjdk-jdk.valuetypes@b4ba016, the ExceptionInInitializerError goes away,

hangshao0 added a commit to hangshao0/openj9 that referenced this issue Sep 29, 2022
Closes eclipse-openj9#16010

Signed-off-by: Hang Shao <hangshao@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm project:valhalla Used to track Project Valhalla related work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants