WhitewaterFoundry / Pengwin

A Linux distro optimized for WSL based on Debian.
Other
1.48k stars 105 forks source link

tmux causes docker-relay to give wslpath: : Invalid argument #686

Open kerbe opened 3 years ago

kerbe commented 3 years ago

Describe the bug When launching tmux, console gets following error message: wslpath: : Invalid argument This happens every time new tmux screen is opened with for example ctrl+b c.

I debugged this to be coming from /etc/profile, which eventually calls /usr/bin/docker-relay. There is line 13: wHome=$(wslpath -u "${wHomeWinPath}") which then gives that error when tmux is used.

This file doesn't seem to be called when launching Pengwin, or when launching multiple Pengwin windows.

To Reproduce Steps to reproduce the behavior:

  1. Start Pengwin
  2. Start tmux with simply tmux
  3. See error

Expected behavior No error message to be printed.

Additional context This error appeared today, once I had ran pengwin-setup update.

Basic Troubleshooting Checklist

[ x ] I have searched Google for the error message. [ x ] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled. [ x ] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues. [ x ] I have searched the Pengwin issues page: https://github.com/WhitewaterFoundry/Pengwin/issues. [ x ] I have run Windows 10 updates and restarted. [ x ] I have restarted WSL service: wsl.exe --terminate WLinux wsl.exe --shutdown.

Pengwin Version Run grep "PENGWIN_VERSION" /etc/os-release in Pengwin. PENGWIN_VERSION="21.4.1"

WSL general info

Run wslsys in Pengwin. $ wslsys WSL Version: 2 Locale: fi_FI Release Install Date: Fri Jun 5 02:20:59 EEST 2020 Branch: vb_release Build: 19041 Full Build: 19041.1.amd64fre.vb_release.191206-1406 Display Scaling: 1 Windows Theme: light Windows Uptime: 95d 17h 46m WSL Uptime: 0d 0h 44m WSL Release: Pengwin WSL Kernel: Linux 4.19.104-microsoft-standard Packages Count: 1030

kerbe commented 3 years ago

Alright, a bit more information to this. Looks like that error message is printed, if Docker Desktop on Windows has died / isn't started. I don't have it always running, and when using wsl.exe --shutdown, that causes Docker to die too, so I kept getting this error message. Reason why I originally was running wsl.exe --shutdown was that after that update with pengwin-setup update, I keep getting this message: Updated configuration for WSL2. Restart Pengwin to apply changes. So I tried shutdown command if that's what is needed. But doesn't seem to be so. This update configuration keeps repeating after every restart of Pengwin if I have had tmux on (which then gives that error when starting tmux, but following tmux screens doesn't). If I don't start tmux, and restart Pengwin, that configuration update message stays away.

WSLUser commented 3 years ago

Windows Uptime: 95d 17h 46m

I'm going to have to suggest rebooting and ensuring all Windows Updates are applied first.

WSL Kernel: Linux 4.19.104-microsoft-standard

This is outdated. You should get a newer kernel version through Windows Updates. Stable editions currently have 5.4 available. There's also an msi you can use to update the kernel from the WSL Kernel release notes.

After both the Linux kernel update and all Windows updates and reboots are applied (and also ensuring Docker Desktop is updated), do you still encounter an issue?

kerbe commented 3 years ago

Windows Uptime: 95d 17h 46m

I'm going to have to suggest rebooting and ensuring all Windows Updates are applied first.

That update is wrong, and it can't be right. 😁 I turn computer off every night, even switching extension cord power off as there is some coil whine from old monitor. And if that wouldn't be enough, a week ago I physically moved computer from one house to another, so all parts were intact for hours. No idea where that uptime is coming from. Desktop computer, so no batteries nor hibernating etc.

Also, as interesting sidenote, I ran it again:

$ wslsys
WSL Version: 2
Locale: fi_FI
Release Install Date: Fri Jun  5 02:20:59 EEST 2020
Branch: vb_release
Build: 19041
Full Build: 19041.1.amd64fre.vb_release.191206-1406
Display Scaling: 1
Windows Theme: light
Windows Uptime: 105d 9h 50m
WSL Uptime: 0d 0h 5m
WSL Release: Pengwin
WSL Kernel: Linux 4.19.104-microsoft-standard
Packages Count: 1030

That would indicate there has been almost 10 days more uptime. Which isn't case, as this whole ticket is only 3 days old. 😬

WSL Kernel: Linux 4.19.104-microsoft-standard

This is outdated. You should get a newer kernel version through Windows Updates. Stable editions currently have 5.4 available.

image Pengwin has been updated 16.4.2021, and I just checked MS Store that there ain't any new updates offered to me. Regular Windows updates are all also ran, so no new ones there either waiting. Docker Desktop is also up-to-date, 3.3.1 (63152).

And just checked, that all described problems still occur.

WSLUser commented 3 years ago

Pengwin version is different from kernel version. The kernel is used by all WSL distros. Pengwin is just one consumer of it. https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi is what you need.

WSLUser commented 3 years ago

Also, I suggest filing bug in https://github.com/wslutilities/wslu for wslsys. It should properly obtain the uptime and clearly it isn't in your case.

crramirez commented 3 years ago

Hello @kerbe,

Thanks for reporting. We will take a look soon into this.

The uptime for WSLU isn't accurate, I have reported it, but the problem is that it cannot be easily reproduced. I mean, it happens on my PC and in your but no on others.

Regards