{"thread":{"id":"2895","subject":"Am I doing something wrong?","startedAt":"2005-12-21T16:51:13Z","lastAt":"2005-12-21T21:13:33Z","messageCount":11,"participants":["Randal L. Schwartz","Junio C Hamano","Peter Baumann","Chuck Lever"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"13868","messageId":"86k6dyxuke.fsf@blue.stonehenge.com","threadId":"2895","inReplyTo":null,"subject":"Am I doing something wrong?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-12-21T16:51:13Z","receivedAt":"2005-12-21T16:51:13Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":"\nlocalhost:~/MIRROR/git-GIT % cg-fetch\nRecovering from a previously interrupted fetch...\nFetching head...\nFetching objects...\nGetting alternates list for http://www.kernel.org/pub/scm/git/git.git/\nGetting pack list for http://www.kernel.org/pub/scm/git/git.git/\nerror: Unable to find c2f3bf071ee90b01f2d629921bb04c4f798f02fa under http://www.kernel.org/pub/scm/git/git.git/\n\nCannot obtain needed object c2f3bf071ee90b01f2d629921bb04c4f798f02fa\nwhile processing commit 0000000000000000000000000000000000000000.\ncg-fetch: objects fetch failed\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"13872","messageId":"7v3bkmcp83.fsf@assigned-by-dhcp.cox.net","threadId":"2895","inReplyTo":"86k6dyxuke.fsf@blue.stonehenge.com","subject":"Re: Am I doing something wrong?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-21T17:52:12Z","receivedAt":"2005-12-21T17:52:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n> localhost:~/MIRROR/git-GIT % cg-fetch\n> Recovering from a previously interrupted fetch...\n\nSorry, I do not know what Cogito is doing there (the message is\nfrom an \"echo\" in cg-fetch).  git-clone over HTTP seems to work\nfor me, and I just tried git-fetch over HTTP in my random\nback-up repo that happened to be at around 0.99.9g without\nproblems, so I am reasonably sure the public repository is not\ncorrupt.\n"},{"id":"13873","messageId":"864q52xrm6.fsf@blue.stonehenge.com","threadId":"2895","inReplyTo":"7v3bkmcp83.fsf@assigned-by-dhcp.cox.net","subject":"Re: Am I doing something wrong?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-12-21T17:54:57Z","receivedAt":"2005-12-21T17:54:57Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n\nJunio> merlyn@stonehenge.com (Randal L. Schwartz) writes:\n>> localhost:~/MIRROR/git-GIT % cg-fetch\n>> Recovering from a previously interrupted fetch...\n\nJunio> Sorry, I do not know what Cogito is doing there (the message is\nJunio> from an \"echo\" in cg-fetch).  git-clone over HTTP seems to work\nJunio> for me, and I just tried git-fetch over HTTP in my random\nJunio> back-up repo that happened to be at around 0.99.9g without\nJunio> problems, so I am reasonably sure the public repository is not\nJunio> corrupt.\n\nIt worked once I changed the URL from http://www to git://git\n\nPerhaps something is wrong with the archive when viewed with HTTP protocol?\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"13875","messageId":"7vmziub9yw.fsf@assigned-by-dhcp.cox.net","threadId":"2895","inReplyTo":"864q52xrm6.fsf@blue.stonehenge.com","subject":"Re: Am I doing something wrong?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-21T18:07:03Z","receivedAt":"2005-12-21T18:07:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n>>>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n>\n> Junio> Sorry, I do not know what Cogito is doing there (the message is\n> Junio> from an \"echo\" in cg-fetch).  git-clone over HTTP seems to work\n> Junio> for me, and I just tried git-fetch over HTTP in my random\n> Junio> back-up repo that happened to be at around 0.99.9g without\n> Junio> problems, so I am reasonably sure the public repository is not\n> Junio> corrupt.\n>\n> It worked once I changed the URL from http://www to git://git\n>\n> Perhaps something is wrong with the archive when viewed with HTTP protocol?\n\nI said I tried cloning from scratch and fetching into an old one\nover HTTP and succeeded, did I not?  So it does not seem to be\nthe case either.\n\nMy initial reaction after seeing the two other messages that\nreport failure to grab the tip of the master head was \"Perhaps,\nthe usual mirroring delay\".  But considering that your failure\nhappened way later than when the release material was placed on\nthe server that public servers mirror from (which was around\n01:00 US/Pacific), I do not know what to think (especially\nbefore my caffeine ;-).\n"},{"id":"13876","messageId":"86zmmuwbzh.fsf@blue.stonehenge.com","threadId":"2895","inReplyTo":"7vmziub9yw.fsf@assigned-by-dhcp.cox.net","subject":"Re: Am I doing something wrong?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-12-21T18:17:54Z","receivedAt":"2005-12-21T18:17:54Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n\nJunio> I said I tried cloning from scratch and fetching into an old one\nJunio> over HTTP and succeeded, did I not?  So it does not seem to be\nJunio> the case either.\n\nCloning from scratch probably worked differently than starting\nfrom wherever I was.\n\nSorry, I didn't preserve the exact state from where I started... I\nthink my last update was yesterday afternoon.  Would have been a good\ntest case.  However, I'm very clear on the symptoms... trying to start\nfrom wherever I had last updated, to update to the current release,\nfailed when sucking from HTTP, but worked when sucking from GIT.\n\nIn fact, I got the same exact behavior both on my Darwin laptop and my\nOpenBSD box, so I had to edit them both to get away from HTTP\nprotocol.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"13877","messageId":"7vhd92b90w.fsf@assigned-by-dhcp.cox.net","threadId":"2895","inReplyTo":"86zmmuwbzh.fsf@blue.stonehenge.com","subject":"Re: Am I doing something wrong?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-21T18:27:27Z","receivedAt":"2005-12-21T18:27:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n>>>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n>\n> Junio> I said I tried cloning from scratch and fetching into an old one\n> Junio> over HTTP and succeeded, did I not?  So it does not seem to be\n> Junio> the case either.\n>\n> Cloning from scratch probably worked differently than starting\n> from wherever I was.\n\nYup, that's why I tried both.\n\n> ... However, I'm very clear on the symptoms... trying to start\n> from wherever I had last updated, to update to the current release,\n> failed when sucking from HTTP, but worked when sucking from GIT.\n\nI do not doubt you got a failure.  I just couldn't reproduce it\neasily by fetching into a copy of a stale repository.  Earlier I\nwas suspecting mirroring lags (my successful trial was done\nwithin the last hour) but I do not think that is the case\nbecause your failure was also way after the mirroring should\nhave happened.\n\nWill dig a bit more when able.\n"},{"id":"13879","messageId":"802d21790512211037q4ffc5816u@mail.gmail.com","threadId":"2895","inReplyTo":"7vhd92b90w.fsf@assigned-by-dhcp.cox.net","subject":"Re: Am I doing something wrong?","fromName":"Peter Baumann","fromEmail":"peter.baumann@gmail.com","sentAt":"2005-12-21T18:37:49Z","receivedAt":"2005-12-21T18:37:49Z","isPatch":false,"sender":{"key":"peter.baumann@gmail.com","avatar":null},"body":"2005/12/21, Junio C Hamano <junkio@cox.net>:\n> merlyn@stonehenge.com (Randal L. Schwartz) writes:\n>\n> >>>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n> >\n> > Junio> I said I tried cloning from scratch and fetching into an old one\n> > Junio> over HTTP and succeeded, did I not?  So it does not seem to be\n> > Junio> the case either.\n> >\n> > Cloning from scratch probably worked differently than starting\n> > from wherever I was.\n>\n> Yup, that's why I tried both.\n>\n> > ... However, I'm very clear on the symptoms... trying to start\n> > from wherever I had last updated, to update to the current release,\n> > failed when sucking from HTTP, but worked when sucking from GIT.\n>\n> I do not doubt you got a failure.  I just couldn't reproduce it\n> easily by fetching into a copy of a stale repository.  Earlier I\n> was suspecting mirroring lags (my successful trial was done\n> within the last hour) but I do not think that is the case\n> because your failure was also way after the mirroring should\n> have happened.\n>\n> Will dig a bit more when able.\n>\n\nSorry , but I have seen this too. I deleted my git directory and\ncloned it again and it worked, but the original pull didn't work.\n(Same error as above.) I'll look if I can find a backup of my old git\ndirectory and look if there is the same error for you to reproduce. If\nI can find something, I'll get back to you.\n\nPeter Baumann\n"},{"id":"13881","messageId":"802d21790512211053q60e05301l@mail.gmail.com","threadId":"2895","inReplyTo":"802d21790512211037q4ffc5816u@mail.gmail.com","subject":"Re: Am I doing something wrong?","fromName":"Peter Baumann","fromEmail":"peter.baumann@gmail.com","sentAt":"2005-12-21T18:53:00Z","receivedAt":"2005-12-21T18:53:00Z","isPatch":false,"sender":{"key":"peter.baumann@gmail.com","avatar":null},"body":"2005/12/21, Peter Baumann <peter.baumann@gmail.com>:\n> 2005/12/21, Junio C Hamano <junkio@cox.net>:\n> > merlyn@stonehenge.com (Randal L. Schwartz) writes:\n> >\n> > >>>>>> \"Junio\" == Junio C Hamano <junkio@cox.net> writes:\n> > >\n> > > Junio> I said I tried cloning from scratch and fetching into an old one\n> > > Junio> over HTTP and succeeded, did I not?  So it does not seem to be\n> > > Junio> the case either.\n> > >\n> > > Cloning from scratch probably worked differently than starting\n> > > from wherever I was.\n> >\n> > Yup, that's why I tried both.\n> >\n> > > ... However, I'm very clear on the symptoms... trying to start\n> > > from wherever I had last updated, to update to the current release,\n> > > failed when sucking from HTTP, but worked when sucking from GIT.\n> >\n> > I do not doubt you got a failure.  I just couldn't reproduce it\n> > easily by fetching into a copy of a stale repository.  Earlier I\n> > was suspecting mirroring lags (my successful trial was done\n> > within the last hour) but I do not think that is the case\n> > because your failure was also way after the mirroring should\n> > have happened.\n> >\n> > Will dig a bit more when able.\n> >\n>\n> Sorry , but I have seen this too. I deleted my git directory and\n> cloned it again and it worked, but the original pull didn't work.\n> (Same error as above.) I'll look if I can find a backup of my old git\n> directory and look if there is the same error for you to reproduce. If\n> I can find something, I'll get back to you.\n>\n> Peter Baumann\n>\n\nOk. I digged a bit around and found the backup of my old git version repository.\nxp:/var/tmp/git cat .git/HEAD\n112d0bafd620c0e0f10614a3ba021d4de4fae331\n\nxp:/var/tmp/git git --version\ngit version 0.99.9i\n\nBut I wouldn't take this for serious if I were you. If the process for\nbuilding the debian package isnt't able to set the exact version the\nabove is definitly not true. Can't remember what version it was :-(\n\nxp:/var/tmp/git git pull\nFetching refs/heads/master from\nhttp://www.kernel.org/pub/scm/git/git.git using http\nGetting alternates list for http://www.kernel.org/pub/scm/git/git.git/\nGetting pack list for http://www.kernel.org/pub/scm/git/git.git/\nerror: Unable to find c2f3bf071ee90b01f2d629921bb04c4f798f02fa under\nhttp://www.kernel.org/pub/scm/git/git.git/\n\nCannot obtain needed object c2f3bf071ee90b01f2d629921bb04c4f798f02fa\nwhile processing commit 0000000000000000000000000000000000000000.\n\n\nPeter\n"},{"id":"13883","messageId":"7vvexi8bo9.fsf@assigned-by-dhcp.cox.net","threadId":"2895","inReplyTo":"7vhd92b90w.fsf@assigned-by-dhcp.cox.net","subject":"Re: Am I doing something wrong?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-21T19:58:30Z","receivedAt":"2005-12-21T19:58:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"It turns out to be a stupid off-by-one error in http-fetch.c.\nThe objects/info/packs file has the following:\n\n        $ cat objects/info/packs\n        P pack-46ff81b11ed16ed38caa4aada913cb08c00185b2.pack\n        P pack-05f611b3b8198b262acdf678584d365f8e879aec.pack\n        P pack-740c99c0be6734adbd130737dec2608dc4682761.pack\n        $\n\nThe code that parses this in http-fetch had an off-by-one, and\nincorrectly thought that the last entry was incomplete.  This\nproblem did not surface earlier, because objects/info/packs file\nused to have other information after all the P lines, but\nhttp-fetch was not interested in was skipping them.  The latest\nupdate-server-info stopped producing those extra lines.\n\nAs a band-aid, I just ran this command at the server that public\nones mirror from:\n\n\t$ echo >>objects/info/packs\n\nThe change seems to have mirrored out already, and my \"broken\"\nclient before the attached patch successfully fetches from\nthere, so hopefully things would work OK for you as well.\n\nI also have to add some code to server-info.c, to append an\nempty after objects/info/packs file to work around this bug in\nthe deployed http clients.\n\nThanks for your help in diagnosing and fixing this problem.\n\n-- >8 --\n[PATCH] http-fetch.c: fix objects/info/pack parsing.\n\nIt failed to register the last pack mentioned in the\nobjects/info/packs file.  Also it had an independent overrun\nerror.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\ngit diff\ndiff --git a/http-fetch.c b/http-fetch.c\nindex ad59f1c..3cd6ef9 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -658,7 +658,7 @@ static int fetch_indices(struct alt_base\n \t\tswitch (data[i]) {\n \t\tcase 'P':\n \t\t\ti++;\n-\t\t\tif (i + 52 < buffer.posn &&\n+\t\t\tif (i + 52 <= buffer.posn &&\n \t\t\t    !strncmp(data + i, \" pack-\", 6) &&\n \t\t\t    !strncmp(data + i + 46, \".pack\\n\", 6)) {\n \t\t\t\tget_sha1_hex(data + i + 6, sha1);\n@@ -667,7 +667,7 @@ static int fetch_indices(struct alt_base\n \t\t\t\tbreak;\n \t\t\t}\n \t\tdefault:\n-\t\t\twhile (data[i] != '\\n')\n+\t\t\twhile (i < buffer.posn && data[i] != '\\n')\n \t\t\t\ti++;\n \t\t}\n \t\ti++;\n\nCompilation finished at Wed Dec 21 11:40:06\n"},{"id":"13888","messageId":"43A9C33E.2070807@citi.umich.edu","threadId":"2895","inReplyTo":"7vvexi8bo9.fsf@assigned-by-dhcp.cox.net","subject":"Re: Am I doing something wrong?","fromName":"Chuck Lever","fromEmail":"cel@citi.umich.edu","sentAt":"2005-12-21T21:03:58Z","receivedAt":"2005-12-21T21:03:58Z","isPatch":false,"sender":{"key":"cel@citi.umich.edu","avatar":null},"body":"maybe the Linux kernel repository needs the same treatment.  i'm getting \nthe \"all zeros\" commit error message when trying to pull from it.\n\n\nJunio C Hamano wrote:\n> It turns out to be a stupid off-by-one error in http-fetch.c.\n> The objects/info/packs file has the following:\n> \n>         $ cat objects/info/packs\n>         P pack-46ff81b11ed16ed38caa4aada913cb08c00185b2.pack\n>         P pack-05f611b3b8198b262acdf678584d365f8e879aec.pack\n>         P pack-740c99c0be6734adbd130737dec2608dc4682761.pack\n>         $\n> \n> The code that parses this in http-fetch had an off-by-one, and\n> incorrectly thought that the last entry was incomplete.  This\n> problem did not surface earlier, because objects/info/packs file\n> used to have other information after all the P lines, but\n> http-fetch was not interested in was skipping them.  The latest\n> update-server-info stopped producing those extra lines.\n> \n> As a band-aid, I just ran this command at the server that public\n> ones mirror from:\n> \n> \t$ echo >>objects/info/packs\n> \n> The change seems to have mirrored out already, and my \"broken\"\n> client before the attached patch successfully fetches from\n> there, so hopefully things would work OK for you as well.\n> \n> I also have to add some code to server-info.c, to append an\n> empty after objects/info/packs file to work around this bug in\n> the deployed http clients.\n> \n> Thanks for your help in diagnosing and fixing this problem.\n> \n> -- >8 --\n> [PATCH] http-fetch.c: fix objects/info/pack parsing.\n> \n> It failed to register the last pack mentioned in the\n> objects/info/packs file.  Also it had an independent overrun\n> error.\n> \n> Signed-off-by: Junio C Hamano <junkio@cox.net>\n> \n> ---\n> git diff\n> diff --git a/http-fetch.c b/http-fetch.c\n> index ad59f1c..3cd6ef9 100644\n> --- a/http-fetch.c\n> +++ b/http-fetch.c\n> @@ -658,7 +658,7 @@ static int fetch_indices(struct alt_base\n>  \t\tswitch (data[i]) {\n>  \t\tcase 'P':\n>  \t\t\ti++;\n> -\t\t\tif (i + 52 < buffer.posn &&\n> +\t\t\tif (i + 52 <= buffer.posn &&\n>  \t\t\t    !strncmp(data + i, \" pack-\", 6) &&\n>  \t\t\t    !strncmp(data + i + 46, \".pack\\n\", 6)) {\n>  \t\t\t\tget_sha1_hex(data + i + 6, sha1);\n> @@ -667,7 +667,7 @@ static int fetch_indices(struct alt_base\n>  \t\t\t\tbreak;\n>  \t\t\t}\n>  \t\tdefault:\n> -\t\t\twhile (data[i] != '\\n')\n> +\t\t\twhile (i < buffer.posn && data[i] != '\\n')\n>  \t\t\t\ti++;\n>  \t\t}\n>  \t\ti++;\n> \n> Compilation finished at Wed Dec 21 11:40:06\n> \n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n\n\nbegin:vcard\nfn:Chuck Lever\nn:Lever;Charles\norg:Network Appliance, Incorporated;Open Source NFS Client Development\nadr:535 West William Street, Suite 3100;;Center for Information Technology Integration;Ann Arbor;MI;48103-4943;USA\nemail;internet:cel@citi.umich.edu\ntitle:Member of Technical Staff\ntel;work:+1 734 763 4415\ntel;fax:+1 734 763 4434\ntel;home:+1 734 668 1089\nx-mozilla-html:FALSE\nurl:http://troy.citi.umich.edu/u/cel/\nversion:2.1\nend:vcard\n\n"},{"id":"13889","messageId":"7vk6dy5f2a.fsf@assigned-by-dhcp.cox.net","threadId":"2895","inReplyTo":"43A9C33E.2070807@citi.umich.edu","subject":"Re: Am I doing something wrong?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-21T21:13:33Z","receivedAt":"2005-12-21T21:13:33Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Chuck Lever <cel@citi.umich.edu> writes:\n\n> maybe the Linux kernel repository needs the same treatment.  i'm getting \n> the \"all zeros\" commit error message when trying to pull from it.\n\nIndeed.\n\nLinus, sorry about bothering you, but could you do the same\nband-aid for now and also apply the attached to your\nserver-info.c, please?\n\n> Junio C Hamano wrote:\n>>\n>> As a band-aid, I just ran this command at the server that public\n>> ones mirror from:\n>>\n>> \t$ echo >>objects/info/packs\n>>\n\nGIT 1.0.0a needs to follow soonish X-<.\n\n-- >8 --\n[PATCH] objects/info/packs: work around bug in http-fetch.c::fetch_indices()\n\nThe code to fetch pack index files in deployed clients have a\nbug that causes it to ignore the pack file on the last line of\nobjects/info/packs file, so append an empty line to work it\naround.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n server-info.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n21b1aced83195af50fd8bc9a88e7734c8ee77c0e\ndiff --git a/server-info.c b/server-info.c\nindex df19e49..6089765 100644\n--- a/server-info.c\n+++ b/server-info.c\n@@ -200,6 +200,7 @@ static void write_pack_info_file(FILE *f\n \tint i;\n \tfor (i = 0; i < num_pack; i++)\n \t\tfprintf(fp, \"P %s\\n\", info[i]->p->pack_name + objdirlen + 6);\n+\tfputc('\\n', fp);\n }\n \n static int update_info_packs(int force)\n-- \n1.0.0\n"}]}