Live data from Hacker News

WSL2 corrupting Git repositories and shell history

github.com

231–240 of 423 posts

Re: WSL2 corrupting Git repositories and shell history

#231
post #213

Earlier quoted context omitted.

It's a true statement but it's quite unhelpful to tell people that a problem they have is fixed in a different semi-compatible piece of software.

It probably depends a lot on your specific use patterns, but I expect for most people this was a change that basically fixed a bunch of bugs, introduced negligible new issues, and had an identical interface.

Is WSL really so buggy? I never got that impression myself. All my problems with things getting fussy have been on WSL2.

Re: WSL2 corrupting Git repositories and shell history

#232
post #2

More: - WSL2 sometime corrupt .zsh_history and git https://github.com/microsoft/WSL/issues/5026 - WSL2 corrupts ext4 filesystem https://github.com/microsoft/WSL/issues/5895

This is probably HyperV. I’ve seen exactly this ext4 corruption in production on windows server 2012R2 with CentOS 7. Even to the point that the machine remounts root read only. Unfortunately our windows operations guys are severely lacking in diagnostic savvy and just reboot the machine over and over again or blast it and provision a new one and don’t analyse the problem. From what I’ve seen it’s a combination of th…

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.

Re: WSL2 corrupting Git repositories and shell history

#233

> 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 ?

This is why I like macOS so much. I understand that it's not the same as having Ubuntu in WSL, but using the Mac terminal is so close to the experience I have when I SSH into my Ubuntu box that it's nearly 1:1 for me.

macOS is not perfect. Brew is inferior to apt-get (which WSL2 offers), and Docker needs virtualization in macOS as well. Windows + WSL2 is a strong competitor for the Unix experience on Mac, and sometimes even better (because it is actual Linux and not just a POSIX-compliant Unix terminal).

Re: WSL2 corrupting Git repositories and shell history

#234
post #75

A while back spent about 2 mos mastering WSL2 and came to the conclusion that the default of automatically opening up in the Windows fs share was... unwise. Besides fs permissions being a complete mess, the unstable behavior described here liked to show up at the most inopportune moments. Wound up confining my work to the virtual Linux fs, but that kind of defeated the whole purpose of WSL for me. I'm also back to us…

I find wsl2 with docker to be a decent use case. You get a reliable terminal that doesn't just background processes you ctrl-c to.

The IO is slow but overall manageable. File permissions are a joke but they're being ported into a container. I don't see WSL as an environment as much as it's just a more reliable terminal with a shotty emulated filesystem.

Re: WSL2 corrupting Git repositories and shell history

#235
post #109

Earlier quoted context omitted.

The difference on I/O is enough to make WSL unusable. I wasted a day trying to figure out if I had a problem with anti-virus or something that was blocking me before realizing that WSL I/O is just... well, slow. People kept telling me to upgrade to WSL2 to solve that but the version of windows I had didn't allow it. Might have been a blessing in disguise given the data corruption bugs.

What version of Windows doesn’t have WSL2?

You need at least Win 10 version 1903

Re: WSL2 corrupting Git repositories and shell history

#236
post #213

Earlier quoted context omitted.

It probably depends a lot on your specific use patterns, but I expect for most people this was a change that basically fixed a bunch of bugs, introduced negligible new issues, and had an identical interface.

Is WSL really so buggy? I never got that impression myself. All my problems with things getting fussy have been on WSL2.

I tried to build two projects in WSL1, one using the Z3 theorem prover, and one using Chrome for scraping. Both ran into kernel issues. So for me it failed about 100% of the time on anything non-trivial.

Re: WSL2 corrupting Git repositories and shell history

#237
post #4
post #2

More: - WSL2 sometime corrupt .zsh_history and git https://github.com/microsoft/WSL/issues/5026 - WSL2 corrupts ext4 filesystem https://github.com/microsoft/WSL/issues/5895

But why? WSL1 was something like wine but reverse, but WSL2 is actually linux.

FreeBSD has native support for Linux binaries by mapping system calls, and it's fairly reliable when it works. What's nice is that when it works, it works, adding support for system calls improves coverage, and since underlying things like the FS aren't virtualized, it tends to be pretty reliable.

Re: WSL2 corrupting Git repositories and shell history

#238

Important I think to point out that these are (numerous) user reports of files "corrupted". There isn't afaics any confirmation yet as to exactly what's happening nor the underlying cause.

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

Re: WSL2 corrupting Git repositories and shell history

#239
I only use Windows because of a couple of tools there is no equivalent version for Linux. Unfortunately companies think there would be not enough customers to warrant development for that OS so I am kind of stuck with maintaining dedicated Windows PC. I have mixed feelings about Microsoft appropriation of Linux. Whatever they touch turns to excrement with a few exceptions.

Re: WSL2 corrupting Git repositories and shell history

#240

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/perf…

I am a macOS user myself (daily driver since circa 2016, Arch/Ubuntu 2013-2016 and Win 7 before that) and I can tell you that the honeymoon is surely over. On top of that, I have my 2 old laptops running as Win10 and Ubuntu 20.04 LTS home servers and I can say they have not given me any grief. I feel that Windows and Ubuntu LTS are getting more and more stable while macOS is going towards "move fast and break things" with every release (both still require some group policy fu and command line fu respectively but that's not a big deal). Back in the days, you'd snapshot your Windows XP with Acronis or something similar every time you'd install something major and these days I am contemplating downgrading to Mojave from Catalina. Big Sur is out of the question with things like firewall bypass and many others.

P.S. You simply cannot make this stuff up: as I was typing this comment in Safari, my input field text became blurred just like that in an instant https://imgur.com/a/2Ae0QpZ

Post reply on HN