Unsynchronized access to a WeakHashMap causes endless loop and deadlock-like behavior. A synchronization of the map, or use a combination of ConcurrentHashMap and WeakHashMap should solve the problem.
My application uses GraalVM to run JavaScript code snippets. I have 8 threads running JavaScript code. Each of these 8 threads has its own context, but shares an engine. In the thread dump, these ...