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

Yield UnsupportedMessageException when context isn't accessible #11334

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Oct 16, 2024

Pull Request Description

More robust fix for #11127 as it turns out #11241 is insufficient.

Important Notes

@radeusgd has observed yet another error related to lazy evaluation of computeMessage:

️java.lang.AssertionError: No polyglot context is entered. A language or context reference must not be used if there is no polyglot context entered.
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotFastThreadLocals.assertValidGet(PolyglotFastThreadLocals.java:481)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotFastThreadLocals$ContextReferenceImpl.get(PolyglotFastThreadLocals.java:513)
at org.enso.runtime/org.enso.interpreter.runtime.EnsoContext.get(EnsoContext.java:248)
at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.toDisplayText(PanicException.java:120)
at org.enso.runtime/org.enso.interpreter.runtime.error.PanicExceptionGen$InteropLibraryExports$Uncached.getExceptionMessage(PanicExceptionGen.java:354)
at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$Delegate.getExceptionMessage(InteropLibraryGen.java:5000)
at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibrary$Asserts.getExceptionMessage(InteropLibrary.java:4755)
at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$UncachedDispatch.getExceptionMessage(InteropLibraryGen.java:7642)
at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.computeMessage(PanicException.java:87)
at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.getMessage(PanicException.java:77)
at org.enso.runner/org.enso.runner.Main.handleRun(Main.java:764)
at org.enso.runner/org.enso.runner.Main.mainEntry(Main.java:1134)
at org.enso.runner/org.enso.runner.Main.lambda$launch$22(Main.java:1477)
at org.enso.runner/org.enso.runner.Main.withProfiling(Main.java:1224)
at org.enso.runner/org.enso.runner.Main.launch(Main.java:1473)
at org.enso.runner/org.enso.runner.Main.launch(Main.java:1425)
at org.enso.runner/org.enso.runner.Main.main(Main.java:1040)

even the handleRun tries to "force computation of the exception message sooner than context is closed" it is still not enough. Let's make the PanicException more robust.

Anyway, the real problem is escaping panic exception and it has been reported to GraalVM.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Java,
  • No existing tests are affected and we don't have a reproducer yet.

@JaroslavTulach JaroslavTulach merged commit 7b23f77 into develop Oct 16, 2024
41 checks passed
@JaroslavTulach JaroslavTulach deleted the wip/jtulach/MoreRobust11127 branch October 16, 2024 12:14
@enso-bot
Copy link

enso-bot bot commented Oct 17, 2024

Jaroslav Tulach reports a new STANDUP for yesterday (2024-10-16):

Progress: .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants