-
Notifications
You must be signed in to change notification settings - Fork 205
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
When vscode opens a Java project for about 2 hours, the suggestion function will fail #750
Comments
Sorry for the late reaction here. We will take a look at this, of course. Can you configure the Spring Tools via the preferences in VSCode to produce a log file somewhere, so that you could attach it here? Would be interesting to see what is going on on the language server side while this "hangs" happens. |
I configured |
@nullgit Thanks for attaching the log file. I took a deeper look as well as tried to reproduce this on my end without success so far. I am working on adding additional log output here to investigate this deeper. Once I have a CI build of our extension that includes the additional log output, it would be great if you could install that version of the extension in your VSCode and try to reproduce the behavior - and attach the log output again here. It doesn't solve the issue yet, but I hope to - at least - find a few more useful hints in the enhanced log output then. I will let you know once the new CI version is around. Thanks for helping us to debug this issue. |
The CI build of the VSCode extension is available from here: https://dist.springsource.com/snapshot/STS4/nightly-distributions.html Please download the Would be great to get some additional log output data from this slightly enhanced version. Many many many thanks upfront!!! |
One more thing: Can you capture one or a few thread dumps of the Spring Boot Language Server process (using |
It failed before 08:36. |
@nullgit Thanks for the additional logs and stack traces, that is extremely interesting. Can you go to the preferences and disable the In case I am thinking into the right direction, this should workaround the issue - and would indicate how to fix the underlying problem. |
@nullgit Please ignore my previous comment, looks like this setting doesn't really workaround the issue as I expected it to do. So let me work on this and update the issue once I have a new CI build of the VSIX file for you to try. |
…hreads to block everything else
@nullgit There is a new CI build available from: https://dist.springsource.com/snapshot/STS4/nightly-distributions.html Would be awesome if you could give that a try as well and report back how things are going (and submit log files and stack traces again, if things go wrong). Many many thanks for helping us investigating this, much appreciated!!! |
My problem was solved, many thanks for @martinlippert @nullgit |
@martinlippert Hello, after installing the new plug-in, it seems that this problem has been solved. Do you still need log? Now I can happily write Spring Boot program on VSCode again. Thank you very much!! |
@xyzCh @nullgit Thanks for the feedback and for letting us know that this is working now with the latest fixes. Great news!!! @nullgit It would indeed by interesting to get a stack trace (logs are not necessary, I think) from the language server process on your end after you had it running for a longer while (several hours probably). So if possible, that would be much appreciated. |
@martinlippert This is a new stack trace. |
@nullgit Thanks for attaching the log, much appreciated. |
Some more details from investigating what is going on here: It looks like the attempt to update the internal status of tracked processes hangs. The stack trace for those update threads all look like this:
In the past, the thread pool that was responsible for executing this was the common fork/join thread pool that is used by all the CompletableFutures if you don't pass your on executor service to it. After a while, all the available threads on that thread pool were running (actually hanging with the stack trace above). As a result, every other place on the language server that wanted to execute something using that thread pool was waiting forever. The language server was using that thread pool for many things, among them the computation of the content-assist proposals. Therefore the content-assist newer really showed anything anymore. The first step here was to differentiate the different thread pools used by the different parts of the language server. Now the process tracker uses its own thread pool for updating the status of running spring processes. In the case above, this thread pool is still filling up with hanging threads (which is bad and probably breaks the live hover feature), but it doesn't affect all the other parts of the language server anymore. Next step here is to improve the communication with the external processes that are being tracked in order to avoid this handing threads altogether. But that is probably something that will not be done for the upcoming |
@martinlippert Thanks for letting me know why there is this bug. For now, this problem is solved on the surface. |
When I enable the
Spring Boot Tools
extension and opens a Java project for about 2 hours, the suggestion function will fail. It will always showloading...
. There is no such problem in the first two hours. And when I disable this extension or use v1.31.0, it will not have this bug.The text was updated successfully, but these errors were encountered: