Live data from Hacker News

WSL2 corrupting Git repositories and shell history

github.com

301–310 of 423 posts

Re: WSL2 corrupting Git repositories and shell history

#301

Earlier quoted context omitted.

After upgrading to WSL2, I started having issues with a Virtualbox VM. Turns out it didn't play nicely with HyperV. I went back to WSL1.

Newer VirtualBox releases can run virtual machines on top of Hyper-V as a virtualization engine. It is slower than VirtualBox' own engine, but overall it is still a better experience than Hyper-V Manager.

Networking doesn't work properly if you do this. It's a mess.

Re: WSL2 corrupting Git repositories and shell history

#302

Earlier quoted context omitted.

Opposite anecdata - I got a gaming PC and i migrated all my development to it and WSL(2) has been a godsend. VS Code has a "WSL Remote" mode that works really well (where a vscode server runs in Linux and the windows GUI access it "remotely"). I even use the Windows Github app for the occasional GUI-assisted commit, and apart from being slow its fine. I've had only two problems with this set up: - Occasionally VS Cod…

Oh you need to fucking disable Window's Defender though, or add exclusions for your Linux distro/WSL2 folder, because when installing "node_modules" it will attempt to do realtime scans for threat-protection which absolutely cripples the speed. https://www.cicoria.com/improving-windows-subsystem-for-linu... https://www.reddit.com/r/bashonubuntuonwindows/comments/eok7... "I noticed a significant performance difference…

Thanks for this tip! I've already been running into Defender problems myself.

Defender kept trying to quarantine my Windows hosts file so I had to add it as an exception but then 3 weeks later it started doing the same to my WSL2 Ubuntu's unmodified hosts file.

I'm glad I opted for Ubuntu and manually installing tools that I need instead of using the Kali subsystem. I couldn't imagine the headache that'd have created.

Re: WSL2 corrupting Git repositories and shell history

#303
post #298

Earlier quoted context omitted.

It didn't extend to use cases like containers, that would have basically required MS to rewrite large parts of the Linux kernel's core code for namespaces, mount points etc.

Sure. Running a Linux VM (WSL2) just to use containers seems to kind of defeat the point, though. You might as well just run your containers in VMs.

The use case is for developers to use their Linux tools with Windows integration. WSL1 only did the latter half well, "traditional" VMs only did the former. WSL2 does both, however that brings both advantages and disadvantages of VMs.

Re: WSL2 corrupting Git repositories and shell history

#304
post #224
post #97

Huh. I've used WSL2 and got extensively and never had any problems.

Me too. I abuse it often as well (hard shutdowns with wsl --shutdown, interacting with files from both Linux and Windows side, etc.). The only issue I have is that because of the virtualization approach it uses more RAM as there is no unified RAM pool for both Windows and WSL (as was the case with WSL1). But that's perhaps expected behavior.

You can still limit the amount of ram used by wsl 2 by setting it in the wslconfig. I like to limit the amount of cores it has access to as well as i tend to find that these two things are generally prone to spiking.

Re: WSL2 corrupting Git repositories and shell history

#305

Earlier quoted context omitted.

Oh you need to fucking disable Window's Defender though, or add exclusions for your Linux distro/WSL2 folder, because when installing "node_modules" it will attempt to do realtime scans for threat-protection which absolutely cripples the speed. https://www.cicoria.com/improving-windows-subsystem-for-linu... https://www.reddit.com/r/bashonubuntuonwindows/comments/eok7... "I noticed a significant performance difference…

This is nothing specific to WSL though, Windows has always had this problem. I expect there are many Windows developers who have no idea how much time they spend waiting for their code to be virus scanned every day.

To give an idea how bad it is, building Firefox on a Threadripper 3970X on Windows takes slightly over 12 minutes if you don't disable Defender and somewhere around 7 minutes if you do.

Re: WSL2 corrupting Git repositories and shell history

#307

WSL2 was promised as a good working extension for a Linux dev environment on windows by my peers. Sadly, a whole host of issues specific to my dev environment meant that it was useless as I’d spend more time fixing it than getting any valuable use out of it. More importantly, this became the very reason I switched to arch full time, and haven’t looked back since. I still hope that it becomes what it was promised to b…

i've used WSL2 with a Debian install and its worked flawlessly. Only issues i've had is working with ntfs volumes from the host, e.g /mnt/c. that's really slow. otherwise wsl2 has been fine for me

Re: WSL2 corrupting Git repositories and shell history

#308

Earlier quoted context omitted.

This is nothing specific to WSL though, Windows has always had this problem. I expect there are many Windows developers who have no idea how much time they spend waiting for their code to be virus scanned every day.

To give an idea how bad it is, building Firefox on a Threadripper 3970X on Windows takes slightly over 12 minutes if you don't disable Defender and somewhere around 7 minutes if you do.

What a horrible amount of overhead. Why does Defender need to scan the contents of a bunch of non-executable files? I suspect the answer runs deep and is at least somewhat horrifying.

Re: WSL2 corrupting Git repositories and shell history

#309

Earlier quoted context omitted.

To give an idea how bad it is, building Firefox on a Threadripper 3970X on Windows takes slightly over 12 minutes if you don't disable Defender and somewhere around 7 minutes if you do.

What a horrible amount of overhead. Why does Defender need to scan the contents of a bunch of non-executable files? I suspect the answer runs deep and is at least somewhat horrifying.

because windows has no concept of an executable bit, so a rename could make it runnable? or a benign looking program has a built-in interpreter run code from external file?

Re: WSL2 corrupting Git repositories and shell history

#310
post #269

Earlier quoted context omitted.

Acked by the MSFT folk: https://github.com/microsoft/WSL/issues/5026#event-416012748...

Are you sure this person is MSFT? There is zero information about them on GitHub.

Did MSFT start giving commit/moderation rights to outsiders on their repos? I assumed only MSFT org members can add tags to issues etc.
Post reply on HN