sslcontext-kickstart
sslcontext-kickstart copied to clipboard
Loading Windows keystores with a timeout option
This PR is an attempt to resolve the issues raised here:
- https://community.sonarsource.com/t/sonarlint-eclipse-hangs-on-sonarlint-core-startup-backend-initialization-after-starting-eclipse/110456
- https://community.sonarsource.com/t/sonarlint-server-rpc-sequential-executor/111277
- https://sonarsource.atlassian.net/browse/SLCORE-669
- https://sonarsource.atlassian.net/browse/SLCORE-686
- https://github.com/SonarSource/sonarlint-core/pull/902
Hi @henryju @nquinquenel and @thahnen
I was not quite sure what the status is on your side. I noticed that there are 2 Jira tickets open to create a workaround for this issue in the sonarlint code source. I think this PR might do the trick to resolve the issue what your end-users are facing where their application just freezes forever.
This PR does not fix the issue with loading a keystore having code signing certificate as I think that is a bug related to the JDK itself. I will create a bug report at the openjdk to address this issue. However this pull requests resolve the issue of freezing forever. If the application is running on Windows it will create the system keystore in a separate thread with a timeout of currently 500 milliseconds. If the freezing issue happens it will atmost wait for 500 milliseconds and terminate the executor service which will also kill the underlying thread. I have tried this on a Windows machine and the happy flow still works as expected. I am not able to test it with the freezing behaviour, so this is an assumption that it will resolve the freezing issue.
Looking forward to get your opinion on this topic.
Hello @Hakky54. We are not convinced a timeout will help, so we are likely going to disable the loading of Windows keystore for now, and we can reconsider later based on user feedback. @vojtech-suchy-sonarsource is taking the topic.
Good to hear that you guys decided to resolve it on your end in that way. I think that will indeed be the safest option.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.