WSL: The I/O operation has been aborted because of either a thread exit or an application request

Environment

Windows build number:  Microsoft Windows NT 10.0.20175.0
Your Distribution version:  Ubuntu (can't run because failed to run the bash)
Whether the issue is on WSL 2 and/or WSL 1: WSL1

Steps to reproduce

Just opening the WSL (Ubuntu) after a windows update (insider build).

image

lxcore details logs -

lxcore-files.zip

Expected behavior

Should work

Actual behavior

Error: The I/O operation has been aborted because of either a thread exit or an application request

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 13
  • Comments: 56 (7 by maintainers)

Most upvoted comments

@benhillis

You may be able to work around this by temporarily reducing the length of your windows %PATH% variable.

Thanks, this did solve the issue -

set PATH=
C:\Windows\System32\wsl.exe

or

set PATH=C:\Windows\System32
wsl

Yep. I’m definitely affected by this bug. I started shortening my %PATH%, one program path string at a time until I got down to 989 characters, including spaces (so, assuming a limit of 1024 characters or just below). Once I got it pared down to 989 characters, WSL started working again as normally. But my machine where I test preview builds also has Windows Kits, developer environments, multimedia software, diagnostics, and so forth, all of which need to be in the path to work properly. Why was WSL limited to a certain path length? Any way to work around this without shortening the path in a cmd prompt before running WSL? I have use it to run Linux software side-by-side with Windows on the fly. Haven’t been able to do this since updating to Windows 10 build 20175.

Alright, I’ve fixed this and written a test so this kind of thing won’t happen again.

Sorry about the disruption this caused… I’ll try to get the fix into an Insider Fast build ASAP.

I’m hitting the same issue, and am on the same Windows build with WSL1. Even just trying to list distributions hangs and fails like this: wsl --list --all

I agree that this is mysterious. Another fellow who has posted here has had not one workaround work for him on build 20175. That is when my problems began, but I am holding out from rolling back this time around. I almost rolled back when I started noticing the problem with WSL on this build.

Ok… this issue seems to be related to when the init daemon receives a larger than expected message from our service and has to resize our buffer. You may be able to work around this by temporarily reducing the length of your windows %PATH% variable.