Live data from Hacker News

WSL2 corrupting Git repositories and shell history

github.com

321–330 of 423 posts

Re: WSL2 corrupting Git repositories and shell history

#321

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…

Surely this is only a problem if your files live in the Windows filesystem (i.e. inside /mnt/$drive on WSL2)? I can't imagine Windows Defender scanning inside a disk image (/home on WSL2).

Re: WSL2 corrupting Git repositories and shell history

#322

Earlier quoted context omitted.

Not sure how an issue like this doesn’t make it into the test suite. Probably another symptom of them firing their QA team [1]. https://www.ghacks.net/2019/09/23/former-microsoft-employee-...

Things can’t go into the test suite if they don’t know what causes it

The issue is almost certainly related to WSL2 not being shut down properly and has been occurring in WSL2 for months. See the descriptions in [1] and [2] which are both linked to from the original thread [3].

[1]: https://github.com/microsoft/WSL/issues/5026

[2]: https://github.com/microsoft/WSL/issues/5895

[3]: https://github.com/microsoft/WSL2-Linux-Kernel/issues/168#is...

Re: WSL2 corrupting Git repositories and shell history

#324

Earlier quoted context omitted.

Calc is really not an adequate substitute for Excel if you need to use VBA macros - which might be coming from your customers! And in the wild I see plenty of older Excel documents (before 97) which I don’t think are compatible with LibreOffice. Obviously this isn’t an ideal situation but historical data around prices/etc from the 90s are often stored as old Excel binaries. In general I think using Calc (or Google Sh…

Not sure about Calc, but 'modern' Excel doesn't even seem to be able to deal with text (UTF-8) in CSV properly : https://news.ycombinator.com/item?id=25015679 (And I know from experience that 2003- versions of Excel don't.)

I am not arguing in favor of Excel! I hate Excel. I don’t have it installed on my personal devices. I never use Excel unless I have to. I am saying that Excel does specific things that are widely used in industry (especially finance and industry) which are not supported by Calc and that Calc is not a good replacement for many businesses.

Re: WSL2 corrupting Git repositories and shell history

#325
post #309

Earlier quoted context omitted.

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?

> windows has no concept of an executable bit

Sure it does. Execution is a permission you can set in the security tab.

> a rename could make it runnable

This is more likely why.

Re: WSL2 corrupting Git repositories and shell history

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

It was introducing in windows 10 release 2004. A lot of users myself included are still stuck on the 1909 update because it does not show up in our list of automatic updates. This usually happens if Microsoft update determines that some of your hardware may cause BSODs with the new update.

Re: WSL2 corrupting Git repositories and shell history

#327
post #81

Earlier quoted context omitted.

Had a serious talk a Unix manager over a decade ago who was convinced Windows ops didn't require as much expertise as Unix/Linux. It was a common misconception that MS seemed to encourage. As someone who came over from Windows, I knew better. That attitude continues to influence standard practices, hiring and, most importantly, training and education opportunities for Windows admins -- to the detriment of all. I've a…

Agreed. I've done both and if you ask me Windows ops is vastly more difficult because everything is brittle, inconsistent and unreliable and rarely repeatable almost all of the time. It requires great skill, determination and persistence to navigate issues like this. Unfortunately as you suggest, the outcome is hiring as cheap as possible and fixing all issues by not changing anything other than replacing everything…

It's not that brittle, MS backward-compatible supports a lot of APIs, but ... the upper layers on top are just vendor-ware shit 99% of the time. (Even/especially their own config/setup wizards/GUIs.)

I mean a bash script that handles no errors and outputs nothing just screams madness. The same thing wrapped in a .MSI .. well, you'll never know what hit your, and if it's your job to somehow unfuck this, it's virtually a piece of literal hell itself, slowly rotting and eroding people's soul and mind.

Re: WSL2 corrupting Git repositories and shell history

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

Any version from 1.0 to 10.1809.

Re: WSL2 corrupting Git repositories and shell history

#329
post #177

Earlier quoted context omitted.

The kernel should and can handle unexpected ahutdowns without corruption. Data loss sometimes, but not corruption.

This is data loss. A few object files in the Git directory are truncated. Which results in a corrupted repository, from Git's point of view.

Good to know, seems like a design flaw in git then, unless its using fsync correctly.

Re: WSL2 corrupting Git repositories and shell history

#330
post #44

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…

I was using WSL to do esp8266 development so I could use linux tools. The official esp8266 windows toolchain is based on cygwin. If I'm using something that needs a unix environment anyway, why use cygwin when you have WSL? I upgraded to WSL2 because well 2 is bigger than 1 so it must be better. But no, nothing worked. Serial ports are not supported in WSL2.

Why use WSL if you have Cygwin?
Post reply on HN