Live data from Hacker News

WSL2 corrupting Git repositories and shell history

github.com

131–140 of 423 posts

Re: WSL2 corrupting Git repositories and shell history

#131

I only see 1 user confirming it and he had a special or odd disk setup (merged disks which also do not show as merged, might be the source of the problem). Is this confirmed by anyone else?

My zsh history on wsl2 got corrupted last week. A friend shared a script to fix it, mentioning the same happened him in the past. Git is ok though.

Re: WSL2 corrupting Git repositories and shell history

#132
post #117

Earlier quoted context omitted.

> It always seemed strange to me that people would rather use WSL than the real thing when Windows doesn't bring much advantage. Windows brings lots of advantage to some things (including interfacing with the large number of people who rely on people having software that works only or best on Windows; in anything other than very tech-focussed firms this probably includes your employer, and even in such firms it often…

being able to play video games and alt tab into writing and testing code during queue times is huge for me

I remember when we used to write code and alt tab into a game while it compiled.

How the world has changed!

Re: WSL2 corrupting Git repositories and shell history

#133
post #33

I think calling it WSL2 was a mistake. The predecessor, WSL, "just worked" and it was more a less a linux experience for most practical purposes-- and certainly better than hoary old cygwin. This caused a lot of people to believe they could just transition to WSL2, lead on by the promise of an even more performant linux experience. The documentation didn't say anything about complications from attempting this, so a l…

Wasn't the main purpose of WSL2 to make WSL finally usable because before v2 it had really bad IO perf?

Except they moved performance backwards in WSL2 for accessing files shared with Windows: https://github.com/microsoft/WSL/issues/4197

Re: WSL2 corrupting Git repositories and shell history

#134
post #56
post #41

Earlier quoted context omitted.

Rushing half-finished products out, offering little/zero support is the new Microsoft. The reason $MSFT loves open source is because they can get press hype over projects that are 75% complete (which is the main goal), and they don't even need to support it, document it, or make it actually work.

Half-finished releases haven been Microsofts SOP since forever. And especially for payware, bugs are only fixed in the next release, so you need to buy the subscription or the new release.

Really?

https://github.com/microsoft/WSL/issues/4619

https://github.com/microsoft/WSL/issues/6069

Re: WSL2 corrupting Git repositories and shell history

#135

> Feel like booting Linux on a separate disk because of these issues. It always seemed strange to me that people would rather use WSL than the real thing when Windows doesn't bring much advantage. What am I missing ?

I'm one of those people who is forced to keep Windows around because of my employer. Our VPN only works in Windows.

Some people have made Juniper Pulse Client work in Linux, even a co-worker has posted some instructions. But I already have a setup where I start the VPN client in a Windows VM and tunnel through it.

I feel like any Linux solution would take a lot of time to setup and might not be as robust.

Another reason I still need Windows around is we only support S/MIME encryption in the Outlook client. Part of this is because of how our internal IT configures the cert, there is a way to make it work in the webmail but our IT guys have either opted out of that or not gotten around to it.

That's pretty much it though. I can happily use Linux for 99.99% of my time.

Re: WSL2 corrupting Git repositories and shell history

#136
post #118

Earlier quoted context omitted.

Windows is moving to a model where Windows itself is run as a virtualized OS. I believe this is enabled by default in new installs. So having a Linux VM in Hyper-V isn't opening up much new attack surface.

First I hear of this. Source? Googling for this predictably returned unhelpful results.

In VBS environments, the normal NT kernel runs in a virtualized environment called VTL0, while the secure kernel runs in a more secure and isolated environment called VTL1.

https://www.microsoft.com/security/blog/2020/07/08/introduci...

https://docs.microsoft.com/en-us/windows-hardware/design/dev...

Re: WSL2 corrupting Git repositories and shell history

#137
The fact that this can even happen is enough for me to never touch this for doing work.

I stopped developing on Windows after the Windows 8 fiasco and I don't see myself ever coming back.

Both Mac and Linux are faster, more convenient, and more solid in my experience.

I considered advising my son to buy a Surface for his school work and developing on WSL2, but I'm glad the M1 Mac came out with a much better cost/performance, so he got one. At least his git repos won't get corrupted.

Re: WSL2 corrupting Git repositories and shell history

#138
post #30

Earlier quoted context omitted.

File system corruption is unforgivable mistake, but FS work is really hard to get right. Even stuff like VMware corrupts shared folders ... wherever they try to bypass a driver translation layer. Just Google for “vmware shared folder corruption”

FS corruption is the worst as you lose total confidence in the product. This is a mega process escape that the WSL team would need to transparently detail why it happened, what the remedy is, and why it'll never, ever happen again.

My guess is it's the result of shutting down the virtual machine that runs the Linux kernel too soon, leaving writes to the virtual hard disk in an inconsistent state. This coincides with "shutdown /r /t 0" being able to cause it as well as blue screens or power loss. And explains why I've never seen it, despite using WSL2 on insider preview builds on multiple machines daily: I almost never shut down, only for updates and new builds.

Re: WSL2 corrupting Git repositories and shell history

#139
post #104

Earlier quoted context omitted.

You are missing Office, Outlook, Visual Studio, and any enterprise nonsense IT requires on company computers. All of that requires Windows.

The web version of Outlook has come a long way, and in my opinion has become the superior product (for my use cases, at least).

The web version does work until you need to sign into more than 2 accounts per day (1 in regular, 1 in private). If you need more than 2 accounts, it does not work anymore.

Edit: it does work, but it will sign you out from all M365 services which requires a lot of logins for nothing.

Re: WSL2 corrupting Git repositories and shell history

#140
post #30

Earlier quoted context omitted.

File system corruption is unforgivable mistake, but FS work is really hard to get right. Even stuff like VMware corrupts shared folders ... wherever they try to bypass a driver translation layer. Just Google for “vmware shared folder corruption”

FS corruption is the worst as you lose total confidence in the product. This is a mega process escape that the WSL team would need to transparently detail why it happened, what the remedy is, and why it'll never, ever happen again.

> WSL team

I'd say WSL2 team, because it worked well in the original WSL.

Post reply on HN