Skip to content

Graal.js: java.lang.IllegalStateException: Multi threaded access requested by thread #351

Description

@thurka

Describe the bug

Attached Guest Language Frames (1)
Caused: java.lang.IllegalStateException: Multi threaded access requested by thread Thread[AWT-EventQueue-0,6,main] but is not allowed for language(s) js.
	at com.oracle.truffle.polyglot.PolyglotEngineException.illegalState(PolyglotEngineException.java:132)
	at com.oracle.truffle.polyglot.PolyglotContextImpl.throwDeniedThreadAccess(PolyglotContextImpl.java:724)
	at com.oracle.truffle.polyglot.PolyglotContextImpl.checkAllThreadAccesses(PolyglotContextImpl.java:624)
	at com.oracle.truffle.polyglot.PolyglotContextImpl.enterThreadChanged(PolyglotContextImpl.java:523)
	at com.oracle.truffle.polyglot.PolyglotEngineImpl.enter(PolyglotEngineImpl.java:1805)
	at com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:101)
	at com.oracle.truffle.api.impl.DefaultCallTarget.callDirectOrIndirect(DefaultCallTarget.java:84)
	at com.oracle.truffle.api.impl.DefaultCallTarget.call(DefaultCallTarget.java:99)
	at com.oracle.truffle.api.impl.DefaultRuntimeAccessor$DefaultRuntimeSupport.callProfiled(DefaultRuntimeAccessor.java:119)
	at com.oracle.truffle.polyglot.PolyglotValue$InteropValue.canInvoke(PolyglotValue.java:2807)
	at org.graalvm.polyglot.Value.canInvokeMember(Value.java:526)
	at com.oracle.truffle.polyglot.hostadapters.HostAdapterServices.hasMethod(HostAdapterServices.java:115)
	at com.oracle.truffle.polyglot.hostadapters.ItemValueFormatterInterface$$Adapter.formatValue(Unknown Source)
	at org.graalvm.visualvm.modules.tracer.dynamic.impl.ItemValueFormatterProxy.formatValue(ItemValueFormatterProxy.java:48)
	at org.graalvm.visualvm.modules.tracer.impl.timeline.items.ValueItemDescriptor.getValueString(ValueItemDescriptor.java:62)
	at org.graalvm.visualvm.modules.tracer.impl.timeline.TimelineSupport$3.getRowValue(TimelineSupport.java:241)
	at org.graalvm.visualvm.modules.tracer.impl.timeline.TimelineTooltipPainter.update(TimelineTooltipPainter.java:86)
	at org.graalvm.visualvm.modules.tracer.impl.timeline.TimelineTooltipOverlay.updateTooltip(TimelineTooltipOverlay.java:228)
	at org.graalvm.visualvm.modules.tracer.impl.timeline.TimelineTooltipOverlay.access$000(TimelineTooltipOverlay.java:58)
	at org.graalvm.visualvm.modules.tracer.impl.timeline.TimelineTooltipOverlay$1.run(TimelineTooltipOverlay.java:88)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

To Reproduce
Steps to reproduce the behavior:

  1. run VisualVM on JDK 15+
  2. use Graal.js to run Tracer
  3. Java I/O , Java Files Utilization prove
  4. Display tooltip
  5. See error

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions