{"thread":{"id":"53261","subject":"Bug in 2.26: git-fetch fetching too many objects?","startedAt":"2020-04-20T15:44:41Z","lastAt":"2020-04-21T21:11:36Z","messageCount":8,"participants":["Dixit, Ashutosh","Konstantin Ryabitsev","Jonathan Nieder","Junio C Hamano","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"395744","messageId":"878siqxiu0.wl-ashutosh.dixit@intel.com","threadId":"53261","inReplyTo":null,"subject":"Bug in 2.26: git-fetch fetching too many objects?","fromName":"Dixit, Ashutosh","fromEmail":"ashutosh.dixit@intel.com","sentAt":"2020-04-20T15:44:39Z","receivedAt":"2020-04-20T15:44:41Z","isPatch":false,"sender":{"key":"ashutosh.dixit@intel.com","avatar":null},"body":"I am seeing a strange behavior in git-fetch in 2.26. I frequently fetch\nfrom a couple of linux kernel remotes (so you will have an idea how big the\nrepo is). I have a different system with 2.20 on which I never see a\nproblem.\n\nSo let us say I fetch with 2.20 and it fetches say 20,000 objects. However\nwith 2.26 it starts fetching millions of objects, objects which are already\npresent locally. I don't know yet if this happens each time or only once in\na while, I have seen it happen twice, will keep an eye out for this.\n\nIf you open a bug please let me know and I can update it with my\nfindings. Unless it is a known issue, perhaps already fixed?\n\nThanks!\n--\nAshutosh\n"},{"id":"395748","messageId":"20200420170301.h65vkk36avnud7z3@chatter.i7.local","threadId":"53261","inReplyTo":"878siqxiu0.wl-ashutosh.dixit@intel.com","subject":"Re: Bug in 2.26: git-fetch fetching too many objects?","fromName":"Konstantin Ryabitsev","fromEmail":"konstantin@linuxfoundation.org","sentAt":"2020-04-20T17:03:01Z","receivedAt":"2020-04-20T17:03:10Z","isPatch":false,"sender":{"key":"konstantin@linuxfoundation.org","avatar":"https://gravatar.com/avatar/7cb8827c6de56e1bd2dea16508c6708aa43feed3bf3813bcdacecdf96ceadd79?d=mp&s=160"},"body":"On Mon, Apr 20, 2020 at 08:44:39AM -0700, Dixit, Ashutosh wrote:\n> I am seeing a strange behavior in git-fetch in 2.26. I frequently fetch\n> from a couple of linux kernel remotes (so you will have an idea how big the\n> repo is). I have a different system with 2.20 on which I never see a\n> problem.\n> \n> So let us say I fetch with 2.20 and it fetches say 20,000 objects. However\n> with 2.26 it starts fetching millions of objects, objects which are already\n> present locally. I don't know yet if this happens each time or only once in\n> a while, I have seen it happen twice, will keep an eye out for this.\n> \n> If you open a bug please let me know and I can update it with my\n> findings. Unless it is a known issue, perhaps already fixed?\n\nIt's a known issue with protocol v2, but nobody's been able to properly \nreproduce it in order to debug. If you can reliably make it reoccur, \nthen please make a copy of your local tree and share with this list, \ntogether with your gitconfig and the remote you're pulling.\n\nSetting protocol.version=1 should fix it, but if you are willing to help \ntroubleshoot it, a bunch of people will be super thankful to you for \nthat, as it affects quite a number of kernel developers.\n\n-K\n"},{"id":"395809","messageId":"87a735e7r1.wl-ashutosh.dixit@intel.com","threadId":"53261","inReplyTo":"20200420170301.h65vkk36avnud7z3@chatter.i7.local","subject":"Re: Bug in 2.26: git-fetch fetching too many objects?","fromName":"Dixit, Ashutosh","fromEmail":"ashutosh.dixit@intel.com","sentAt":"2020-04-21T05:18:58Z","receivedAt":"2020-04-21T05:19:01Z","isPatch":false,"sender":{"key":"ashutosh.dixit@intel.com","avatar":null},"body":"On Mon, 20 Apr 2020 10:03:01 -0700, Konstantin Ryabitsev wrote:\n>\n> On Mon, Apr 20, 2020 at 08:44:39AM -0700, Dixit, Ashutosh wrote:\n> > I am seeing a strange behavior in git-fetch in 2.26. I frequently fetch\n> > from a couple of linux kernel remotes (so you will have an idea how big the\n> > repo is). I have a different system with 2.20 on which I never see a\n> > problem.\n> >\n> > So let us say I fetch with 2.20 and it fetches say 20,000 objects. However\n> > with 2.26 it starts fetching millions of objects, objects which are already\n> > present locally. I don't know yet if this happens each time or only once in\n> > a while, I have seen it happen twice, will keep an eye out for this.\n> >\n> > If you open a bug please let me know and I can update it with my\n> > findings. Unless it is a known issue, perhaps already fixed?\n>\n> It's a known issue with protocol v2, but nobody's been able to properly\n> reproduce it in order to debug. If you can reliably make it reoccur,\n> then please make a copy of your local tree and share with this list,\n> together with your gitconfig and the remote you're pulling.\n>\n> Setting protocol.version=1 should fix it, but if you are willing to help\n> troubleshoot it, a bunch of people will be super thankful to you for\n> that, as it affects quite a number of kernel developers.\n\nI will see what I can do. I think I am seeing an instance where a branch\nhas incorrect SHA's during the clone itself but I haven't been able to\nreproduce it after the HEAD moved at the remote. I'll report back if I have\na reliable reproducer. Thanks!\n"},{"id":"395811","messageId":"20200421064541.GG96152@google.com","threadId":"53261","inReplyTo":"878siqxiu0.wl-ashutosh.dixit@intel.com","subject":"Re: Bug in 2.26: git-fetch fetching too many objects?","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2020-04-21T06:45:41Z","receivedAt":"2020-04-21T06:45:46Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"(+cc: Jonathan Tan, fetch negotiation expert)\nHi,\n\nDixit, Ashutosh wrote:\n\n> I am seeing a strange behavior in git-fetch in 2.26. I frequently fetch\n> from a couple of linux kernel remotes (so you will have an idea how big the\n> repo is). I have a different system with 2.20 on which I never see a\n> problem.\n>\n> So let us say I fetch with 2.20 and it fetches say 20,000 objects. However\n> with 2.26 it starts fetching millions of objects, objects which are already\n> present locally. I don't know yet if this happens each time or only once in\n> a while, I have seen it happen twice, will keep an eye out for this.\n>\n> If you open a bug please let me know and I can update it with my\n> findings. Unless it is a known issue, perhaps already fixed?\n\nDoes \"git config --global fetch.negotiationAlgorithm skipping\" help?\nIt might be time for us to make that the default.\n\nI suspect this is related to the change that protocol v2 does to use\nstateless-rpc even in stateful protocols.  If my suspicion is correct,\nthen the same behavior would show up with protocol v0 over http and\nhttps as well.\n\nThanks and hope that helps,\nJonathan\n"},{"id":"395847","messageId":"xmqqblnkodi4.fsf@gitster.c.googlers.com","threadId":"53261","inReplyTo":"20200421064541.GG96152@google.com","subject":"Re: Bug in 2.26: git-fetch fetching too many objects?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-21T19:16:51Z","receivedAt":"2020-04-21T19:16:57Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> (+cc: Jonathan Tan, fetch negotiation expert)\n> Hi,\n>\n> Dixit, Ashutosh wrote:\n>\n>> I am seeing a strange behavior in git-fetch in 2.26. I frequently fetch\n>> from a couple of linux kernel remotes (so you will have an idea how big the\n>> repo is). I have a different system with 2.20 on which I never see a\n>> problem.\n> ...\n> I suspect this is related to the change that protocol v2 does to use\n> stateless-rpc even in stateful protocols.  If my suspicion is correct,\n> then the same behavior would show up with protocol v0 over http and\n> https as well.\n\nThanks.  \n\nThis is at least the fourth time we hear that v2 may not be ready\nfor the real-world use.  Perhaps we should revert the default flip\non the maintenance track while we hunt for bugs and improve the\nprotocol support?\n\n"},{"id":"395848","messageId":"20200421193611.GA103469@google.com","threadId":"53261","inReplyTo":"xmqqblnkodi4.fsf@gitster.c.googlers.com","subject":"Re: Bug in 2.26: git-fetch fetching too many objects?","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2020-04-21T19:36:11Z","receivedAt":"2020-04-21T19:36:16Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nJunio C Hamano wrote:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n>> Dixit, Ashutosh wrote:\n\n>>> I am seeing a strange behavior in git-fetch in 2.26. I frequently fetch\n>>> from a couple of linux kernel remotes (so you will have an idea how big the\n>>> repo is). I have a different system with 2.20 on which I never see a\n>>> problem.\n>> ...\n>> I suspect this is related to the change that protocol v2 does to use\n>> stateless-rpc even in stateful protocols.  If my suspicion is correct,\n>> then the same behavior would show up with protocol v0 over http and\n>> https as well.\n[...]\n> This is at least the fourth time we hear that v2 may not be ready\n> for the real-world use.  Perhaps we should revert the default flip\n> on the maintenance track while we hunt for bugs and improve the\n> protocol support?\n\nThat feels to me like an overreaction, since these are all reports of\nthe same issue that we have a fix to.  Shouldn't we just flip the\ndefault for fetch.negotiationAlgorithm to skipping?  If we revert to\nbuy time, what would we do with that time?\n\nIn other words, if I understand correctly, it's describing an issue\nthat also exists in protocol v0 for https.  I would be *very*\ninterested in any evidence one way or another about whether I am\nunderstanding correctly.  If we flip the default, I don't see how\nwe'll get that evidence, since we've been using protocol v2 as the\ndefault at $DAYJOB for quite a long time now.\n\nThanks,\nJonathan\n"},{"id":"395852","messageId":"xmqqtv1cmwmt.fsf@gitster.c.googlers.com","threadId":"53261","inReplyTo":"20200421193611.GA103469@google.com","subject":"Re: Bug in 2.26: git-fetch fetching too many objects?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-21T20:06:34Z","receivedAt":"2020-04-21T20:06:40Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> In other words, if I understand correctly, it's describing an issue\n> that also exists in protocol v0 for https.  I would be *very*\n> interested in any evidence one way or another about whether I am\n> understanding correctly.\n\nI am assuming that the issue experienced by these people after\nflipping the default to v2 was *not* experienced by the same folks\nback when they were not on v2.  If not, I cannot explain why their\nreport say \"it suddenly started doing this\".\n\n> ..., since we've been using protocol v2 as the\n> default at $DAYJOB for quite a long time now.\n\nIs it possible that folks getting hurt after 2.26 got released have\nquite different use case / fetch pattern from what you see at\n$DAYJOB, which are covered well in the current code?  Keep using v2\nat $DAYJOB may not help us diagnose the issue more than flipping the\ndefault back (and at $DAYJOB the default is under your control ;-).\n"},{"id":"395864","messageId":"20200421211133.GB3510074@coredump.intra.peff.net","threadId":"53261","inReplyTo":"20200421193611.GA103469@google.com","subject":"Re: Bug in 2.26: git-fetch fetching too many objects?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-04-21T21:11:33Z","receivedAt":"2020-04-21T21:11:36Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 21, 2020 at 12:36:11PM -0700, Jonathan Nieder wrote:\n\n> > This is at least the fourth time we hear that v2 may not be ready\n> > for the real-world use.  Perhaps we should revert the default flip\n> > on the maintenance track while we hunt for bugs and improve the\n> > protocol support?\n> \n> That feels to me like an overreaction, since these are all reports of\n> the same issue that we have a fix to.  Shouldn't we just flip the\n> default for fetch.negotiationAlgorithm to skipping?  If we revert to\n> buy time, what would we do with that time?\n\nDo we know that fetch.negotiationAlgorithm helps? I thought we didn't\nyet know the actual cause of the bug. If that is the culprit, and people\nwould have seen this under v0 using stateless-http, why didn't we get\nmore reports of it then? Surely some people used http over git://?\n\nI do agree that flipping the default away from v2 may be premature,\nespecially if we don't have a plan for moving forward. It sounds like\nswapping out the negotiationAlgorithm would at least be likely to\ngenerate more data, even if it is only a guess.\n\n-Peff\n"}]}