-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Build output stucks in terminal #41165
Comments
I've done some experimenting with extension and i can't reproduce this issue with all extensions disabled. If i reenable C/C++ extension then issue comes back, so "Reproduces without extensions: No". I'll report this issue to vscode-cpptools. |
We aren't doing any processing for the build scenario in the C/C++ extension. If someone with VSCode can point me to where I can look to see what is causing it with the extension enabled, that would be appreciated. |
I tried to find some more debug info on this and found Help->Toggle Developer Tools. This is what printed to JavaScript console when this happens: Line 1:
Line 2:
Line 3:
I suspect this is somehow related to parallel jobs outputting to terminal concurrently ( |
Looks like it's related to tasks/problem matchers |
@sean-mcmanus Can you take a look and see where the task/problem matchers are causing this issue? |
Yeah we contribute the gcc problem matcher. I notice that it's still referencing ${workspaceRoot} instead of ${workspaceFolder}, but I'm not sure if that's the cause of the hanging issue. https://github.com/Microsoft/vscode-cpptools/blob/master/Extension/package.json `
|
@Tyriar there seems to be a problem with the terminal as well. If a listener on the data event of the terminal throws the terminal should not get into a broken state. I will look into handling this in the problem matcher as well however the terminal should protect itself too. |
I don't know why but the problem matcher seems to match a line where the file part doesn't correspond to a valid file hence resulting in throwing when we try to convert to an URI. |
Added protection code for the problem matcher. @Tyriar assigning to you to do the same for the terminal. |
Verification steps? |
@roblourens best would be to do a code review / inspection. I didn't have any steps either but concluded the problem from the provided stack traces here: #41165 (comment) |
(1 theme extensions excluded)
Steps to Reproduce:
Result 1: terminal output hangs somewhere during build process (doesn't always reproduce)
Result 2: actual build continues in background ("Building..." appears in status bar, then disappears after some time)
Result 3: terminal output doesn't change, it stays in "hanged" state from previous build
Result 4: build presumably executes in background, "Building..." appears in status bar, just no output in terminal
Reproduces without extensions: Yes/No
I'm using multithreaded CMake build with ccache. Issue reproduces more or less stably when i'm rebuilding my project in different configurations (Debug/Release). My tasks.json:
Point where output hangs is always on printing a warning from GCC (4.8.5). It goes like this:
Surprisingly it's always the very same warning from very same file where output hangs:
warning: ‘...[skip]...’ defined but not used [-Wunused-function]
. If it hangs, i've found two workarounds to "unstuck" terminal:Additional info: i'm using ccache, so build doesn't recompile objects but gets them from cache instead. All parallel build jobs are executed very fast on cache, like 10-20 objects are "compiled" per second, so i suspect it's some sort of race condition. When i try to reproduce this issue i have to do 3-5 tries, but it does always reproduce after relatively small number of attempts.
The text was updated successfully, but these errors were encountered: