{"thread":{"id":"12706","subject":"Re: Repository corruption","startedAt":"2008-03-15T13:04:41Z","lastAt":"2008-03-16T23:14:10Z","messageCount":4,"participants":["Yann Dirson","Christian Couder","Petr Baudis","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"72179","messageId":"20080315130441.GF4079@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"12706","inReplyTo":"20080315121903.GY10335@machine.or.cz","subject":"Re: Repository corruption","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2008-03-15T13:04:41Z","receivedAt":"2008-03-15T13:04:41Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Sat, Mar 15, 2008 at 01:19:03PM +0100, Petr Baudis wrote:\n>   Hi,\n> \n> On Mon, Sep 10, 2007 at 11:25:50PM +0200, Yann Dirson wrote:\n> > Not sure if you saw my note in IRC: it looks like tagua/ydirson.git is\n> > definitely corrupted - not sure it would be useful to keep a copy\n> > around for investigation, but I'd appreciate if you could nuke the\n> > contents, so I can push again to it.\n> \n>   I have nuked it now. :-)\n\nThanks :)\n\nAny idea what caused the corruption ?\n\nBTW - although I have not reported it on the list, I recently had a\nrepo corrupted by a \"git gc\" with 1.5.4.3.  Not sure there would be a\nlink between those 2 events, but who knows...\n\nIt may not be easy to investigate, since I do not have an exact copy\nof it before the corruption (fortunately I was able to salvage most of\nthe work that had no backup copy), since that repo is a private one\nholding source code I am not allowed to publish, and since I will be\nleaving in 2 weeks the position that gives me access to that code.\n\nThe corruptions were of several kinds:\n- commits for unapplied stgit patches were all lost, although they\nwere reachable from refs/patches/master/*\n- seemingly-random objects in the history (commits, trees, probably\nblobs as well) were missing\n\nDoes anyone have ideas about post-mortem analysis on that repo ?\n\nThat tree was managed with stgit, using a rebase/commit workflow, and\naccumulated objects reported by git-count-objects over the months kept\ngrowing, even after \"git repack -a\" and \"git prune\", which always\nlooked suspect to me.\n\nAlthough it is possible that I had already run git-gc on that tree,\nthat would not be recently - it was basically a \"let's try it and see\nif we perform better afterwards\".\n\nBest regards,\n-- \nYann\n"},{"id":"72208","messageId":"200803160649.05911.chriscool@tuxfamily.org","threadId":"12706","inReplyTo":"20080315130441.GF4079@nan92-1-81-57-214-146.fbx.proxad.net","subject":"Re: Repository corruption","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-03-16T05:49:05Z","receivedAt":"2008-03-16T05:49:05Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi Yann,\n\nLe samedi 15 mars 2008, Yann Dirson a écrit :\n> The corruptions were of several kinds:\n> - commits for unapplied stgit patches were all lost, although they\n> were reachable from refs/patches/master/*\n> - seemingly-random objects in the history (commits, trees, probably\n> blobs as well) were missing\n>\n> Does anyone have ideas about post-mortem analysis on that repo ?\n\nDid you have a look at:\n\nhttp://git.kernel.org/?p=git/git.git;a=blob;f=Documentation/howto/recover-corrupted-blob-object.txt;h=323b513ed0e0ce8b749672f589a375073a050b97;hb=HEAD\n\nand\n\nhttp://git.or.cz/gitwiki/GitFaq#head-ac11406480d09e2df98588e800e41b7256602074\n\nBest regards,\nChristian.\n"},{"id":"72254","messageId":"20080316230151.GB6803@machine.or.cz","threadId":"12706","inReplyTo":"20080315130441.GF4079@nan92-1-81-57-214-146.fbx.proxad.net","subject":"Re: Repository corruption","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-03-16T23:01:51Z","receivedAt":"2008-03-16T23:01:51Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Sat, Mar 15, 2008 at 02:04:41PM +0100, Yann Dirson wrote:\n> On Sat, Mar 15, 2008 at 01:19:03PM +0100, Petr Baudis wrote:\n> >   Hi,\n> > \n> > On Mon, Sep 10, 2007 at 11:25:50PM +0200, Yann Dirson wrote:\n> > > Not sure if you saw my note in IRC: it looks like tagua/ydirson.git is\n> > > definitely corrupted - not sure it would be useful to keep a copy\n> > > around for investigation, but I'd appreciate if you could nuke the\n> > > contents, so I can push again to it.\n> > \n> >   I have nuked it now. :-)\n> \n> Thanks :)\n> \n> Any idea what caused the corruption ?\n\nMy idea I got few days ago when looking at the borken repositories is\nthat it was caused by interrupted git-repack, since there were stale\ntmp_pack* files left in the repository - it seems like it removed old\n\"redundant\" packs even though the new one weren't properly completed.\nBut that is just a speculation, and I did not get around to look at the\nscript yet whether this could really happen, or if something like this\ngot fixed recently.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nWhatever you can do, or dream you can, begin it.\nBoldness has genius, power, and magic in it.\t-- J. W. von Goethe\n"},{"id":"72257","messageId":"7v7ig2feil.fsf@gitster.siamese.dyndns.org","threadId":"12706","inReplyTo":"20080316230151.GB6803@machine.or.cz","subject":"Re: Repository corruption","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-16T23:14:10Z","receivedAt":"2008-03-16T23:14:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> My idea I got few days ago when looking at the borken repositories is\n> that it was caused by interrupted git-repack, since there were stale\n> tmp_pack* files left in the repository - it seems like it removed old\n> \"redundant\" packs even though the new one weren't properly completed.\n> But that is just a speculation, and I did not get around to look at the\n> script yet whether this could really happen, or if something like this\n> got fixed recently.\n\nHmm, unless you are talking about ef07618 (git-repack: Properly abort in\ncorrupt repository, 2005-11-21) as \"recent\", I do not see anything\nsuspicious.\n\nWe may want to refine the first comment in the remove-redundant loop to\nclarify, though.  We do check if elements of $existing are actually\nredundant or not in the loop against $fullbases these days, since ce85907\n(Only repack active packs by skipping over kept packs., 2006-10-29).\n"}]}