{"thread":{"id":"1188","subject":"What broke snapshots now?","startedAt":"2005-07-09T11:08:56Z","lastAt":"2005-07-11T08:09:03Z","messageCount":9,"participants":["David Woodhouse","Jeff Garzik","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"5861","messageId":"1120907336.8058.293.camel@baythorne.infradead.org","threadId":"1188","inReplyTo":null,"subject":"What broke snapshots now?","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-07-09T11:08:56Z","receivedAt":"2005-07-09T11:08:56Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"Does git on master.kernel.org need to be updated to handle packed\nobjects? See attached. \n\nLinus, please could you add the snapshot script to your regression\ntesting? http://david.woodhou.se/git-snapshot.sh\n\nIt'd be good to keep that working without too much manual intervention. \n\n-- \ndwmw2\n\n\n\n+ case `hostname` in\n++ hostname\n+ export PATH=/home/dwmw2/cogito:/usr/bin:/bin\n+ PATH=/home/dwmw2/cogito:/usr/bin:/bin\n+ export BASE_DIRECTORY=/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n+ BASE_DIRECTORY=/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n+ STAGINGLOCK=/staging/upload.lock\n+ FINAL=/pub/linux/kernel/v2.6/snapshots\n+ '[' '!' -d /pub/scm/linux/kernel/git/torvalds/linux-2.6.git ']'\n+ export WORK_DIRECTORY=/home/dwmw2/snapshots/2.6\n+ WORK_DIRECTORY=/home/dwmw2/snapshots/2.6\n+ export SNAP_TAG_DIRECTORY=/home/dwmw2/snapshots/2.6/tags\n+ SNAP_TAG_DIRECTORY=/home/dwmw2/snapshots/2.6/tags\n+ export STAGE=/home/dwmw2/snapshots/2.6/stage\n+ STAGE=/home/dwmw2/snapshots/2.6/stage\n+ export SHA1_FILE_DIRECTORY=/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects\n+ SHA1_FILE_DIRECTORY=/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects\n++ ls -rt /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.11 /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.11-tree /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.12 /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.12-rc2 /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.12-rc3 /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.12-rc4 /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.12-rc5 /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.12-rc6 /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.13-rc1 /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.13-rc2\n++ tail -n1\n++ sed s:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v::\n+ RELNAME=2.6.13-rc2\n++ cat /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.13-rc2\n+ RELOBJ=c521cb0f10ef2bf28a18e1cc8adf378ccbbe5a19\n++ tail -n1\n++ sed s:/home/dwmw2/snapshots/2.6/tags/v::\n++ ls -rt /home/dwmw2/snapshots/2.6/tags/v2.6.13-rc2-git1\n+ SNAPNAME=2.6.13-rc2-git1\n+ '[' 2.6.13-rc2-git1 == '' ']'\n++ cat /home/dwmw2/snapshots/2.6/tags/v2.6.13-rc2-git1\n+ LASTOBJ=c101f3136cc98a003d0d16be6fab7d0d950581a6\n++ echo 2.6.13-rc2-git1\n++ sed 's/^.*-git//'\n+ OLDGITNUM=1\n++ expr 1 + 1\n+ NEWGITNUM=2\n+ CURNAME=2.6.13-rc2-git2\n++ tree-id c101f3136cc98a003d0d16be6fab7d0d950581a6\n/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/c1/01f3136cc98a003d0d16be6fab7d0d950581a6: No such file or directory\nfatal: git-cat-file c101f3136cc98a003d0d16be6fab7d0d950581a6: bad file\nInvalid id: c101f3136cc98a003d0d16be6fab7d0d950581a6\nusage: git-cat-file [-t | tagname] <sha1>\nusage: git-cat-file [-t | tagname] <sha1>\nInvalid id: \n+ LASTTREE=\n++ cat /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/HEAD\n+ CURCOMM=a92b7b80579fe68fe229892815c750f6652eb6a9\n++ tree-id a92b7b80579fe68fe229892815c750f6652eb6a9\n+ CURTREE=7fd73e9f39bf6003cc3188a10426b62d8c47ab40\n++ tree-id c521cb0f10ef2bf28a18e1cc8adf378ccbbe5a19\n/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/c5/21cb0f10ef2bf28a18e1cc8adf378ccbbe5a19: No such file or directory\nfatal: git-cat-file c521cb0f10ef2bf28a18e1cc8adf378ccbbe5a19: bad file\nInvalid id: c521cb0f10ef2bf28a18e1cc8adf378ccbbe5a19\nusage: git-cat-file [-t | tagname] <sha1>\nusage: git-cat-file [-t | tagname] <sha1>\nInvalid id: \n+ RELTREE=\n+ echo release 2.6.13-rc2 commit tree\nrelease 2.6.13-rc2 commit tree\n++ git-cat-file -t c101f3136cc98a003d0d16be6fab7d0d950581a6\n/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/c1/01f3136cc98a003d0d16be6fab7d0d950581a6: No such file or directory\nfatal: git-cat-file c101f3136cc98a003d0d16be6fab7d0d950581a6: bad file\n+ echo last c101f3136cc98a003d0d16be6fab7d0d950581a6 tree\nlast c101f3136cc98a003d0d16be6fab7d0d950581a6 tree\n+ echo head a92b7b80579fe68fe229892815c750f6652eb6a9 tree 7fd73e9f39bf6003cc3188a10426b62d8c47ab40\nhead a92b7b80579fe68fe229892815c750f6652eb6a9 tree 7fd73e9f39bf6003cc3188a10426b62d8c47ab40\n+ '[' '' == 7fd73e9f39bf6003cc3188a10426b62d8c47ab40 ']'\n++ echo 2.6.13-rc2-git2\n++ cut -f2- -d-\n+ EXTRAVERSION=-rc2-git2\n+ cd /home/dwmw2/snapshots/2.6/stage\n+ rm -rf tmp-empty-tree\n+ mkdir -p tmp-empty-tree/.git\n+ cd tmp-empty-tree\n+ git-read-tree a92b7b80579fe68fe229892815c750f6652eb6a9\n/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/f8/640c306db2d583b9a30f2e52f8fb0a4cf624e0: No such file or directory\nfatal: failed to unpack tree object a92b7b80579fe68fe229892815c750f6652eb6a9\n+ git-checkout-cache Makefile\ncheckout-cache: Makefile is not in the cache.\n+ perl -pi -e 's/EXTRAVERSION =.*/EXTRAVERSION = -rc2-git2/' Makefile\nCan't open Makefile: No such file or directory.\n+ git-diff-cache -m -p\n+ gzip -9\nusage: diff-cache [-r] [-z] [-p] [-i] [--cached] <tree sha1>\n+ echo a92b7b80579fe68fe229892815c750f6652eb6a9\n+ cg-log c521cb0f10ef2bf28a18e1cc8adf378ccbbe5a19:a92b7b80579fe68fe229892815c750f6652eb6a9\nmv: cannot stat `.git/heads': No such file or directory\nmv: cannot stat `.git/tags': No such file or directory\n/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/c5/21cb0f10ef2bf28a18e1cc8adf378ccbbe5a19: No such file or directory\nfatal: git-cat-file c521cb0f10ef2bf28a18e1cc8adf378ccbbe5a19: bad file\nInvalid id: c521cb0f10ef2bf28a18e1cc8adf378ccbbe5a19\n+ echo a92b7b80579fe68fe229892815c750f6652eb6a9\n+ echo New Snapshot 2.6.13-rc2-git2\nNew Snapshot 2.6.13-rc2-git2\n+ '[' -z /pub/linux/kernel/v2.6/snapshots ']'\n+ '[' -r /staging/upload.lock ']'\n+ exec\n+ flock -s 200\n+ mv -v /home/dwmw2/snapshots/2.6/stage/patch-2.6.13-rc2-git2.gz /home/dwmw2/snapshots/2.6/stage/patch-2.6.13-rc2-git2.id /home/dwmw2/snapshots/2.6/stage/patch-2.6.13-rc2-git2.log /pub/linux/kernel/v2.6/snapshots\n`/home/dwmw2/snapshots/2.6/stage/patch-2.6.13-rc2-git2.gz' -> `/pub/linux/kernel/v2.6/snapshots/patch-2.6.13-rc2-git2.gz'\n`/home/dwmw2/snapshots/2.6/stage/patch-2.6.13-rc2-git2.id' -> `/pub/linux/kernel/v2.6/snapshots/patch-2.6.13-rc2-git2.id'\n`/home/dwmw2/snapshots/2.6/stage/patch-2.6.13-rc2-git2.log' -> `/pub/linux/kernel/v2.6/snapshots/patch-2.6.13-rc2-git2.log'\n"},{"id":"5865","messageId":"42CFD32B.8060108@pobox.com","threadId":"1188","inReplyTo":"1120907336.8058.293.camel@baythorne.infradead.org","subject":"Re: What broke snapshots now?","fromName":"Jeff Garzik","fromEmail":"jgarzik@pobox.com","sentAt":"2005-07-09T13:37:47Z","receivedAt":"2005-07-09T13:37:47Z","isPatch":false,"sender":{"key":"jgarzik@pobox.com","avatar":null},"body":"David Woodhouse wrote:\n> Does git on master.kernel.org need to be updated to handle packed\n> objects?\n\nYes.\n\nIt's always fun when the on-disk format of the upstream 2.6.x kernel \nrepo changes without notice :/\n\n\tJeff\n"},{"id":"5869","messageId":"Pine.LNX.4.58.0507090908490.17536@g5.osdl.org","threadId":"1188","inReplyTo":"1120907336.8058.293.camel@baythorne.infradead.org","subject":"Re: What broke snapshots now?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-09T16:15:25Z","receivedAt":"2005-07-09T16:15:25Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 9 Jul 2005, David Woodhouse wrote:\n>\n> Does git on master.kernel.org need to be updated to handle packed\n> objects? See attached. \n\nYes, looks that way. Except it's not \"git on master.kernel.org\", it's \"git \nin your home directory\", I suspect. I expressly held off packing the \nkernel repo until git had been updated on kernel.org.\n\nSo while the regular git on kernel.org should already be up-to-date, you\nhave\n\n\tPATH=/home/dwmw2/cogito:/usr/bin:/bin\n\nin your script ;)\n\n> Linus, please could you add the snapshot script to your regression\n> testing? http://david.woodhou.se/git-snapshot.sh\n\nNone of the git-specific parts should have broken - you don't even do\nanything strange there, I think we already have regression tests in git\nfor everything you use. But the fact that you had an old version is not \nsomething I can do much about ;)\n\n\t\tLinus\n"},{"id":"5877","messageId":"1120952292.23706.49.camel@baythorne.infradead.org","threadId":"1188","inReplyTo":"Pine.LNX.4.58.0507090908490.17536@g5.osdl.org","subject":"Re: What broke snapshots now?","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-07-09T23:38:11Z","receivedAt":"2005-07-09T23:38:11Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Sat, 2005-07-09 at 09:15 -0700, Linus Torvalds wrote:\n> Yes, looks that way. Except it's not \"git on master.kernel.org\", it's \"git \n> in your home directory\", I suspect. I expressly held off packing the \n> kernel repo until git had been updated on kernel.org.\n\nDoh. I thought I'd already done that, but in fact that was for the\nscripts which feed the mailing list, while the snapshot script kept\nusing my copy. I've moved it out of the way now; sorry for the noise.\n\n-- \ndwmw2\n"},{"id":"5891","messageId":"1121006378.23706.65.camel@baythorne.infradead.org","threadId":"1188","inReplyTo":"1120952292.23706.49.camel@baythorne.infradead.org","subject":"Re: What broke snapshots now?","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-07-10T14:39:38Z","receivedAt":"2005-07-10T14:39:38Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Sun, 2005-07-10 at 00:38 +0100, David Woodhouse wrote:\n> Doh. I thought I'd already done that, but in fact that was for the\n> scripts which feed the mailing list, while the snapshot script kept\n> using my copy. \n\nOk, the snapshot script starts working again if I change a few\nenvironment variables to match what the tools now expect.\n\nNow the mailing list feed isn't happy though -- it stopped being able to\npull from your tree at around 0600 UTC (which I think is then the last\nDRM fix was added). I got this when trying to update...\n\nTree change: 0109fd37046de64e8459f8c4f4706df9ac7cc82c:f179bc77d09b9087bfc559d0368bba350342ac76\nerror: cannot read sha1_file for ce68a60e5c503aaef0a98f8d754effb6c7d9ee99\nfatal: unable to read destination tree (ce68a60e5c503aaef0a98f8d754effb6c7d9ee99)\n\nApplying changes...\nFast-forwarding 0109fd37046de64e8459f8c4f4706df9ac7cc82c -> f179bc77d09b9087bfc559d0368bba350342ac76\n        on top of 0109fd37046de64e8459f8c4f4706df9ac7cc82c...\nerror: cannot read sha1_file for ce68a60e5c503aaef0a98f8d754effb6c7d9ee99\nfatal: failed to unpack tree object f179bc77d09b9087bfc559d0368bba350342ac76\n\nSince it's just a fast-forward, I just copied the 'origin' tag into the\n'master' to move it forward. But it's still not happy:\n\nhera /home/dwmw2/git/mail-2.6 $ cg-diff -r 0109fd37046de64e8459f8c4f4706df9ac7cc82c:f179bc77d09b9087bfc559d0368bba350342ac76\nerror: cannot read sha1_file for ce68a60e5c503aaef0a98f8d754effb6c7d9ee99\nfatal: unable to read destination tree (ce68a60e5c503aaef0a98f8d754effb6c7d9ee99)\n\n-- \ndwmw2\n"},{"id":"5899","messageId":"Pine.LNX.4.58.0507100954080.17536@g5.osdl.org","threadId":"1188","inReplyTo":"1121006378.23706.65.camel@baythorne.infradead.org","subject":"Re: What broke snapshots now?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-10T17:08:13Z","receivedAt":"2005-07-10T17:08:13Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sun, 10 Jul 2005, David Woodhouse wrote:\n> \n> Now the mailing list feed isn't happy though -- it stopped being able to\n> pull from your tree at around 0600 UTC (which I think is then the last\n> DRM fix was added). I got this when trying to update...\n\nWhich script is this? I'm looking at your scripts, but\n\"cg-feedmaillist.sh\" is unreadable for me, so I can't see all of it.\n\nAnyway, it's possible that this is a temporary problem: one of the issues \nis that since you seem to be using the \"rsync:\" protocol for updating \nthings, what happens is that if the mirroring is off a bit, you may have \ngotten a new head, but not all the objects. Then you'd get exactly this.\n\nI don't know how to solve that, really. It's fundamental to any mirroring\nthat doesn't guarantee some kind of ordering, ie the dumb kind.\n\nAll the \"native git\" pack-file synchronization protocols should be\nstrictly ordered, ie they will unpack and write the new objects _before_\nthey write the new refs that point to them..\n\nBut you can just imagine what happens if the mirror script is busy\nmirroring at the same time, and has already mirrored the object\ndirectories before we wrote all of them, but then gets to the refs/\ndirectory by the time we have written the new refs (and all the new object\n- but it didn't notice that because it had already mirrored the object\ndirs). \n\nSee what I'm saying? The thing fixes itself after a while when you try \nagain and the next round of mirroring has gotten the objects it missed the \nlast time, but there fundamentally isn't anything to be done about the \nfact that the mirroring wasn't \"atomic\". Only a git-aware mirror could do \nan atomic snapshot.\n\nI'm actually surprised that people haven't complained more about this than \nthey have. I know it's happened a couple of times: it bit Dave Jones' \nscripts once, and it's caused webgit to sometimes report \"permission \ndenied\" problems (or whatever) and then showing empty logs.\n\nThe fact that my upload scripts _do_ upload in the right order, together\nwith the fact that rsync normally syncs alphabetically (ie \"objects\"  \nbefore \"refs\") means that we _normally_ don't see this, but it's\noccasionally unavoidable when I happen to do a new push while a previous\nmirror sweep is going on.\n\nOf course, in this case it may also be just some cogito thing that doesn't\nlike pack-files. The fact that it complains about an object that is not\nactually either of the \"heads\" of the diff makes me suspect it's really a\nmissing object, though, which in turn makes me suspect the above mirror\nmis-feature.\n\n\t\t\tLinus\n"},{"id":"5900","messageId":"1121016147.23706.91.camel@baythorne.infradead.org","threadId":"1188","inReplyTo":"Pine.LNX.4.58.0507100954080.17536@g5.osdl.org","subject":"Re: What broke snapshots now?","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-07-10T17:22:27Z","receivedAt":"2005-07-10T17:22:27Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Sun, 2005-07-10 at 10:08 -0700, Linus Torvalds wrote:\n> Which script is this? I'm looking at your scripts, but\n> \"cg-feedmaillist.sh\" is unreadable for me, so I can't see all of it.\n\nHm. Dunno why that happened -- it's readable now, and also at\nhttp://david.woodhou.se/cg-feedmaillist.sh\n\n> Anyway, it's possible that this is a temporary problem: one of the issues \n> is that since you seem to be using the \"rsync:\" protocol for updating \n> things, what happens is that if the mirroring is off a bit, you may have \n> gotten a new head, but not all the objects. Then you'd get exactly this.\n\nIt's done locally on hera though -- so the mirroring shouldn't be a\nproblem. IIRC the reason it uses rsync is because I wasn't getting tags\nwhen it was using whatever other method was the default for a local\n'parent repository'.\n\nThat was actually more relevant for the snapshots than the mailing list\nfeed, though -- so even if it isn't fixed now, I could live without\ntags.\n\nMore usefully though, if ordering really isn't a problem on your\nrepository then I should probably rewrite the script to work directly\nfrom that instead of from a copy.\n\n-- \ndwmw2\n"},{"id":"5901","messageId":"Pine.LNX.4.58.0507101026430.17536@g5.osdl.org","threadId":"1188","inReplyTo":"1121016147.23706.91.camel@baythorne.infradead.org","subject":"Re: What broke snapshots now?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-10T17:31:42Z","receivedAt":"2005-07-10T17:31:42Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sun, 10 Jul 2005, David Woodhouse wrote:\n> \n> > Anyway, it's possible that this is a temporary problem: one of the issues \n> > is that since you seem to be using the \"rsync:\" protocol for updating \n> > things, what happens is that if the mirroring is off a bit, you may have \n> > gotten a new head, but not all the objects. Then you'd get exactly this.\n> \n> It's done locally on hera though -- so the mirroring shouldn't be a\n> problem.\n\nNo it's not, as far as I can tell:\n\n\ttorvalds@hera:/home/dwmw2/git/mail-2.6(0)$ cat .git/branches/origin\n\trsync://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n\nso your scripts will go out to rsync with www.kernel.org to get the data, \nwhen you use \"cg-update origin\".\n\n> More usefully though, if ordering really isn't a problem on your\n> repository then I should probably rewrite the script to work directly\n> from that instead of from a copy.\n\nIt should not be a problem, but you obviously have to be careful about \nordering, ie you should fetch the references first, and act on them later. \n\n\t\tLinus\n"},{"id":"5938","messageId":"1121069343.23706.95.camel@baythorne.infradead.org","threadId":"1188","inReplyTo":"Pine.LNX.4.58.0507101026430.17536@g5.osdl.org","subject":"Re: What broke snapshots now?","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-07-11T08:09:03Z","receivedAt":"2005-07-11T08:09:03Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Sun, 2005-07-10 at 10:31 -0700, Linus Torvalds wrote:\n> No it's not, as far as I can tell:\n> \n>         torvalds@hera:/home/dwmw2/git/mail-2.6(0)$ cat .git/branches/origin\n>         rsync://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n> \n> so your scripts will go out to rsync with www.kernel.org to get the data, \n> when you use \"cg-update origin\".\n\nHm, OK. So I have absolutely no recollection of what my own scripts are\nactually doing. I could have sworn I made sure it was local. If it was\nusing that URL for the master I might as well have run it elsewhere...\n\nIt does seem to be working again now. I'll probably rewrite it next time\nit misbehaves.\n> \n-- \ndwmw2\n"}]}