Command line stopped flushing the output buffer / hangs indefinitely

BettaGeorge 1 Reputation point
2022-01-11T17:29:25.077+00:00

I am running the LTS release (Windows 10.0.17763.2366).

Until a few months ago, everything was working fine.

With the latest update (November 10, 2021), I can no longer use applications like vim or less in any command line: the window just goes blank and hangs until I terminate the process using an external tool.

This happens in cmd (e.g. using ssh to a linux machine and then opening vim), in powershell (same) and in the WSL terminal (without ssh; even "less" on a local file hangs forever). It happens with any and all commands that would normally take over the output buffer. I can use dir/ls and any scripts with output just fine, I just cannot run anything that would let me interact with text.

On GNU/Linux, I would suspect the problem lies with the stdio flushing not being handled correctly. I tried stdbuf -i0 -o0 -e0 vim test.txt in the WSL terminal, but that did not solve the problem.

To reiterate: I can rule out WSL as the culprit because I can replicate the error in pure cmd, and I can rule out networking as the culprit because the error also happens on local files, without internet connection.

I am stumped. What else can I try?

Please tell me if you need additional debugging output.

Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,916 Reputation points
    2022-01-18T08:17:31.207+00:00

    Hello

    Thank you for your question and reaching out.

    I can understand you are facing issue with WSL freezes while running some commands.

    I can see you have applied November 2021 update , I will advise you update your PC with latest version Windows 21H2 (build 19044) , as there are some fixes are released for WSL as well for Windows defender also now supports Windows Subsystem for Linux (WSL); You can add rules for WSL process, just like for Windows processes.

    https://blogs.windows.com/windows-insider/2018/04/19/announcing-windows-10-insider-preview-build-17650-for-skip-ahead/#II14f7VlSBcZ0Gs4.97

    Hence in your case please try to all whitelist or exclude WSL in Windows defender or any other Antivirus you may have installed.

    I would also suggest try to uninstall WSL and cleanup the lxss folder in system32 and Install WSL again.


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.