Closed tigerinus closed 7 months ago
@tigerinus Thank you for your feedback. From the error message it looks like Tooltitude tries to provide the list of code actions, and hangs in this state. May I ask you to share the editor position which you have?
@tigerinus Thank you for your feedback. From the error message it looks like Tooltitude tries to provide the list of code actions, and hangs in this state. May I ask you to share the editor position which you have?
I'm sorry - What do you mean by editor position?
@tigerinus By editor location I mean the location of the cursor in the file, or selection state at this point.
@tigerinus Also, if you could join our discord, https://discord.com/invite/f9MHBXsVwr it would be much easier to discuss the problem there via personal messages.
It might be related to this previously reported issue: https://github.com/tooltitude/support/issues/31
@tigerinus 0.60 is out with additional diagnostics which should help us to resolve this issue.
@tigerinus After some investigation, it seems that vscode, might submit a large number of lsp requests, and cancel them. We might be spending time handling all these cancelled requests. Since 0.60.2 we correctly handle cancelled requests, and it should help.
Please update to the latest version, and let us know if you have it again.
@tigerinus If you have this again, it would be very helpful if you:
ps -A | grep tooltitude
pstack PID
(on mac you could run sample PID), and send us the stacktraceP.S. You need to install pstack on ubuntu since it's not included by default with sudo apt install -y pstack
I haven't seen this issue again since upgraded to latest version.
How about close this first. I will reopen when it happens again.
@tigerinus I would keep it open for some time in case someone else experiences this, and then close.
There were no reports of it for some time, so I am closing it.
@tigerinus I would keep it open for some time in case someone else experiences this, and then close.
The infinite wait no long happens in the latest version.
But the wait time is still somewhat lengthy (around 10 seconds) for each save (when it starts to happen)
@tigerinus Thanks, that's very interesting! Reopening the issue.
Please disregard my previous comments after I reopened the issue. I will think what might be causing this.
What was changed between the version where you had a hang and now is that we handle request cancellation for not yet started requests instead of running them to completion, and ignoring cancellation requests. But why are they get accumulated in the first place?
@tigerinus Thanks to additional diagnostics we found one place where we had lags of >100ms, which could escalate if you have a lot of such requests in parallel, and other processes consuming CPU. The fix will be available in 0.63.0 likely closer to Friday.
Please let us know if you have any more problems like this.
P.S. We will continue to investigate since we now have a better ideas which other requests might lead to the same symptoms.
0.63.0 is out with some improvements and additional diagnostics (we have more hypotheses of what else might be slowing stuff down). Please let us know if you have this issue again. (you will likely have it, but the lag should be smaller)
Sadly, the long wait happens again with latest version - This time it's around 30 seconds.
@tigerinus Thanks for the update. It's interesting.
May I ask you to do the following. If you have this again: run 'sudo cat /proc/$(pgrep tooltitude)/stack' on the machine where tooltitude is running.
Note:
This command will show us what the tooltitude process is doing which should help with understanding the reason of the hang.
After some investigation, here's my working hypothesis:
To fix it, we need to understand why it hangs or works very slowly.
So, it would be really great if you could share if the following happened, and at which place:
(On our side, I will add more diagnostics to find out the reason and fix it)
The diagnostics show that the code action which seem to hang is apply De Morgan laws. Will investigate it further. Hopefully, we will fix it by the end of this week.
Ok. I found the reason and hang and reproduced it (put a caret on the first || in a == 1 || b == 1 || c == 1), and fixed. I started 0.66.3 build, which should be out in 10-30 minutes. Please, update to it, and let me know whether it helps.
@tigerinus How is it going with hangs? Did you experience them since upgrade to 0.66.3?
@tigerinus How is it going with hangs? Did you experience them since upgrade to 0.66.3?
I stepped away from Golang coding since last week, so I haven't got a chance to try the new version.
Why don't you just close this issue - if it happens again I will re-open.
@tigerinus Ok. Closing it now. Thanks a lot for your feedback. Don't hesitate to report problems if you encounter them, or ask for new features. We would be happy to see what we could do.
Tooltitude Version:
0.59.0
OS Version:
Ubuntu 23.10
VS Code Version:
Go Version:
go version go1.21.7 linux/amd64
Code Repository (if open source): https://github.com/IceWhaleTech/CasaOS-AppManagement
What did you try to do?
Try to save a changed
.go
file.Is there anything interesting in the tooltitude output channel? (should be open if you are reporting error from within VS Code)
Not really - all
INFO
level messages.Steps to reproduce
.go
file, and saveThen saving is blocked for few minutes by a popup:
Workaround: Kill VSCode and reload window.
output: