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

ERROR Backend Internal error: Exception during psi2ir in cpg-console #1591

Closed
yaoyue123 opened this issue Jun 17, 2024 · 5 comments · Fixed by #1592
Closed

ERROR Backend Internal error: Exception during psi2ir in cpg-console #1591

yaoyue123 opened this issue Jun 17, 2024 · 5 comments · Fixed by #1592
Assignees

Comments

@yaoyue123
Copy link

yaoyue123 commented Jun 17, 2024

Running into problems when going through https://github.com/Fraunhofer-AISEC/cpg/blob/main/tutorial.md

Preparation:
run (Java, C/C++)configure_frontends.sh
compiled via (run into ./gradlew :cpg-console:installDist
use cmd cpg-console/build/install/cpg-console/bin/cpg-console

Tutorial:
[1] :tr cpg-language-java/src/test/resources/calls/Calls.java

get error

~/workspace/project/cpg ❯ cpg-console/build/install/cpg-console/bin/cpg-console                                                                                                                                                   1m 50s Py base a402@a402-debian 16:37:12
ki-shell 0.5.3-SNAPSHOT/2.0.0
type :h for help
[0] :tr cpg-language-java/src/test/resources/calls/Calls.java
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_2.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_2.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_2.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_3.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_3.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_3.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_4.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_4.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_4.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_5.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_5.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_5.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_6.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_6.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_6.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_7.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_7.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_7.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_8.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_8.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_8.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_9.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_9.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_9.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_10.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_10.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_10.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Unresolved reference: byName (Line_11.kts:1:38)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_12.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_12.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_12.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)
ERROR Backend Internal error: Exception during psi2ir
File being compiled: Line_13.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178) (Line_13.kts): org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during psi2ir
File being compiled: Line_13.kts
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.util.SymbolTableSlice$Scoped.noScope(SymbolTableSlice.kt:178)

Any help appreciated

@oxisto
Copy link
Member

oxisto commented Jun 18, 2024

Oh oh, this might be a problem after our upgrade to Kotlin 2.0. I will investigate this.

@oxisto oxisto self-assigned this Jun 18, 2024
@oxisto
Copy link
Member

oxisto commented Jun 18, 2024

Related to Kotlin/kotlin-interactive-shell#131

oxisto added a commit that referenced this issue Jun 18, 2024
It seems that the kotlin shell is not (yet) compatbile with Kotlin 2.0. However, it seems that we can just use the scripting host from Kotlin 1.9 and it seems to work.

Fixes #1591
Related to Kotlin/kotlin-interactive-shell#131
@oxisto
Copy link
Member

oxisto commented Jun 18, 2024

@yaoyue123 The PR #1592 should close this issue. Can you try it?

@yaoyue123
Copy link
Author

Thank you very much! The issue has been resolved.

image

@oxisto
Copy link
Member

oxisto commented Jun 18, 2024

Thanks. I'll keep it open as long as the PR is not yet merged into main. GitHub actions will close it automatically then.

@oxisto oxisto reopened this Jun 18, 2024
@oxisto oxisto closed this as completed in 45a646d Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants