trevorr / vss2git

Migrate Visual SourceSafe repositories to Git
Apache License 2.0
153 stars 116 forks source link

many corrupt files after import #30

Closed chrwei closed 8 years ago

chrwei commented 8 years ago

did a large test conversion it seemed to complete OK, but a "git fsck" gives things like:

error: sha1 mismatch c01a808c576c135d4308ab530de5b2011d2b4b00
error: c01a808c576c135d4308ab530de5b2011d2b4b00: object corrupt or missing
error: inflate: data stream error (incorrect data check)
error: sha1 mismatch c10a1eff6b2cc9f39fb6b49525644afb223c3622
error: c10a1eff6b2cc9f39fb6b49525644afb223c3622: object corrupt or missing
error: inflate: data stream error (incorrect data check)
error: sha1 mismatch c2a4f0b821e996ee456be485260b7696fae9b1ab
error: c2a4f0b821e996ee456be485260b7696fae9b1ab: object corrupt or missing
error: sha1 mismatch cc1bd3f3c2f2974f2de863a7e4594564efd8d18c
error: cc1bd3f3c2f2974f2de863a7e4594564efd8d18c: object corrupt or missing
error: inflate: data stream error (incorrect data check)
fatal: loose object ce283a388e5eb901dd59a68eee564d83208f64d2 (stored in .git/objects/ce/283a388e5eb901dd59a68eee564d83208f64d2) is corrupt

general search says there's corruption like HDD or file system, but this is on a VM on RAID with no raid errors and nothing crashed and the filesystems check fine. basically I'm left with just deleting all these files, and I have no way to even tell what they are for. since it's just a test I've deleted some, but there always seems to be more. I've deleted maybe 30 files and fsck get about 50%.

is this some issue with the sourcesafe repo, or the git version (mingw64 from gitgui installer) or something else?

chrwei commented 8 years ago

FWIW, I killed the repo and i'm running it again. it's 10K changesets so I'll report back tomorrow :smile:

chrwei commented 8 years ago

same thing.

$ git status
On branch master
nothing to commit, working directory clean

$ git fsck
error: inflate: data stream error (incorrect data check)
fatal: failed to read object 0350d7533d8fdc5343871e12f0a1ccf193b44c82: Invalid argument

ideas to tell what went wrong?

chrwei commented 8 years ago

I do have several things in the log like "NOTE: Skipping destroyed file:", possible that these are those files? I don't know enough about how git works for that...

trevorr commented 8 years ago

I haven't heard of these git errors happening without actual storage corruption. It's basically saying that data that went into git is not coming back out the same, so vss2git should have nothing to do with it. (vss2git only uses the git executable -- it never directly accesses any files under .git.) Have you tried using git fsck --verbose to get more details?

Please also share what git version, OS version, and file system (type and whether local or remote) you're using.

chrwei commented 8 years ago

git version 2.9.0.windows.1, from the gitgui installer. Windows8 x64 running in a KVM vm. I do all my windows devel in this VM and have never had any issues.

--verbose just tells me the GUIDs it's checking, but still the same error with no more detail.

I copied my sourcesafe local and my destination git is also local, so both on the C:, NTFS. chkdsk passed all checks. I do have ntfs compression enabled as it speeds up IO in VMs, maybe some issue with that? I can try again with that off.

trevorr commented 8 years ago

I don't have any experience with any of that environment (very recent git, Win8, KVM, NTFS compression), but it doesn't particularly raise any red flags. Some things to try:

chrwei commented 8 years ago

the one from https://git-for-windows.github.io/ specifically.

I'll give those things a try. thanks.

chrwei commented 8 years ago

turning off NTFS compression and recopying the source repo seems to have fixed it.

trevorr commented 8 years ago

Yikes. I'll think twice before enabling NTFS compression then. 😉