git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Attila Csosz <csosza@designsoftware.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>, git@vger.kernel.org
Subject: Re: Git bug report - disk errors on Windows after push
Date: Fri, 22 Apr 2022 17:04:32 +0200	[thread overview]
Message-ID: <CAMYm8FqU8zHUPFqWdM3Mpw3kj4yHEqHsNYFXz+b+p0vZZaVjYw@mail.gmail.com> (raw)
In-Reply-To: <220422.868rrx5uju.gmgdl@evledraar.gmail.com>

I'm using git on Windows for 6-7 years sometimes facing this problem
(different computers, different HDDs). Last time the problem occured
on my internal laptop HDD. So I have decided to report the problem.

If unstable to use local bare repos on Windows you should mention in
somewhere or completly disable it. Disk errors are unacceptable even
the git repo is corrupted.

Please check this link also
https://github.community/t/what-could-be-the-reason-my-git-repositories-keep-getting-corrupted-broken/184711

Attila


On Fri, Apr 22, 2022 at 11:27 AM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
>
>
> On Mon, Apr 18 2022, brian m. carlson wrote:
>
> > [[PGP Signed Part:Undecided]]
> > Hey,
> >
> > On 2022-04-18 at 07:47:07, Attila Csosz wrote:
> >> Thank you for filling out a Git bug report!
> >> Please answer the following questions to help us understand your issue.
> >>
> >> What did you do before the bug happened? (Steps to reproduce your issue)
> >> Pushing to a directory directly.
> >>
> >> What did you expect to happen? (Expected behavior)
> >> Good behavior
> >>
> >> What happened instead? (Actual behavior)
> >> Disk errors. After pushing to a directory (my origin field is C:\Work for
> >> example) the git repository will be corrupted.
> >> Moreover causing disk errors not only in the target git bare repository.
> >> I've loosed some other files.
> >> Cannot be reproduced exactly. However I have decided to report this problem.
> >> I've experienced this problem for several years.
> >
> > There's nothing that Git should be able to do as a normal operating
> > system that causes disk errors.  If you're seeing those kinds of errors,
> > the likelihood is that your disk is bad and you need to replace it.
> >
> > Do note that if you're storing your data in a directory managed by a
> > cloud syncing service (e.g., Dropbox or OneDrive), then it is known that
> > those file systems corrupt Git repositories and you shouldn't use them
> > with Git.  That's due to the way they sync data.
> >
> > However, if this is a regular file system (e.g., NTFS), then Git
> > shouldn't be able to cause disk problems, and if it could, that would be
> > a serious defect in Windows, so it's almost certainly going to be a
> > hardware problem.
>
> I think you're most likely right that this is some local HW issue, but
> the report doesn't have enough information to say either way.
>
> But generally as we've been discussing at length in various threads
> related to git's fsync() behavior we can and will corrupt repositories
> due only to our own (mis)use of FS APIs, i.e. not doing fsyncing and the
> like correctly, it's been improved a bit recently.
>
> But we're still in a state of not doing it correctly, and/or relying on
> some implicit assumptions.
>
> For something like an external disk that may have its power cable yanked
> I'd give it about even odds that it's HW v.s. git's own FS syncing logic
> being at fault.
>
> We get away with a lot of shenanigans because we're usually on a
> journaled FS, which e.g. on a FAT32 external volume we won't benefit
> from.
>
> Attila: I have no idea if this even exists on Windows, but aside from
> other suggestions in this thread I'd suggest enabling whatever Window's
> equivalent of "sync" mounting is (if it even exists). I.e. to have every
> single FS operation by synced to the metal.
>
> It will make your repository *much much slower*, but it will be safe as
> far as any logic errors in git vis-a-vis syncing go.

  reply	other threads:[~2022-04-22 15:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  7:47 Git bug report - disk errors on Windows after push Attila Csosz
2022-04-18 17:37 ` brian m. carlson
2022-04-19  3:52   ` Attila Csosz
2022-04-20 21:28     ` brian m. carlson
2022-04-20 22:54     ` Neeraj Singh
2022-04-21  2:29       ` Attila Csosz
2022-04-21 20:08         ` Neeraj Singh
2022-04-22  9:27   ` Ævar Arnfjörð Bjarmason
2022-04-22 15:04     ` Attila Csosz [this message]
2022-04-22 16:13     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMYm8FqU8zHUPFqWdM3Mpw3kj4yHEqHsNYFXz+b+p0vZZaVjYw@mail.gmail.com \
    --to=csosza@designsoftware.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).