-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Processing stuck when calling wordexp with certain compilerFragments #9688
Comments
@lucasaf04 Your issue appears different. Our main thread is stuck calling the wordexp system call. Are you able to provide the Custom Browse Configuration logging in the C/C++ logging window after setting C_Cpp.loggingLevel to "Debug", in particular the compilerFragments section? |
C/C++ Debug logs (with vscode just restarted and cmake configure run automatically)
After opening a file -> commenting a line of code -> cmake run -> intellisense stuck
call stack
|
Hi @lucasaf04 . It looks like our call to the OS api function The compilerFragments in your logs are not unusual. They don't even contain shell quoting or escaping. And we're not yet getting reports about this issue from other Mac users. Is there anything unusual about how the shell is configured on your system? |
Yeah, same here. |
@Colengms .zshenv
|
@Colengms Any news? |
Our team isn't able to repro the issue. @Colengms Has anyone tried the repro with the .zshenv? I did not. |
@v-ericawu When you tried to repro this, were you able to set up an environment that leveraged the provided |
@Colengms IntelliSense loads normally after setting the .zshenv file: |
@v-ericawu It also does for me. The problem occurs somewhere in between editing and running the target. Sometimes it happens on the first run, sometimes after several runs. That's why I couldn't make a video reproing the problem, it happens randomly. |
@Colengms I have a video reproing the issue (most of it is just editing code and running the program) Screen.Recording.2022-09-06.at.13.14.40.part.1.movScreen.Recording.2022-09-06.at.13.14.40.part.2.mov.zshenv (only sets up path. no more zsh config files)
call stack (cpptools)
call stack (cpptools-srv)
|
Yeah, we have a change for 1.13.2 that should improve or fix this (our target is next Tuesday). |
I also experience such issue on macOS. Just hovering the mouse over something to see the details can result in the "Loading..." hover and the flame icon in the status bar is stuck on Updating IntelliSense forever. |
@Zingam Yeah, we believe a significant number of Mac users are randomly hitting this, most of whom probably aren't aware they're hitting this particular bug. I'm not 100% sure you're hitting this or not without knowing the cpptools call stacks, but you should know after we release the fix. |
https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.2 has a change that may reduce the occurrence of this but it's not fixed yet. Setting C_Cpp.experimentalFeatures to true may fix this, but we're still running tests to determine if that's true or not. There is a separate "Failed to spawn IntelliSense process" failure that can occur on Mac-only which we're also investigating, but no thread gets stuck in that case. |
Ok, will get it. Thanks! Anything you want us to test? |
Well, we've found a way to repro the bug(s) and test the potential fix(es) ourselves (still in progress), so we don't necessarily need anyone to test anything...up to you. |
That sounds awesome. I've enabled the experimental feature anyway, will tell. |
Our testing indicates it's fixed when C_Cpp.experimentalFeatures is set to true, so we'll move those changes to the non-experimental case for 1.13.3. |
With 1.13.2 I still happened that I was unable to cmd+click to a definition of a Core Foundation type (Apple SDK header). After I restarted VSCode the issue fixed itself. Is cmd+click issue related to the wordexp issue? |
@H-G-Hristov That sounds like a different issue. If wordexp is stuck then all IntelliSense operations would be stuck and wordexp would be on a call stack. If only Go to Definition doesn't work that could be caused by something else. Are you able to provide more repro info or logging or a call stack? It sounds like it's random? |
I confirm that I haven't had any hang in the whole morning. Thanks sean :) |
After using the extension for several days I haven't had any issues. @sean-mcmanus It would be nice to have a tiny explanation of what exactly caused the bug and how you fixed it. Just curiosity, because it has been such an annoying bug. Thanks. |
The wordexp call was launching a process internally on Mac and some Linux implementations and that would cause handles to be inherited by that process if another of our threads was creating an IntelliSense process at the same time, so it would be random. Our automated tests managed to repro it in a loop. So we just added a lock to prevent that. We'd hit similar issues in the past. |
Thanks :) |
I notices that the release notes changed from "Fixed and reduced" to "Reduced" is this still not fixed fully? The situation with the preview release is certainly significantly better than it used to be. In a matter of fact I can't remember if the issue has occurred to me since the last update. |
The fix is available with 1.13.3 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.3 -- @H-G-Hristov with 1.13.2 the experimentalFeatures setting had to be set in order for it to be fully fixed (otherwise it was just "reduced"). |
This has been fixed with insiders for over a month, but it's now available in non-insiders: https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.6 |
@sean-mcmanus
Recently I have been facing the same problem: formatter stuck when saving (I have auto save and format on save active) and intellisense stuck in the flame icon forever (hovering a variable prints
loading...
).I don't have a step by step guide to repro the problem because it doesn't happen always. The only thing I do is: edit code and then cmake run (with the cmake-tools ext). Sometimes the bug appears sometimes not.
Here is my call stack (I couldn't get it with the vscode - launch.json guide so I used the lldb one):
call stack
Originally posted by @lucasaf04 in #9631 (comment)
The text was updated successfully, but these errors were encountered: