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

helm-values idea plugin deadlock on IntelliJ IDEA 2022.3.2 #64

Closed
gsaukov opened this issue Feb 21, 2023 · 8 comments
Closed

helm-values idea plugin deadlock on IntelliJ IDEA 2022.3.2 #64

gsaukov opened this issue Feb 21, 2023 · 8 comments
Labels
bug Something isn't working intellij Intellij plugin
Milestone

Comments

@gsaukov
Copy link

gsaukov commented Feb 21, 2023

Hi!

Intellij IDEA constantly hangs (i suspect during index scan) after some time of usage of a large project. Disabling the plugin solves the issue.
It seems like it was not reproducible with previous IDEA 2021.
threadDump-20230221-115555.txt

Intellij IDEA Build #IU-223.8617.56, built on January 26, 2023
Runtime version: 17.0.5+1-b653.25 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Apple M1 Max Mac OS Ventura 13.1

@gsaukov gsaukov changed the title Deadlock on IntelliJ IDEA 2022.3.2 helm-values idea plugin deadlock on IntelliJ IDEA 2022.3.2 Feb 21, 2023
@gsaukov
Copy link
Author

gsaukov commented Feb 21, 2023

Perhaps this happens due to symlink ref.
Based on info from Mostafa Nagib from IDEA plugin review page.

@fstaudt
Copy link
Owner

fstaudt commented Feb 26, 2023

Hello @gsaukov

thanks for reporting the issue, I'll look into it.

Do you have an example of large project (preferably open source) where the issue can be reproduced ?

Could you also provide more info on usage of symlink refs in helm charts?
Feedback provided in plugin review page was unclear.

Thx in advance !

@fstaudt fstaudt added bug Something isn't working intellij Intellij plugin labels Feb 26, 2023
@gsaukov
Copy link
Author

gsaukov commented Feb 28, 2023

Hi @fstaudt,

I have tried to reproduce this bug with symlink and some of my private project but i could not.
Unfortunately I cannot share the project that has the issue with you or provide much details about because it is corporate project and I'm not allowed to share it.

So perhaps it is a false positive error.

You may close the bug or keep it open so someone can add details or steps to reproduce.
Ssorry for any inconvenience.

fstaudt added a commit that referenced this issue Mar 25, 2023
Search for VirtualFile is currently done at each execution of getSchemaFile.
It could be done only once when instance is created.

Relates #64
fstaudt added a commit that referenced this issue Mar 25, 2023
Search for Helm charts should ignore symlink directories to escape potential infinite loops.
This could happen if symlinks are creating a loop of directories.

Relates #64
fstaudt added a commit that referenced this issue Mar 26, 2023
Actions for current chart should only be enabled for chart directory, values.yaml & Chart.yaml.

Relates #64
fstaudt added a commit that referenced this issue Mar 26, 2023
Actions for current chart should only be enabled for chart directory, values.yaml & Chart.yaml.

Relates #64
@fstaudt
Copy link
Owner

fstaudt commented Mar 26, 2023

@gsaukov ,

I've made some performance improvements on JsonSchema providers with release 0.6.1.

Please let me know if latest version of the plugin has improved the situation on your side.
If there is any information that you can share about your project that could help me track the issue, please let me know.

@gsaukov
Copy link
Author

gsaukov commented Mar 27, 2023

@fstaudt
Hi, it is still 0.6.0 in Idea's market place.

@fstaudt
Copy link
Owner

fstaudt commented Mar 27, 2023

@gsaukov

release 0.6.1 was done yesterday in github.

It takes a few days to be available for update.

@gsaukov
Copy link
Author

gsaukov commented Apr 5, 2023

Hi @fstaudt

Same thing 0.6.1, it crashes almost immediately on idea start.

The project that crashes is SAP commerce, it is very large JAVA monolith.
You may find IDEA log and thread dump in the attachment. However it is possible that my Idea configuration or some other conditions are very unique. But when I disable helm-values plugin, it does not crash at all.

IDEALOG_AND_THREAD_DUMP.txt

@fstaudt
Copy link
Owner

fstaudt commented Apr 16, 2023

Hello @gsaukov ,

does your project contain any Helm chart ?

Performance improvements in 0.6.1 were focused on background tasks performed by the plugin when IDE is already running.
I had the understanding that issues on your project only happened after some time of usage.

A crash at startup can only be caused by JSON schema provider factory in helm-values plugin.
The factory searches the complete repository to find directories containing a file named Chart.yaml.
For large projects containing a lot of files and subdirectories, I imagine it can take a lot of time.
Inspection at startup could be limited to the first level of directories to improve performance and possibly avoid a crash.

I can create a SNAPSHOT version of the plugin with a fix that you can test on your project.
Would you be OK to test a SNAPSHOT version of the plugin on your project ?

@fstaudt fstaudt added this to the 0.7.1 milestone Jul 9, 2023
@fstaudt fstaudt closed this as completed in 039044a Jul 9, 2023
fstaudt added a commit that referenced this issue Jul 14, 2023
…actory

Full project scanning in JSON schema provider factory may cause IntelliJ crash at startup.
JSON schema provider factory should instead rely only on .idea/json-schemas folder.

Closes #64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working intellij Intellij plugin
Projects
None yet
Development

No branches or pull requests

2 participants