alibaba / transmittable-thread-local

📌 a missing Java std lib(simple & 0-dependency) for framework/middleware, provide an enhanced InheritableThreadLocal that transmits values between threads even using thread pooling components.
https://github.com/alibaba/transmittable-thread-local
Apache License 2.0
7.69k stars 1.69k forks source link

graalvm TraversingBlockingQueue ArrayStoreException #635

Open imhun opened 7 months ago

imhun commented 7 months ago

ttl 2.14.5, use agent graalvm-js:23.0 when run js script, Occasionally the following error occurs:

Caused by: org.graalvm.polyglot.PolyglotException: java.lang.ArrayStoreException: com.alibaba.ttl.TtlRunnable
    at java.base/java.util.concurrent.LinkedBlockingDeque.toArray(LinkedBlockingDeque.java:963)
    at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.TraversingBlockingQueue.toArray(TraversingBlockingQueue.java:214)
    at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue.getQueuedTargets(BackgroundCompileQueue.java:216)
    at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.flushCompileQueue(GraalRuntimeSupport.java:275)
    at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotEngineImpl.ensureClosed(PolyglotEngineImpl.java:1259)
    at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.closeAndMaybeWait(PolyglotContextImpl.java:1643)
    at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.close(PolyglotContextImpl.java:1565)
    at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextDispatch.close(PolyglotContextDispatch.java:73)
    at org.graalvm.sdk/org.graalvm.polyglot.Context.close(Context.java:835)
    at org.graalvm.sdk/org.graalvm.polyglot.Context.close(Context.java:861)
    at com.byteplan.data.yunhua.script.JavaScriptHelper.eval(JavaScriptHelper.java:160)
oldratlee commented 7 months ago

@imhun Please give a simple runnable reproducible demo