Skip to content
New issue

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

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

Already on GitHub? # to your account

Issues with AtomicReferenceFieldUpdater #406

Closed
OlegIlyenko opened this issue May 6, 2018 · 2 comments
Closed

Issues with AtomicReferenceFieldUpdater #406

OlegIlyenko opened this issue May 6, 2018 · 2 comments
Assignees

Comments

@OlegIlyenko
Copy link

I tried to use GraalVM CE 1.0.0-rc1 in a scala project but faced an issue with AtomicReferenceFieldUpdater which is used in scala's TrieMap.

I prepared a very minimal repository that reproduces the issue and contains more info (including the compiled image and verbose output from native-image):

https://github.com/OlegIlyenko/graalvm-sangria-test

The native-image is compiled successfully, but when the executable is run, it throws following exception:

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.lang.Throwable.<init>(Throwable.java:310)
	at java.lang.Exception.<init>(Exception.java:102)
	at java.lang.ReflectiveOperationException.<init>(ReflectiveOperationException.java:89)
	at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:72)
	at com.oracle.svm.reflect.proxies.Proxy_1_Main_main.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:199)
	at Lcom/oracle/svm/core/code/CEntryPointCallStubs;.com_002eoracle_002esvm_002ecore_002eJavaMainWrapper_002erun_0028int_002corg_002egraalvm_002enativeimage_002ec_002etype_002eCCharPointerPointer_0029(generated:0)
Caused by: java.lang.InternalError
	at java.lang.Throwable.<init>(Throwable.java:250)
	at java.lang.Error.<init>(Error.java:58)
	at java.lang.VirtualMachineError.<init>(VirtualMachineError.java:43)
	at java.lang.InternalError.<init>(InternalError.java:42)
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:94)
	at sun.reflect.misc.ReflectUtil.ensureMemberAccess(ReflectUtil.java:103)
	at java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.<init>(AtomicReferenceFieldUpdater.java:327)
	at java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater(AtomicReferenceFieldUpdater.java:110)
	at scala.collection.concurrent.TrieMap.<init>(TrieMap.scala:647)
	at scala.collection.concurrent.TrieMap.<init>(TrieMap.scala:652)
	at scala.collection.concurrent.TrieMap$.empty(TrieMap.scala:981)
	at scala.collection.concurrent.TrieMap$.empty(TrieMap.scala:976)
	at scala.collection.generic.MutableMapFactory.newBuilder(MutableMapFactory.scala:30)
	at scala.collection.generic.GenMapFactory.apply(GenMapFactory.scala:48)
	at sangria.validation.SchemaBasedDocumentAnalyzer.<init>(SchemaBasedDocumentAnalyzer.scala:17)
	at sangria.validation.ValidationContext.<init>(QueryValidator.scala:136)
	at sangria.validation.RuleBasedQueryValidator.validateQuery(QueryValidator.scala:61)
	at sangria.execution.Executor.$anonfun$execute$1(Executor.scala:79)
	at sangria.execution.Executor$$Lambda$461/1872166244.apply(Unknown Source)
	at sangria.execution.TimeMeasurement$.measure(TimeMeasurement.scala:8)
	at sangria.execution.Executor.execute(Executor.scala:79)
	at sangria.execution.Executor$.execute(Executor.scala:199)
	at Main$.main(Main.scala:17)
	at Main.main(Main.scala)
	... 4 more
@cstancu
Copy link
Member

cstancu commented May 16, 2018

@OlegIlyenko the AtomicReferenceFieldUpdater issue should be fixed in 3a120f4. You can build from source to get the fix.

@cstancu cstancu closed this as completed May 16, 2018
@OlegIlyenko
Copy link
Author

Awesome, thanks a lot! 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants