microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.52k stars 822 forks source link

COSTING MICROSOFT BILLIONS: 2 yr old CRITICAL BUG WSL2 Network Connection Lost Dropped as /etc/resolv.conf, wsl.conf MUTT-HACK drops DNS resolution easily eg VPNs #9664

Open KonanTheLibrarian opened 1 year ago

KonanTheLibrarian commented 1 year ago

Version

Windows 10 19045 or any Windows 10 ready for WSL2

WSL Version

Kernel Version

Linux version 5.15.79.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Nov 23 01:01:46 UTC 2022

Distro Version

Ubuntu 22.04, or Ubuntu 18.04, or Ubuntu 20.04

Other Software

1) Docker Desktop 4.16.3 (96739) or any version. DD is Piled high with bugs no matter what version.
DD also kills WSL to Docker integration a nasty bug.

2) "VSCODE insiders" or any version.

3) Ubuntu 2 (Nobody knows what that 2 next to Ubuntu means NOBODY!) $ wsl.exe -v WSL version: 1.0.3.0 Kernel version: 5.15.79.1 WSLg version: 1.0.47 MSRDC version: 1.2.3575 Direct3D version: 1.606.4 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.2486

Repro Steps

Anger justified! How long, how long for something this bad?

1) Reboot, 2) Connect to VPN if you use one. 2a) Find your version in Cmd.

wsl.exe -v # Outputs WSL version: 1.0.3.0 Kernel version: 5.15.79.1 WSLg version: 1.0.47 MSRDC version: 1.2.3575 Direct3D version: 1.606.4 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.2486

3) Start Docker Desktop if you use it. There are more bug in there than you can imagine! 4) Start WSL Terminal or WSL via VSCODE insiders. 5) INSIDE WSL Linux Terminal, Ping internet things. and do $ nslookup "nonAddress" # Yes use “nonAddress" as 2 (NOT ONE) or more DNS then show. Works. 6) INSIDE WSL Linux Terminal, Ping corporate servers. Works. 7) INSIDE WSL Linux Terminal, Ping DNS and Gateway servers. Works.

8) Unplug the Ethernet cable and plug back in or switch from ethernet to wifi. Reconnect to the VPN if you use one.

9) Repeat 5,6,7 nothing works, 10) nslookup "nonAddress" # In WSL Fails to resolve a thing can't even find DNS. 11) Shutdown VSCODE WSL Terminals. PowerShell. wsl.exe --shutdown. 11) Repeat 4, 5, 6, 7 ... DNS etc all fail.

Test networks outside WSL all working whilst WSL2 does not work. nslookup In Cmd shell (non-admin) for example: even works. Microsoft Windows [Version 10.0.19045.2486] (c) Microsoft Corporation. All rights reserved.

C:\Users\tclutten>nslookup 127.0.0.1 Server: USabc.com Address: 123.234.56.1 # Yes it finds the DNS even when NOT needing to resolve localhost!

Importantly, EVEN Docker Containers created by WSL connect!

Note: everything else outside of WSL2 stays connected. Hell even from inside WSL2, you can create containers and THEY CONECT TO THE NETWORK LIKE FLIN - NOT WSL2 any network refresh (which is periodic and normal destroy WSL2 DNS capability totally). To reproduce, the files here /etc/resolv.conf & /etc/wsl.conf are default.
/etc/resolv.conf (is [originally] generated, can't tell if wsl --shutdown + restart via Terminal or VSCODE causes it to get RE-GENERATED or NOT) it contains the correct DNS server but fails to have both DNS servers or all of them (CRITICAL SUB BUG)!

Even when working the /etc/resolv.conf file only ever has one DNS server, OTHER DNS are MISSING - ANOTHER BUG!

With or without WSL2 failing for example I can find ALL the DNS server, not ONE OF THEM, use powershell NON Admin! PowerShell (NOT ADMIN) > Get-DnsClientServerAddress # outputs ALL the DNS and other things.

Failure also happens if the network refreshes or times out and reconnects automatically.
I repeat everything else outside of WSL2 stays connected even containers created from inside WSL2 connect to the internet.

(N.B. Windows WSL staff totally HACKED Linux /etc/configs: total cost to Microsoft BILLIONS - SO MY ANGER IS JUSTIFIED!)

Expected Behavior

I expect to be able to ping LAN or WAN address and use the linux route commands and get results. I EXPECT TO SEE BUGS THAT COST MICROSOFT BILLIONS FIXED INSIDE 2 YEARS ALREADY, ALREADY? I expect to find NO Linux hacks by non-Linux staff, attacking with malice /etc/resolv.conf via /etc/wsl.conf - they are clueless! I expect WSL to reconnect as in "It just works". At this time we reboot 10x per day!

The following does NOT work SOME USERS ARE NOT ADMIN anyway!
REBOOTING IS NOT A SOLUTION but it works!

From https://stackoverflow.com/a/64057835 wsl --shutdown netsh winsock reset netsh int ip reset all netsh winhttp reset proxy ipconfig /flushdns netsh winsock reset shutdown /r Windows Search > Network Reset --- FAILS --- because it is the reboot the mends the mess in WSL2.

Restart Windows

Actual Behavior

Ping local corp IntrAnet 10.??.??.?? fails, but works from windows or git for windows. Ping DNS server fails, but works from windows or git for windows. Ping anything IntErnet fails. , but works from windows or git for windows.

Under WSL: $ route # fails, command fails under WSL2 $ nslookup anything # fails under WSL2 $ ping anything # FAILS no matter what you do. you can ping localhost (does not need DNS) but, PS> route PRINT # powershell works PS> Get-DnsClientServerAddress # works AND SHOWS ALL the DNS servers. and Cmd shell this works. Microsoft Windows [Version 10.0.19045.2486] (c) Microsoft Corporation. All rights reserved.

C:\Users\tclutten>nslookup 127.0.0.1 Server: USabc.com Address: 123.234.56.1

Name: localhost Address: 127.0.0.1

Diagnostic Logs

No response

KonanTheLibrarian commented 1 year ago

Continues to break after latest microsoft patches and the latest Ethernet / Drivers. VERY BAD BUG, COMBINED WITH DOCKER DESKTOP IS AN UNMITIGATED DISASTER!

KonanTheLibrarian commented 1 year ago

VSCODE 1.78.2 works but 1.79.0 WSL2 terminal inside VS CODE session/instance has network failure with lost ability to ping to the outside via standard IPsec VPNs including Global Protect.

This also means that using VSCODE WSL2 terminal and ssh into Linux servers providing docker containers also fails (all the time all other windows 10 applications can use the network without a problem). The previously working VSCODE sessions/instances to a remote Linux server providing docker containers connection dies (BECAUSE OF DISRESPECTFULLY SILENTLY UPGRADING to 1.79.0). (But works very well with VSCODE 1.78.2 so victims are advised to actually DOWNGRADE to VSCODE 1.78.2 to then able to ping to the outside and use the network and everything from that VSCODE WSL2 terminal again. )

DOWNGRADE VSCODE and Prevent Automatic Upgrades and Block Telemetry

Bugs in VSCODE get released to the public even though they were detected 6 months prior in VSCODE insiders edition. Developers know about bugs and simply close them unfixed. Magic without fixing the bug, the bug is fixed!

How to download on OLD version of VSCODE that works ... use this link https://update.code.visualstudio.com/1.30.1/win32-x64-user/stable past it into browser address and EDIT it to the version you need eg https://update.code.visualstudio.com/1.78.2/win32-x64-user/stable .
Do not download from anyplace else. Then verify on the Linux or WSL prompt using md5sum ... compare that output. $ md5sum VSCodeUserSetup-x64-1.78. 579248e2854c857b4fdcc10495b53412 VSCodeUserSetup-x64-1.78.1.exe c548b7599b450bc59e7d048150209240 *VSCodeUserSetup-x64-1.78.2.exe

COMPARE Checksums with other websites that monitor malware! https://visual-studio-code.en.lo4d.com/virus-malware-tests

IMPORTNT: Install the version you need without uninstalling the previous version, but when you start it make sure you are disconnected from the internet and follow the instructions below to prevent upgrade.

How to PREVENT VSCODE upgrading to a new version and stop using Telemetry?

Sadly VSCODE has the ability to post bug reports, but the developers then IGNORE them and set to closed/fixed without fixing or linking them to users posting previous bugs with the same general symptoms – so lose the data. This means that upgrading VSCODE makes bugs worse! Bugs in VSCODE insiders edition is the same, post bug reports, the bug report gets ignored and the VSCODE insiders edition gets released 6 months later and its bugs create victims! The cycle repeats until ALL THE geniuses that ignore the bugs git exposed.

Steps to prevent silent upgrade killing your work and do not forget to disable telemetry: 1) Install the correct version as described in the previous section. 2) Disconnect from the internet to prevent upgrading, but ignore the storm of popups that nag like a fish wife. 3) Open VSCODE that is the correct version you wish to keep (because it works).
If it is the wrong version follow the steps in the previous section. 4) Prevent upgrades Type:
a) Ctrl-, (meaning Ctrl comma )
b) In search settings enter the word: Update c) Click on “Application” (that has 3 or more entries for “Update)) d) Change 3 settings in the exact order below … and restart VSCODE.

How to Prevent Telemetry "telemetry.telemetryLevel": "off"

Note that telemetry continues to run without asking, so that is suspicious!
The same log process and logs files continue to grow after! WHY?

e) Ctrl-Shift-P into settings type in telemetry at the search and turn telemetry off.
f) Exit VSCODE and restart it. g) Check again this time Ctrl, (ie Ctrl comman) and type telemetry is it off?

KonanTheLibrarian commented 1 year ago

BROKEN WSL2 NETWORK WITH VPNs and DNS PING FAILURES FIXED AFTER 13 YEARS

The reference to "MUTT-HACK" has a clear meaning: the bug was in the DESIGN from the get go.

However both VSCODE and Visual Studio Pro telemetry spyware (note above) still running when disabled - NOT FIXED. (The above issue.) So no you CAN'T CLOSE THIS ISSUE! IT STAYS OPEN!

That WSL VPN network bug- is fixed by you by TOTALLY RIPPPING THE WHOLE THING OUT AND you rewrote it.

They literally rewrote the entire network setup for WSL2 the bug was that deep! FIXED here very good notes by Craig Loewen And please fix the FAKE DISABLE TELEMETARY IT IS EMBARASSING!

ThePlenkov commented 1 year ago

I'm quite curious how did you manage to estimate the cost of this issue? Why billions?

wp4nuv commented 10 months ago

I'm quite curious how did you manage to estimate the cost of this issue? Why billions?

I wonder if the calculation is 13 years x developer's salaries. IDK about revenue, but I will vouch for the networking shenanigans, especially with VPNs.

braincomb commented 1 month ago

Still experiencing this issue with WSL version 2.3.24.0, Kernel version: 5.15.153.1-2.

Intermittently losing connection inside terminal, looks like due to DNS issues since I can ping IP addresses, but any hostname results in Temporary failure in name resolution error.

So far only a full Windows restarts helps.

Networking mode: NAT DNS Proxy: false DNS Tunneling: false Best effort DNS parsing: false