{"thread":{"id":"8658","subject":"Debugging strange \"corrupt pack\" errors on SuSE 9","startedAt":"2007-06-20T02:36:26Z","lastAt":"2007-06-20T08:46:33Z","messageCount":10,"participants":["Martin Langhoff","Nicolas Pitre","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"45394","messageId":"46a038f90706191936m121a94e4x1e59dff4fe217988@mail.gmail.com","threadId":"8658","inReplyTo":null,"subject":"Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2007-06-20T02:36:26Z","receivedAt":"2007-06-20T02:36:26Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"A colleage at work is using git to manage code updates to a heavily\nfirewalled machine at a client site. In a nutshell, we \"push\" the\ninteresting code to a repo on usb-stick, and we pull from it on the\nclient's machine.\n\nWe do some coding and testing on that machine, so ocassionally we\nbring some patches back.\n\nNow the working repo on the client machine has started to die with\n\"corrupt pack\" errors. I am trying to get my hands on the literal\nerror messages, and exact software versions installed. Right now all I\nknow is that it is SuSE 9 x86, git 1.4.x, cogito .17.x . The error\nappears on git-diff, git-fsck-objects --full\n\nWe did bring a copy of the working copy with the \"corrupt pack\" to our\noffice, and here git (v1.5.1 and 1.5.2) thinks it's perfectly well.\n\nSo I am a bit puzzled - while we try to get 1.5.x on the client\nmachine and see what happens, is there anything that could be causing\nthis? Any additional tests that we should run?\n\ncheers,\n\n\nmartin\n"},{"id":"45398","messageId":"alpine.LFD.0.99.0706192313290.20596@xanadu.home","threadId":"8658","inReplyTo":"46a038f90706191936m121a94e4x1e59dff4fe217988@mail.gmail.com","subject":"Re: Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-06-20T03:33:24Z","receivedAt":"2007-06-20T03:33:24Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 20 Jun 2007, Martin Langhoff wrote:\n\n> A colleage at work is using git to manage code updates to a heavily\n> firewalled machine at a client site. In a nutshell, we \"push\" the\n> interesting code to a repo on usb-stick, and we pull from it on the\n> client's machine.\n> \n> We do some coding and testing on that machine, so ocassionally we\n> bring some patches back.\n> \n> Now the working repo on the client machine has started to die with\n> \"corrupt pack\" errors. I am trying to get my hands on the literal\n> error messages, and exact software versions installed. Right now all I\n> know is that it is SuSE 9 x86, git 1.4.x, cogito .17.x . The error\n> appears on git-diff, git-fsck-objects --full\n\nThe full exact error message would be highly useful indeed.\n\n> We did bring a copy of the working copy with the \"corrupt pack\" to our\n> office, and here git (v1.5.1 and 1.5.2) thinks it's perfectly well.\n> \n> So I am a bit puzzled - while we try to get 1.5.x on the client\n> machine and see what happens, is there anything that could be causing\n> this? Any additional tests that we should run?\n\nMaybe the client machine runs git version < 1.4.2.2, in which case it is \npossible that your push created a pack containing delta objects with \noffset to base which git versions prior 1.4.2.2 do not understand.\n\nIf this is the problem you are facing (the error message should confirm \nthis) then the easiest solution is to upgrade git on the client.\n\nA quick fix for the client is to set repack.usedeltabaseoffset to \nfalse on the machine where you have git 1.5 installed, then run \"git \nrepack -a -d\", and finally copy the pack over to the client repository.  \nBut because you push to a local repository (a mounted USB stick is \nconsidered a local repo) then you don't get to negociate the pack \ncapabilities of the final destination, and therefore more \"bad\" delta \nobjects might sneak in again.\n\n\nNicolas\n"},{"id":"45400","messageId":"46a038f90706192117x53420c04o27f05e8fa6c338a5@mail.gmail.com","threadId":"8658","inReplyTo":"alpine.LFD.0.99.0706192313290.20596@xanadu.home","subject":"Re: Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2007-06-20T04:17:11Z","receivedAt":"2007-06-20T04:17:11Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 6/20/07, Nicolas Pitre <nico@cam.org> wrote:\n> The full exact error message would be highly useful indeed.\n\nYes. I haven't seen it first hand either, and the machine is closely\nguarded :-/ but I think you are on to something: it's a v1.4.0.\n\n# git --version\n> git version 1.4.0\n\n# cat /etc/issue\nWelcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel \\r (\\l).\n# uname -a\nLinux lhostname 2.6.5-7.244-bigsmp-100hz #3 SMP Sun Aug 13 21:50:35 NZST\n2006 i686 i686 i386 GNU/Linux\n\nThe errors look like\n\n# git-pull /home/jun/moodle-r2.git\nird-mk2:fromusb\nfatal: git-unpack-objects exec failed\nfatal: git-unpack-objects died with error code 128\nFetch failure: /home/jun/moodle-r2.git\n\n# cg-update fromusb\nUsing hard links\nFetching head...\nFetching objects...\nGetting pack 445d79a6fe09a3d03489449f63faef0d9e9e2668\n which contains 4f4773fb3403f3ec4097ab7c7b1fdec23b9aa924\nfatal: corrupted pack file\n.git/objects/pack/pack-445d79a6fe09a3d03489449f63faef0d9e9e2668.pack\nprogress: 2 objects, 0 bytes\ncg-fetch: objects fetch failed\n\n> Maybe the client machine runs git version < 1.4.2.2, in which case it is\n> possible that your push created a pack containing delta objects with\n> offset to base which git versions prior 1.4.2.2 do not understand.\n\nOuch. We weren't supposed to have non-backwards compatible changes...\n\n> If this is the problem you are facing (the error message should confirm\n> this) then the easiest solution is to upgrade git on the client.\n\nHa ha. Not particularly easy, unfortunately.\n\n> A quick fix for the client is to set repack.usedeltabaseoffset to\n> false on the machine where you have git 1.5 installed, then run \"git\n> repack -a -d\", and finally copy the pack over to the client repository.\n\nThat'll be a bit easier -- it's a fix we can do on the transfer repo ourselves.\n\nThanks! I do wonder though -- isn't a backwards-incompatible change\nlike this worthy of don't we bump core.repositoryformatversion?\n\n> But because you push to a local repository (a mounted USB stick is\n> considered a local repo) then you don't get to negociate the pack\n> capabilities of the final destination, and therefore more \"bad\" delta\n> objects might sneak in again.\n\nHow does that work? So any repo we push _from_ can override (and muck\nup) the destination repo, ignoring its config?\n\nThat sounds a bit broken - the pack being built for a local\ndestination should respect the settings of the destination repo.\n\n\nm\n"},{"id":"45401","messageId":"46a038f90706192120q6c64a854re589f27b3bdbc0d5@mail.gmail.com","threadId":"8658","inReplyTo":"46a038f90706192117x53420c04o27f05e8fa6c338a5@mail.gmail.com","subject":"Re: Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2007-06-20T04:20:09Z","receivedAt":"2007-06-20T04:20:09Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 6/20/07, Martin Langhoff <martin.langhoff@gmail.com> wrote:\n> > But because you push to a local repository (a mounted USB stick is\n> > considered a local repo) then you don't get to negociate the pack\n> > capabilities of the final destination, and therefore more \"bad\" delta\n> > objects might sneak in again.\n>\n> How does that work? So any repo we push _from_ can override (and muck\n> up) the destination repo, ignoring its config?\n>\n> That sounds a bit broken - the pack being built for a local\n> destination should respect the settings of the destination repo.\n\nOTOH, as a workaround, it _should_ work if I force a repack on the\nusb-repo after each push, right? It'll wear the USB disk out, waste\nhuman+cpu time and kill some kittens along the way, but it'll do for\nthe time being.\n\ncheers,\n\n\nm\n"},{"id":"45402","messageId":"alpine.LFD.0.99.0706200053520.20596@xanadu.home","threadId":"8658","inReplyTo":"46a038f90706192117x53420c04o27f05e8fa6c338a5@mail.gmail.com","subject":"Re: Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-06-20T05:01:54Z","receivedAt":"2007-06-20T05:01:54Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 20 Jun 2007, Martin Langhoff wrote:\n\n> On 6/20/07, Nicolas Pitre <nico@cam.org> wrote:\n> > Maybe the client machine runs git version < 1.4.2.2, in which case it is\n> > possible that your push created a pack containing delta objects with\n> > offset to base which git versions prior 1.4.2.2 do not understand.\n> \n> Ouch. We weren't supposed to have non-backwards compatible changes...\n\nWell... to be fair, we should say that your setup is a bit non \nconventional.\n\n> > If this is the problem you are facing (the error message should confirm\n> > this) then the easiest solution is to upgrade git on the client.\n> \n> Ha ha. Not particularly easy, unfortunately.\n> \n> > A quick fix for the client is to set repack.usedeltabaseoffset to\n> > false on the machine where you have git 1.5 installed, then run \"git\n> > repack -a -d\", and finally copy the pack over to the client repository.\n> \n> That'll be a bit easier -- it's a fix we can do on the transfer repo\n> ourselves.\n> \n> Thanks! I do wonder though -- isn't a backwards-incompatible change\n> like this worthy of don't we bump core.repositoryformatversion?\n\nThe repository hasn't really changed, and even such a version bump \nwouldn't help you anyway.\n\nI also note that you're using cogito.  And from what I can deduce, it \nseems that cogito is simply copying the pack(s) over without further \nsanity checks.  This only serves to muddy things even further.\n\nIf your client machine is so important then you should consider \nupgrading to a later git version, and stop using cogito.  It will solve \nthis pack problem, and you'll get added pack sanity checks as a bonus.\n\n\nNicolas\n"},{"id":"45404","messageId":"46a038f90706192210t4594cc86he6a2dd6093b9a1f3@mail.gmail.com","threadId":"8658","inReplyTo":"alpine.LFD.0.99.0706200053520.20596@xanadu.home","subject":"Re: Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2007-06-20T05:10:59Z","receivedAt":"2007-06-20T05:10:59Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 6/20/07, Nicolas Pitre <nico@cam.org> wrote:\n> Well... to be fair, we should say that your setup is a bit non\n> conventional.\n\nYou mean this doesn't affect things between 1.4.0 and 1.5.0 on either\nend of the git protocol?\n\n> I also note that you're using cogito.  And from what I can deduce, it\n> seems that cogito is simply copying the pack(s) over without further\n> sanity checks.  This only serves to muddy things even further.\n\nYep - we are moving away from cogito; the machine is important, but\nit's very awkward to install/upgrade sw on it.\n\ncheers,\n\n\nm\n"},{"id":"45405","messageId":"alpine.LFD.0.99.0706200102380.20596@xanadu.home","threadId":"8658","inReplyTo":"46a038f90706192117x53420c04o27f05e8fa6c338a5@mail.gmail.com","subject":"Re: Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-06-20T05:12:39Z","receivedAt":"2007-06-20T05:12:39Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 20 Jun 2007, Martin Langhoff wrote:\n\n> On 6/20/07, Nicolas Pitre <nico@cam.org> wrote:\n> \n> > But because you push to a local repository (a mounted USB stick is\n> > considered a local repo) then you don't get to negociate the pack\n> > capabilities of the final destination, and therefore more \"bad\" delta\n> > objects might sneak in again.\n> \n> How does that work? So any repo we push _from_ can override (and muck\n> up) the destination repo, ignoring its config?\n> \n> That sounds a bit broken - the pack being built for a local\n> destination should respect the settings of the destination repo.\n\nBut it does!  The problem is that _you_ are cheating it by removing the \nUSB stick and mounting it somewhere else.\n\nThen you're using cogito which bypasses things.\n\nIf you use pure git on the client machine, and actually use git-pull or \ngit-fetch _without_ the -l switch then validation of the updated data \nwill occur and there would be no way to muck up the destination repo.\n\n\nNicolas\n"},{"id":"45406","messageId":"alpine.LFD.0.99.0706200113020.20596@xanadu.home","threadId":"8658","inReplyTo":"46a038f90706192120q6c64a854re589f27b3bdbc0d5@mail.gmail.com","subject":"Re: Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-06-20T05:14:48Z","receivedAt":"2007-06-20T05:14:48Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 20 Jun 2007, Martin Langhoff wrote:\n\n> OTOH, as a workaround, it _should_ work if I force a repack on the\n> usb-repo after each push, right? It'll wear the USB disk out, waste\n> human+cpu time and kill some kittens along the way, but it'll do for\n> the time being.\n\nRight.  And you don't need to use -f with git-repack for it to work.\n\n\nNicolas\n"},{"id":"45407","messageId":"alpine.LFD.0.99.0706200116120.20596@xanadu.home","threadId":"8658","inReplyTo":"46a038f90706192210t4594cc86he6a2dd6093b9a1f3@mail.gmail.com","subject":"Re: Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-06-20T05:17:18Z","receivedAt":"2007-06-20T05:17:18Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 20 Jun 2007, Martin Langhoff wrote:\n\n> On 6/20/07, Nicolas Pitre <nico@cam.org> wrote:\n> > Well... to be fair, we should say that your setup is a bit non\n> > conventional.\n> \n> You mean this doesn't affect things between 1.4.0 and 1.5.0 on either\n> end of the git protocol?\n\nExact.\n\n\nNicolas\n"},{"id":"45421","messageId":"f5apha$sj7$3@sea.gmane.org","threadId":"8658","inReplyTo":"alpine.LFD.0.99.0706192313290.20596@xanadu.home","subject":"Re: Debugging strange \"corrupt pack\" errors on SuSE 9","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-06-20T08:46:33Z","receivedAt":"2007-06-20T08:46:33Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Nicolas Pitre wrote:\n\n> But because you push to a local repository (a mounted USB stick is \n> considered a local repo) then you don't get to negociate the pack \n> capabilities of the final destination, and therefore more \"bad\" delta \n> objects might sneak in again.\n\nSo if he pushes over ssh (ssh localhost) he would get capabilities\nnegotiation, at the cost of being slower?\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}