{"thread":{"id":"27568","subject":"old but persistent problem: bad line length character","startedAt":"2011-06-07T16:33:07Z","lastAt":"2011-06-08T18:33:51Z","messageCount":6,"participants":["Peter Kleiweg","Jeff King","Junio C Hamano","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"169454","messageId":"alpine.DEB.1.10.1106071832470.4175@localhost","threadId":"27568","inReplyTo":null,"subject":"old but persistent problem: bad line length character","fromName":"Peter Kleiweg","fromEmail":"p.c.j.kleiweg@rug.nl","sentAt":"2011-06-07T16:33:07Z","receivedAt":"2011-06-07T16:33:07Z","isPatch":false,"sender":{"key":"p.c.j.kleiweg@rug.nl","avatar":null},"body":"\nI get this error message with git version 1.7.5.GIT: \n\n    fatal: protocol error: bad line length character:\n\nGit version 1.4.4.4 works fine.\n\nI have read this was a very old problem, and there were some \nfixes, then how come I still get this in the latest version of \nGit? All the explanations I could find about this bug don't seem \nto apply for my case. \n\nHow do bugs in Git get solved? I can't find an issue tracker. \n\n\nDetails:\n\n$ export GIT_TRACE=1\n$ export GIT_TRACE_PACKET=1\n$ git push \ntrace: built-in: git 'push'\ntrace: run_command: 'ssh' 'github' 'git-receive-pack '\\''pebbe/Gabmap.git'\\''' \nfatal: protocol error: bad line length character:\n\nThe output above comes immediately. When I run the ssh command \nlisted above, it takes time before I get a response. So even if \nGit does run the command, it doesn't wait for a response from \nthe server.\n\nSetting GIT_TRACE_PACKET doesn't seem to have any effect. \n\n\nI added some debug code in pkt-line.c, function \npacket_read_line(). This tells me that 'buffer' that is passed \nto packet_read_line() contains nothing but null characters, \nwhile 'size' is set to 1000.\n\n\nRunning the ssh command as listed by trace works fine:\n\n$ ssh github git-receive-pack 'pebbe/Gabmap.git'\n00720444852406fd34c3eb0c8cdcb05cd2af979d2b34 refs/heads/master report-status delete-refs side-band-64k ofs-delta\n0000\n\n-- \nPeter Kleiweg\nhttp://pkleiweg.home.xs4all.nl/\n"},{"id":"169482","messageId":"20110607180624.GA23752@sigill.intra.peff.net","threadId":"27568","inReplyTo":"alpine.DEB.1.10.1106071832470.4175@localhost","subject":"Re: old but persistent problem: bad line length character","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-06-07T18:06:25Z","receivedAt":"2011-06-07T18:06:25Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jun 07, 2011 at 06:33:07PM +0200, Peter Kleiweg wrote:\n\n> I get this error message with git version 1.7.5.GIT: \n> \n>     fatal: protocol error: bad line length character:\n> \n> Git version 1.4.4.4 works fine.\n\nI can't reproduce the problem here.  Can you try bisecting to find the\ncommit that introduces the problem?\n\n> How do bugs in Git get solved? I can't find an issue tracker. \n\nYou send an email to the mailing list and people work on it. :)\n\n> Details:\n> \n> $ export GIT_TRACE=1\n> $ export GIT_TRACE_PACKET=1\n> $ git push \n> trace: built-in: git 'push'\n> trace: run_command: 'ssh' 'github' 'git-receive-pack '\\''pebbe/Gabmap.git'\\''' \n> fatal: protocol error: bad line length character:\n\nYour \"ssh github\" is weird. Usually that would be \"ssh git@github.com\",\nunless you have set up an alias in .ssh/config. Is that the case? If so,\ncan you show us the alias? Is it going through a proxy machine or\nanything exotic?\n\n> Setting GIT_TRACE_PACKET doesn't seem to have any effect.\n\nThat's probably because we never get any packets; the very first one is\nbogus, and we abort.\n\n> I added some debug code in pkt-line.c, function \n> packet_read_line(). This tells me that 'buffer' that is passed \n> to packet_read_line() contains nothing but null characters, \n> while 'size' is set to 1000.\n\nYeah, it's expecting data to be written into it. You need to see what\npacket_read_line reads into linelen via safe_read (which is also printed\nin the error message, so it looks from the above like it contains NULs).\n\n> Running the ssh command as listed by trace works fine:\n> \n> $ ssh github git-receive-pack 'pebbe/Gabmap.git'\n> 00720444852406fd34c3eb0c8cdcb05cd2af979d2b34 refs/heads/master report-status delete-refs side-band-64k ofs-delta\n> 0000\n\nThat looks normal. I wonder why git is not getting the same data.\n\n-Peff\n"},{"id":"169515","messageId":"alpine.DEB.1.10.1106072337500.11389@localhost","threadId":"27568","inReplyTo":"20110607180624.GA23752@sigill.intra.peff.net","subject":"Re: old but persistent problem: bad line length character","fromName":"Peter Kleiweg","fromEmail":"pkleiweg@xs4all.nl","sentAt":"2011-06-07T22:32:31Z","receivedAt":"2011-06-07T22:32:31Z","isPatch":false,"sender":{"key":"pkleiweg@xs4all.nl","avatar":"https://gravatar.com/avatar/0d4b65b8b9262c0f6e91c618dbde9a639c46ac2e53c1374fafd448bbfd913979?d=mp&s=160"},"body":"Jeff King schreef op de 7e dag van de zomermaand van het jaar 2011:\n\n> On Tue, Jun 07, 2011 at 06:33:07PM +0200, Peter Kleiweg wrote:\n> \n> > How do bugs in Git get solved? I can't find an issue tracker. \n> \n> You send an email to the mailing list and people work on it. :)\n\nIs that git@vger.kernel.org ?\n\n\n> > I added some debug code in pkt-line.c, function \n> > packet_read_line(). This tells me that 'buffer' that is passed \n> > to packet_read_line() contains nothing but null characters, \n> > while 'size' is set to 1000.\n> \n> Yeah, it's expecting data to be written into it. You need to see what\n> packet_read_line reads into linelen via safe_read (which is also printed\n> in the error message, so it looks from the above like it contains NULs).\n\nI made it read some more than 4 bytes. And this is what I get:\n\n{27}]0;github git-receive-pack 'pebbe/Gabmap.git'{7}\n\nAh, I see! I have a wrapper set-up around ssh that sets the \nwindow title of the shell to the ssh command argument. That is \nwhat messes things up!\n\nOK. Fixed now.\n\n\n\n\n\n-- \nPeter Kleiweg\nhttp://pkleiweg.home.xs4all.nl/\n"},{"id":"169614","messageId":"7vpqmo2wy7.fsf@alter.siamese.dyndns.org","threadId":"27568","inReplyTo":"alpine.DEB.1.10.1106072337500.11389@localhost","subject":"Re: old but persistent problem: bad line length character","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-06-08T14:56:48Z","receivedAt":"2011-06-08T14:56:48Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Peter Kleiweg <pkleiweg@xs4all.nl> writes:\n\n> I made it read some more than 4 bytes. And this is what I get:\n>\n> {27}]0;github git-receive-pack 'pebbe/Gabmap.git'{7}\n>\n> Ah, I see! I have a wrapper set-up around ssh that sets the \n> window title of the shell to the ssh command argument. That is \n> what messes things up!\n>\n> OK. Fixed now.\n\nThat does not explain why you earlier said 1.4.4.4 works and more recent\nversions do not, though.\n"},{"id":"169649","messageId":"m3d3iodya5.fsf@localhost.localdomain","threadId":"27568","inReplyTo":"7vpqmo2wy7.fsf@alter.siamese.dyndns.org","subject":"Re: old but persistent problem: bad line length character","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-06-08T17:33:20Z","receivedAt":"2011-06-08T17:33:20Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Peter Kleiweg <pkleiweg@xs4all.nl> writes:\n> \n> > I made it read some more than 4 bytes. And this is what I get:\n> >\n> > {27}]0;github git-receive-pack 'pebbe/Gabmap.git'{7}\n> >\n> > Ah, I see! I have a wrapper set-up around ssh that sets the \n> > window title of the shell to the ssh command argument. That is \n> > what messes things up!\n> >\n> > OK. Fixed now.\n> \n> That does not explain why you earlier said 1.4.4.4 works and more recent\n> versions do not, though.\n\n\n>From my #git channel logs:\n\nJun 03 19:09:42 <ShadeHawk>     Hmmm... for a while I had transient (i.e. fixed now) error\n                                when fetching from git.kernel.org repositories\nJun 03 19:09:50 <ShadeHawk>     $ git fetch origin\nJun 03 19:09:59 <ShadeHawk>     fatal: protocol error: bad line length character: git:\nJun 03 19:10:24 <ShadeHawk>     but when I wanted to debug it (with GIT_TRACE_PACKET=2),\n                                it was already fixed ;-P\n\n$ git version\ngit version 1.7.5\n\n\nIt might be not related with issue that Peter encountered, though.\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"169658","messageId":"alpine.DEB.1.10.1106082024250.4195@localhost","threadId":"27568","inReplyTo":"7vpqmo2wy7.fsf@alter.siamese.dyndns.org","subject":"Re: old but persistent problem: bad line length character","fromName":"Peter Kleiweg","fromEmail":"pkleiweg@xs4all.nl","sentAt":"2011-06-08T18:33:51Z","receivedAt":"2011-06-08T18:33:51Z","isPatch":false,"sender":{"key":"pkleiweg@xs4all.nl","avatar":"https://gravatar.com/avatar/0d4b65b8b9262c0f6e91c618dbde9a639c46ac2e53c1374fafd448bbfd913979?d=mp&s=160"},"body":"Junio C Hamano schreef op de 8e dag van de zomermaand van het jaar 2011:\n\n> Peter Kleiweg <pkleiweg@xs4all.nl> writes:\n> \n> > I made it read some more than 4 bytes. And this is what I get:\n> >\n> > {27}]0;github git-receive-pack 'pebbe/Gabmap.git'{7}\n> >\n> > Ah, I see! I have a wrapper set-up around ssh that sets the \n> > window title of the shell to the ssh command argument. That is \n> > what messes things up!\n> >\n> > OK. Fixed now.\n> \n> That does not explain why you earlier said 1.4.4.4 works and more recent\n> versions do not, though.\n\nI downloaded the sources of 1.4.4.4 and compiled it. I get the \nsame problem. I guess the pre-compiled version that comes from \nDebian uses /usr/bin/ssh, and when I compile it myself it \nuses the version of ssh it finds in PATH.\n\n\n\n-- \nPeter Kleiweg\nhttp://pkleiweg.home.xs4all.nl/\n"}]}