enso-org / enso

Hybrid visual and textual functional programming.
https://ensoanalytics.com
Apache License 2.0
7.36k stars 323 forks source link

`AssertionError` with `payload Error Error.type UnresolvedSymbol<==>` when executing Base_Tests #11127

Open hubertp opened 1 month ago

hubertp commented 1 month ago

More info has been added to the reported missing polyglot context assertion (#11113) which resulted in

 INFO ide_ci::program::command: cmd ⚠️ Caused by: java.lang.AssertionError: Failed to log failed conversion of null to string and payload Error Error.type UnresolvedSymbol<==>
 INFO ide_ci::program::command: cmd ⚠️  at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.computeMessage(PanicException.java:95)
 INFO ide_ci::program::command: cmd ⚠️  at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.getMessage(PanicException.java:76)
 INFO ide_ci::program::command: cmd ⚠️  at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.toString(PanicException.java:106)
 INFO ide_ci::program::command: cmd ⚠️  at java.base/java.lang.Throwable.<init>(Throwable.java:319)
 INFO ide_ci::program::command: cmd ⚠️  at java.base/java.lang.Exception.<init>(Exception.java:103)
 INFO ide_ci::program::command: cmd ⚠️  at java.base/java.io.IOException.<init>(IOException.java:98)
 INFO ide_ci::program::command: cmd ⚠️  at org.enso.IsolatedClassLoader//org.enso.runner.Main.withProfiling(Main.java:1205)
 INFO ide_ci::program::command: cmd ⚠️  at org.enso.IsolatedClassLoader//org.enso.runner.Main.launch(Main.java:1450)
 INFO ide_ci::program::command: cmd ⚠️  at org.enso.IsolatedClassLoader//org.enso.runner.Main.launch(Main.java:1402)
 INFO ide_ci::program::command: cmd ⚠️  at org.enso.IsolatedClassLoader//org.enso.runner.Main.main(Main.java:1019)
 INFO ide_ci::program::command: cmd ⚠️  at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
 INFO ide_ci::program::command: cmd ⚠️  ... 2 more
 INFO ide_ci::program::command: cmd ⚠️ Caused by: java.lang.AssertionError: No polyglot context is entered. A language or context reference must not be used if there is no polyglot context entered.
 INFO ide_ci::program::command: cmd ⚠️  at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotFastThreadLocals.assertValidGet(PolyglotFastThreadLocals.java:481)
radeusgd commented 3 weeks ago

Not sure if that's useful but I encountered such error on CI:

INFO ide_ci::program::command: bash ⚠️ Exception in thread "main" java.lang.AssertionError: Failed to log failed conversion of null to string and payload Error Error.type UnresolvedSymbol<==>
 INFO ide_ci::program::command: bash ⚠️     at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.computeMessage(PanicException.java:95)
 INFO ide_ci::program::command: bash ⚠️     at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.getMessage(PanicException.java:76)
 INFO ide_ci::program::command: bash ⚠️     at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.toString(PanicException.java:106)
 INFO ide_ci::program::command: bash ⚠️     at java.base/java.lang.Throwable.<init>(Throwable.java:319)
 INFO ide_ci::program::command: bash ⚠️     at java.base/java.lang.Exception.<init>(Exception.java:103)
 INFO ide_ci::program::command: bash ⚠️     at java.base/java.io.IOException.<init>(IOException.java:98)
 INFO ide_ci::program::command: bash ⚠️     at org.enso.runner/org.enso.runner.Main.withProfiling(Main.java:1221)
 INFO ide_ci::program::command: bash ⚠️     at org.enso.runner/org.enso.runner.Main.launch(Main.java:1466)
 INFO ide_ci::program::command: bash ⚠️     at org.enso.runner/org.enso.runner.Main.launch(Main.java:1418)
 INFO ide_ci::program::command: bash ⚠️     at org.enso.runner/org.enso.runner.Main.main(Main.java:1033)
 INFO ide_ci::program::command: bash ⚠️ Caused by: java.lang.AssertionError: No polyglot context is entered. A language or context reference must not be used if there is no polyglot context entered.
 INFO ide_ci::program::command: bash ⚠️     at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotFastThreadLocals.assertValidGet(PolyglotFastThreadLocals.java:481)
 INFO ide_ci::program::command: bash ⚠️     at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotFastThreadLocals$ContextReferenceImpl.get(PolyglotFastThreadLocals.java:513)
 INFO ide_ci::program::command: bash ⚠️     at org.enso.runtime/org.enso.interpreter.runtime.EnsoContext.get(EnsoContext.java:248)
 INFO ide_ci::program::command: bash ⚠️     at org.enso.runtime/org.enso.interpreter.runtime.error.PanicException.computeMessage(PanicException.java:91)
 INFO ide_ci::program::command: bash ⚠️     ... 9 more
JaroslavTulach commented 3 weeks ago

Found a way to reproduce the problem:

from Standard.Base import all

type LM
    V txt

    to_display_text self =
        res = self.txt + " from exception"
        Panic.throw res

main = Panic.throw (LM.V "Hi")

which seems to be fixed by https://github.com/enso-org/enso/pull/11241/commits/a6a858ffa25408c10743aee81c5119cb21b126b6 - reasonable stack is being printed:

Execution finished with an error: Hi from exception
        at <enso> Panic.throw(Internal)
        at <enso> LM.to_display_text(p.enso:8:9-23)
        at <enso> Panic.throw(Internal)
        at <enso> p.main(p.enso:10:8-30)
enso-bot[bot] commented 3 weeks ago

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

Progress: .

Discord
Discord - Group Chat That’s All Fun & Games
Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.
Discord
Discord - Group Chat That’s All Fun & Games
Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.
enso-bot[bot] commented 3 weeks ago

Jaroslav Tulach reports a new STANDUP for today (2024-10-04):

Progress: .

Discord
Discord - Group Chat That’s All Fun & Games
Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.
enso-bot[bot] commented 2 weeks ago

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

Progress: .

radeusgd commented 1 week ago

I think I still managed to get a similar failure: https://github.com/enso-org/enso/actions/runs/11343381383/job/31545811101?pr=11320#step:7:2162

or is that a different case?

GitHub
Add `Meta.engine_version` · enso-org/enso@cbf12d8
Hybrid visual and textual functional programming. Contribute to enso-org/enso development by creating an account on GitHub.
JaroslavTulach commented 1 week ago

I think I still managed to get a similar failure: https://github.com/enso-org/enso/actions/runs/11343381383/job/31545811101?pr=11320#step:7:2162 or is that a different case?

hubertp commented 6 days ago

Still happening:

Error: de_ci::program::command: enso ℹ️ [ERROR] [2024-10-21T09:44:52.382] [org.enso.interpreter.runtime.error.PanicException] Cannot compute message for Error Error.type UnresolvedSymbol<==>
 INFO ide_ci::program::command: enso ℹ️ java.lang.AssertionError: No polyglot context is entered. A language or context reference must not be used if there is no polyglot context entered.
 INFO ide_ci::program::command: enso ℹ️     at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotFastThreadLocals.assertValidGet(PolyglotFastThreadLocals.java:481)
 INFO ide_ci::program::command: enso ℹ️     at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotFastThreadLocals$ContextReferenceImpl.get(PolyglotFastThreadLocals.java:513)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.interpreter.runtime.EnsoContext.get(EnsoContext.java:248)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.interpreter.runtime.error.PanicException.toDisplayText(PanicException.java:122)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.interpreter.runtime.error.PanicExceptionGen$InteropLibraryExports$Uncached.getExceptionMessage(PanicExceptionGen.java:354)
 INFO ide_ci::program::command: enso ℹ️     at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$Delegate.getExceptionMessage(InteropLibraryGen.java:5000)
 INFO ide_ci::program::command: enso ℹ️     at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibrary$Asserts.getExceptionMessage(InteropLibrary.java:4755)
 INFO ide_ci::program::command: enso ℹ️     at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$UncachedDispatch.getExceptionMessage(InteropLibraryGen.java:7642)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.interpreter.runtime.error.PanicException.computeMessage(PanicException.java:87)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.interpreter.runtime.error.PanicException.getMessage(PanicException.java:77)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.runner.Main.handleRun(Main.java:764)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.runner.Main.mainEntry(Main.java:1135)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.runner.Main.lambda$launch$22(Main.java:1479)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.runner.Main.withProfiling(Main.java:1225)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.runner.Main.launch(Main.java:1475)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.runner.Main.launch(Main.java:1426)
 INFO ide_ci::program::command: enso ℹ️     at org.enso.runner.Main.main(Main.java:1041)
 INFO ide_ci::program::command: enso ⚠️ Exception in thread "main" java.lang.IllegalArgumentException: Cause exception must extend AbstractTruffleException but was class java.lang.AssertionError.
 INFO ide_ci::program::command: enso ⚠️     at org.enso.interpreter.runtime.error.PanicExceptionGen$InteropLibraryExports$Uncached.getExceptionMessage(PanicExceptionGen.java:354)
 INFO ide_ci::program::command: enso ⚠️     at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$Delegate.getExceptionMessage(InteropLibraryGen.java:5000)
 INFO ide_ci::program::command: enso ⚠️     at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibrary$Asserts.getExceptionMessage(InteropLibrary.java:4755)
 INFO ide_ci::program::command: enso ⚠️     at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$UncachedDispatch.getExceptionMessage(InteropLibraryGen.java:7642)
 INFO ide_ci::program::command: enso ⚠️     at org.enso.interpreter.runtime.error.PanicException.computeMessage(PanicException.java:87)
 INFO ide_ci::program::command: enso ⚠️     at org.enso.interpreter.runtime.error.PanicException.getMessage(PanicException.java:77)
 INFO ide_ci::program::command: enso ⚠️     at org.enso.runner.Main.handleRun(Main.java:764)
 INFO ide_ci::program::command: enso ⚠️     at org.enso.runner.Main.mainEntry(Main.java:1135)
 INFO ide_ci::program::command: enso ⚠️     at org.enso.runner.Main.lambda$launch$22(Main.java:1479)
 INFO ide_ci::program::command: enso ⚠️     at org.enso.runner.Main.withProfiling(Main.java:1225)
 INFO ide_ci::program::command: enso ⚠️     at org.enso.runner.Main.launch(Main.java:1475)
 INFO ide_ci::program::command: enso ⚠️     at org.enso.runner.Main.launch(Main.java:1426)
 INFO ide_ci::program::command: enso ⚠️     at org.enso.runner.Main.main(Main.java:1041)
TRACE ide_ci::program::command: enso ⚠️ <ENDUT>

https://github.com/enso-org/enso/actions/runs/11435268254/job/31810327386

GitHub
Copying and pasting in Grid fixes. (#11332) · enso-org/enso@fa87a18
Hybrid visual and textual functional programming. Contribute to enso-org/enso development by creating an account on GitHub.
JaroslavTulach commented 3 days ago

The latest change #11393 is trying to extract as much information from

[org.enso.interpreter.runtime.error.PanicException] Cannot compute message for Error Error.type UnresolvedSymbol<==>

as possible. E.g. print out the location of the error including type of the node. That's certainly not a fix, but may get us further in the investigation.