-
Notifications
You must be signed in to change notification settings - Fork 121
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
ClosedFileSystemException caused by null in ZipFileSystem.ensureOpen in IntelliJ 2024.2 with Azul JDK for project and Temurin JDK for compile server #1383
Comments
Since Maven also uses Zinc through scala-maven-plugin`, it might be possible to reproduce the exception by just using Maven in the terminal with the JetBrains JDK as above. |
And... No. |
If this doesn't happen on Zulu or Eclipse Temurin, I don't think we'd work on this issue. If there's some logical error in the concurrency handling, we'd be happy to review pull requests though. |
@eed3si9n Oh ! |
@eed3si9n so, fresh linux user, fresh clone, fresh install of intellij, fresh everything. I can't test setting JBR as a scala compile server JDK because then I get a So I don't know if the problem is in IntelliJ or zinc, but I does not seems to be directly linked to JBR. |
For any guys investigating the issue but got hit with the following error when running
Try first do a |
@fanf May I ask if the issue is reproducible on Apple Silicon MacBooks? I am trying to reproduce the issue but I am stuck with the last step "try a compilation: CTRL+F9 : it fails with compilation errors.". When I click Build -> Build Project, nothing happens on my M1 Mac. Update: I resolved the issue of Build -> Build Project having no response. I just disabled all non essential downloaded IDE plugins. However on my M1 Mac, "Build Project" succeeded.... I guess a Linux machine is needed to debug the issue then. Update 2: I clicked "Build Project" for several times and I reproduced the same stack trace! I shall start my investigation. So apparently the issue is flaky... Further suggesting that the thread safety hypothesis might be true.
|
@vasilmkd May I ask if it is possible to access the source code of Here's my interim hypothesis of the issue. Never mind, |
@Friendseeker : the keyboard shortcut should be just an alias for "build project", so perhaps the problem somehow depends on some local properties. For reference, even if it likely won't help, I use a Lenovo t14s amd gen 3 with a Ryzen 7 PRO 6850U a'd I use Archlinux. |
It really feels like a threadsafety issue : the fact that maven (which is seldom parallelized) works, the very similar bug /stack trace linked in the top post that says it was becausethe classpath resource manager wasn't threadsafe, the flakiness, the fact that it used to work with previous intellij version... Also, it only happens in the "rudder-web" subproject, which has several unique properties :
|
Hi 👋🏻 In I assume this will make the exception go away? |
Computers are complicated. So, I tried what @vasilmkd suggested (unchecked the But the effect is that it fails earlier. But not in the first or second module either : The stacktraces look identical. |
I mean, as long as all of the dependencies for Can you please confirm that's the case in the screenshot above? |
Yes totally, the dependency path is OK. |
@fanf I messaged you on Discord, let's please discuss some details there. Thank you! |
Dropping these 3 links just in case, I haven't been able to make any conclusions yet. |
Debugging the issue, the "zip" file in question which throws the This is a really strange issue. I honestly have no clue what we might be doing in IDEA that could be causing this. Any ideas are greatly appreciated. |
But these Which matches
|
When the JDK running the Zinc compiler differs from the Project JDK, then Zinc is instantiated with an instance of |
steps
git clone https://github.com/Normation/rudder.git
rudder/webapp/sources
and run./rudder/rudder-web/src/main/build.sh
to init the js/css env so that to avoid latter compilation errors unrelated to the problempath_of_clone/rudder/webapp/sources/pom.xml
Project Structure... > Platform Settings > SDK
, then+
and select the path to the previous root directories of the SDK ; then in "Project Settings > Project", choose either azul or jbr SDK ; Set the language level to17
Zinc
inSettings... > Build, Exec, Deploy > Compiler > Scala Compiler
top of the screen.Settings... > Build, Exec, Deploy > Compiler > Scala Compiler > Scala Compile Server
thenJVM > JDK
and change stack size to-Xss8m
;If you change the incremental compiler to
IDEA
it works. It used to work with IntelliJ 2024.1.x. It works if Temurin is chosen.problem
Note: I started by opening a ticket on JetBrains bug tracker (https://youtrack.jetbrains.com/issue/SCL-22939), but the root cause might be in Zinc thus that ticket too.
The compilation fails on the last project (
rudder-web
) with two stack traces which seems to indicate that the problem might be in Zinc (see at the end).I found an other project which had a very similar problem: jobrunr/jobrunr#427
The cause was that the classpath resource manager was not thread safe as show in the correction: jobrunr/jobrunr@248e098
Exception 1 :
Exception 2 :
The text was updated successfully, but these errors were encountered: