Skip to content
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

Can't start new terminal session / watch task are not running correctly #212678

Closed
dbaeumer opened this issue May 14, 2024 · 17 comments · Fixed by #213050
Closed

Can't start new terminal session / watch task are not running correctly #212678

dbaeumer opened this issue May 14, 2024 · 17 comments · Fixed by #213050
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug electron-29-update insiders-released Patch has been released in VS Code Insiders linux Issues with VS Code on Linux terminal Integrated terminal issues verified Verification succeeded WSL Issue when using WSL
Milestone

Comments

@dbaeumer
Copy link
Member

Version: 1.90.0-insider (user setup)
Commit: bbc4ba1
Date: 2024-05-14T05:48:27.714Z
Electron: 29.3.1
ElectronBuildId: 9464424
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22635

Running VS Code remote WSL

Here is what I see:

cast.mp4

Observe:

  • the terminal does not open
  • the watch task somehow hangs. It should print something like:
[11:03:24 AM] Starting compilation in watch mode...

[11:03:27 AM] Found 0 errors. Watching for file changes.
@dbaeumer
Copy link
Member Author

Things work fine under Windows without WSL

@Soneji
Copy link
Member

Soneji commented May 14, 2024

Same, I am on vscode insiders with WSL

@meganrogge
Copy link
Contributor

Can you share your settings.json file and also do a trace log while creating a terminal? https://github.com/microsoft/vscode/wiki/Terminal-Issues#enabling-trace-logging
/label info-needed terminal

@VSCodeTriageBot VSCodeTriageBot added terminal Integrated terminal issues info-needed Issue requires more information from poster labels May 14, 2024
@deepak1556
Copy link
Contributor

Does setting export UV_USE_IO_URING=0 in the wsl resolves the issue ?

@deepak1556 deepak1556 self-assigned this May 15, 2024
@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug linux Issues with VS Code on Linux WSL Issue when using WSL and removed info-needed Issue requires more information from poster labels May 15, 2024
@deepak1556 deepak1556 added this to the May 2024 milestone May 15, 2024
@dbaeumer
Copy link
Member Author

Chatted with @deepak1556 about this and it is very likely caused by the io-uring support that got added with Node 20.x.

Setting export UV_USE_IO_URING=0 makes things work again

@aeschli may be we should add this to the WSL launcher for now until we figure out why the terminal is not working with io_uring

@dbaeumer
Copy link
Member Author

@chrmarti @roblourens This also affects docker and very likely ssh.

@chrmarti
Copy link
Contributor

To set this environment variable for the entire container as a work around you can add the following to the devcontainer.json:

  "containerEnv": {
    "UV_USE_IO_URING": "0"
  }

@deepak1556
Copy link
Contributor

FYI on the actual fix, it will be available in the next patch update via electron/electron#42128. However in all the fixes we disable the io_uring backend to get terminal working. I will use this issue to investigate why terminal is broken with this new backend, very likely hints to a bug in node-pty 🤷‍♂️

@dbaeumer
Copy link
Member Author

@deepak1556 in case it help I also always saw: #212688

@aeschli
Copy link
Contributor

aeschli commented May 15, 2024

No need to change the remote extensions, we can do it for all in
https://github.com/microsoft/vscode/blob/main/resources/server/bin/code-server-linux.sh

@aeschli
Copy link
Contributor

aeschli commented May 15, 2024

@deepak1556 should I make a PR that adds export UV_USE_IO_URING=0 in https://github.com/microsoft/vscode/blob/main/resources/server/bin/code-server-linux.sh

@deepak1556
Copy link
Contributor

@aeschli yes please

@dbaeumer does #212688 repro even with io_uring disabled ?

@aeschli
Copy link
Contributor

aeschli commented May 15, 2024

I think I see similar problems on Linux Desktop (not remote).
The watch tasks are sometimes idling without progress.
I'm now running code-insiders with UV_USE_IO_URING=0 to see if that makes a difference

@olivparm
Copy link

Same issue on Linux Desktop when remoting into another Linux (remote-ssh).

@dbaeumer
Copy link
Member Author

@deepak1556 haven't seen it with io_uring disabled.

@Soneji
Copy link
Member

Soneji commented May 16, 2024

➜ tail -n 2 ~/.aliases
# https://github.com/microsoft/vscode/issues/212678
export UV_USE_IO_URING=0

After adding the env var (I source this file in my ~/.zshrc), I'm still getting the error, it's more intermittent now though.

@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels May 20, 2024
@dbaeumer
Copy link
Member Author

Works for me without having any export UV_USE_IO_URING=0 in my rc files.

@dbaeumer dbaeumer added the verified Verification succeeded label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug electron-29-update insiders-released Patch has been released in VS Code Insiders linux Issues with VS Code on Linux terminal Integrated terminal issues verified Verification succeeded WSL Issue when using WSL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants