WSL icon indicating copy to clipboard operation
WSL copied to clipboard

clip.exe hangs when redirecting output into it.

Open EricWardner opened this issue 6 years ago • 30 comments

Environment

Windows build number: 10.0.20175.1000
Your Distribution version: Ubuntu 18.04
WSL 2: Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020

Steps to reproduce

echo "AAAA" | clip.exe

Expected behavior

AAAA get copied to my windows clipboard

Actual behavior

The command hangs and nothing is copied

EricWardner avatar Jul 24 '20 15:07 EricWardner

Ref #4475 (with a side of #4852). Am able to reproduce here. Consensus work-around is use a better clip application.

image

[ed] Wild speculation maybe an IPC thing unique to 20175. Do you use clip.exe a lot (I do not), and if so was it working before you recently got the Windows Update?

therealkenc avatar Jul 24 '20 16:07 therealkenc

I also do not use it often. Can't remember if it was working before the most recent update.

EricWardner avatar Jul 24 '20 16:07 EricWardner

dmesg? ETW? Any logs.

Biswa96 avatar Jul 24 '20 16:07 Biswa96

dmesg? ETW? Any logs.

Nah. Turns out it isn't limited to clip.exe. Also hangs on:

$ ls | findstr.exe foo

Which used to work (at least to the extent the scenario didn't hang).

therealkenc avatar Jul 24 '20 16:07 therealkenc

Work-around I'm using is just to output to a file first and then read it in to clip.exe

echo "AAAA" > file.tmp
clip.exe < file.tmp

EricWardner avatar Jul 24 '20 17:07 EricWardner

This is also the case with win32yank which is automatically detected by Neovim meaning it's not currently possible to yank to the system clipboard from Neovim in WSL 2.

echo 'please please me?' | win32yank.exe -i hangs as per previous comments. It's not a problem on another computer that's still on build 20170.

Happy to gather additional info if someone can point me in the right direction. 🙂

raisin-loaf avatar Jul 24 '20 21:07 raisin-loaf

It's not a problem on another computer that's still on build 20170.

Those are the words I was looking for. Thanks.

therealkenc avatar Jul 24 '20 22:07 therealkenc

This bug also breaks the git credentials manager trick to authenticate in git under WSL via the Windows credential manager (git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe")

blumu avatar Jul 28 '20 00:07 blumu

This Bug also breaks Docker :/

SR-Lut3t1um avatar Jul 28 '20 14:07 SR-Lut3t1um

Is this still not fix in build 2018?

zyazhb avatar Jul 30 '20 02:07 zyazhb

Not work in Microsoft Windows [Version 10.0.20180.1000] But Docker 2.3.0.4 install success.

shadowmaster63 avatar Jul 30 '20 06:07 shadowmaster63

Not work in Microsoft Windows [Version 10.0.20180.1000] But Docker 2.3.0.4 install success.

tnx for information i have tried to install docker in build 2018 but failed.

zyazhb avatar Jul 30 '20 07:07 zyazhb

tnx for information i have tried to install docker in build 2018 but failed.

$ lsb_release -r Release: 16.04 $ cat /proc/version Linux version 4.19.121-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Fri Jun 19 21:06:10 UTC 2020

>wsl --list -v
  NAME                   STATE           VERSION
* Ubuntu                 Running         2
  docker-desktop-data    Running         2
  docker-desktop         Running         2

shadowmaster63 avatar Jul 30 '20 07:07 shadowmaster63

I also get the same docker installation error with Build 20180 :(

Mortinke avatar Jul 30 '20 07:07 Mortinke

@shadowmaster63

$lsb_release -r                                                                 
Release:        18.04

$cat /proc/version
Linux version 4.19.121-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Fri Jun 19 21:06:10 UTC 2020

> wsl --list -v
  NAME            STATE           VERSION
* kali-linux      Stopped         2
  Ubuntu-18.04    Running         2
  Debian          Stopped         2

I have updated to build 2018 but when i install docker still:

 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   在 System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
   在 System.Linq.Enumerable.<CastIterator>d__97`1.MoveNext()
   在 System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   在 System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   在 System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   在 CommunityInstaller.EnableFeaturesAction.GetFeaturesToEnable()
   在 CommunityInstaller.EnableFeaturesAction.<DoAsync>d__37.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 CommunityInstaller.InstallWorkflow.<HandleD4WPackageAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 CommunityInstaller.InstallWorkflow.<DoProcessAsync>d__27.MoveNext()

zyazhb avatar Jul 30 '20 07:07 zyazhb

I apologize everyone for my english!

After 10 unsuccessful attempts, I thought to do reinstall windows. But at the very last moment I changed my mind ...

  1. We completely remove the Docker use script via PoweShell https://stackoverflow.com/questions/42161471/how-to-uninstall-docker-machine-under-windows-10/51167323#51167323

  2. Run the latest Docker installation, I took 2.3.4.0

  3. When installing, DO NOT select support for WSL2

  4. Docker is installed ... and a notification appears at startup, about the start of the WSL2 subsystem, I don't understand how, but the launch still occurs

  5. Docker itself did not completely start for me

  6. You need to get to the settings and run hard reset

  7. He is started, but unfortunately past manipulations cleared it :/ Nevertheless, I have already launched my working project P/s Because of something, I had to execute "docker-compose up" under sudo

  8. Also check that the marks about integration with wsl 2 distributions have not gone off (Resources / Wsl integration)

image image

  1. maybe he's pretending ... that he works through wsl2 :)

image

DarkTraveler avatar Jul 30 '20 17:07 DarkTraveler

Folks here for Docker issues. This WSL2 bug does effect Docker, it is not an issue with Docker. We are hopeful for a fix soon. Right now Windows 20175 and 20180 have this issue. You can disable the WSL2 backend in your Docker settings for now. You won't find docker in your WSL2 path anymore but you can work around this temporarily with:

alias docker=docker.exe

Docker on the Windows side (powershell, cmd, etc) will behave normally.

metcalfc avatar Jul 30 '20 21:07 metcalfc

Windows 20175 and 20180 have this issue

I have the same issue with 19041.423. I think it started with one of the updates.

bsosnowski avatar Aug 05 '20 21:08 bsosnowski

I have the same issue with 19041.423.

The cause of this issue is known and applies only to Insider builds. If you are experiencing a problem on 19041.* that appears to have similar symptoms, please open a new tracker. Be sure to follow the template and be excruciatingly specific about the reproduction steps, in order to get a me2 from someone on 19041.

therealkenc avatar Aug 05 '20 22:08 therealkenc

Still there in 20185 :(

nlundquist avatar Aug 05 '20 23:08 nlundquist