From 54db5df937a39d8662c8bbdae7de8bedef7e97e6 Mon Sep 17 00:00:00 2001 From: Atemu Date: Sun, 16 May 2021 10:27:47 +0000 Subject: [PATCH] Added a comment --- ..._cf152fccbdb281dcbeb02cb398686ac0._comment | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 doc/bugs/Git_repos_corrupt_themselves/comment_4_cf152fccbdb281dcbeb02cb398686ac0._comment diff --git a/doc/bugs/Git_repos_corrupt_themselves/comment_4_cf152fccbdb281dcbeb02cb398686ac0._comment b/doc/bugs/Git_repos_corrupt_themselves/comment_4_cf152fccbdb281dcbeb02cb398686ac0._comment new file mode 100644 index 0000000000..58dcf16bd5 --- /dev/null +++ b/doc/bugs/Git_repos_corrupt_themselves/comment_4_cf152fccbdb281dcbeb02cb398686ac0._comment @@ -0,0 +1,85 @@ +[[!comment format=mdwn + username="Atemu" + avatar="http://cdn.libravatar.org/avatar/d1f0f4275931c552403f4c6707bead7a" + subject="comment 4" + date="2021-05-16T10:27:47Z" + content=""" +Something peculiar just happened. I had the MBP with me while I was out and was editing documents with no connection to any of my machines. + +I usually stop the assistant at home so that it only runs on one machine at a time because of https://git-annex.branchable.com/bugs/OSX__58___Pushed_changes_are_autocommited/ but because I was out, I started it. + +On startup, it said that it was trying to repair my repo. I shut it down because it couldn't do any repairs without a connection to my machines (and it wouldn't succeed even if it did unfortunately). + +I ran `git fsck` to see what happened but, to my surprise, it returned no errors besides missing reflog entries from previous corruptions. `git gc` didn't error either. + +I commited my changes manually while I was out. + +That was about two days ago. I synced my changes manually at home where an unrelated and trivial issue happened during which I ran another successful `git fsck` and, after fixing that issue, I started the webapp. +It was attempting to repair again and was complaining about a thread having crashed (logs below). + +Now however, the repo is actually broken with missing blobs, trees and links everywhere. + +daemon.log.1: + +``` +[2021-05-16 11:58:04.848709] main: starting assistant version 8.20210330 +[2021-05-16 11:58:04.946261] Cronner: Consistency check in progress +[2021-05-16 11:58:04.974666] TransferScanner: Syncing with SOTERIA +(scanning...) [2021-05-16 11:58:05.191375] Watcher: Performing startup scan +(recording state in git...) +(recording state in git...) +(recovering from race...) +ControlSocket .git/annex/ssh/atemu@192.168.101.24 already exists, disabling multiplexing +To ssh://192.168.101.24/~/Annex/Documents.git/ + 343d6291c..184ff9756 git-annex -> synced/git-annex +[2021-05-16 11:58:09.404901] Cronner: Attempting to repair MB- [here] +Watcher crashed: PauseWatcher +[2021-05-16 11:58:09.445038] Watcher: warning Watcher crashed: PauseWatcher +Unpacking all pack files. +fatal: early EOF +``` + +daemon.log: + +``` +[2021-05-16 11:58:21.699212] main: starting assistant version 8.20210330 +[2021-05-16 11:58:21.778787] Cronner: You should enable consistency checking to protect your data. +[2021-05-16 11:58:22.249053] TransferScanner: Syncing with SOTERIA +Auto packing the repository in background for optimum performance. +See \"git help gc\" for manual housekeeping. +Everything up-to-date + + + +[2021-05-16 11:58:25.957064] Transferrer: Uploaded <1 pdf file> +[2021-05-16 11:58:25.95937] Pusher: Syncing with SOTERIA +(recording state in git...) +error: invalid object 100644 3d5a69ecabdbf871de3b7c339b16bc9315ae17e4 for '5d3/ae2/SHA256E-s56534--2de587e678bd455f4346a5304e450eafac892f1a389ee4046cd25948a01789a9.pdf.log.met' +fatal: git-write-tree: error building trees +Pusher crashed: failed to read sha from git write-tree +CallStack (from HasCallStack): + error, called at ./Git/Sha.hs:23:15 in main:Git.Sha +[2021-05-16 11:58:26.037969] Pusher: warning Pusher crashed: failed to read sha from git write-tree +CallStack (from HasCallStack): + error, called at ./Git/Sha.hs:23:15 in main:Git.Sha + + +[2021-05-16 11:58:28.564268] Transferrer: Uploaded +[2021-05-16 11:58:51.983601] Pusher: Syncing with SOTERIA +(recording state in git...) +error: invalid object 100644 3b1a2b60bcb28a299c7e6b706ce3de5808909bcc for '031/bc2/SHA256E-s138590--273323cbd322923f9d19280b6b4fa73bfa3638d2982b685b9efcaee43c988a07.pdf.log.met' +fatal: git-write-tree: error building trees +Pusher crashed: failed to read sha from git write-tree +CallStack (from HasCallStack): + error, called at ./Git/Sha.hs:23:15 in main:Git.Sha +[2021-05-16 11:58:52.11129] Pusher: warning Pusher crashed: failed to read sha from git write-tree +CallStack (from HasCallStack): + error, called at ./Git/Sha.hs:23:15 in main:Git.Sha +[2021-05-16 11:59:08.905898] main: warning git-annex has been shut down +``` + +I haven't set the fsync option yet but this system hasn't been restarted in a long time and the corruption happened while the system was on; right in front of my eyes basically. + +I'll now manually fix the corruption again by rsync'ing the `.git/objects/` dir to the state of a working repo's. + +"""]]