git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Cannot clone redirecting stdout

From
Johan Sørensen <johan@johansorensen.com>
Date
Sep 11, 2009, 15:46 UTC
Message-ID
<9e0f31700909110846h54959ae6u466ceda40799ba37@mail.gmail.com>
In-Reply-To
<20090911135110.GA30860@coredump.intra.peff.net>
On Fri, Sep 11, 2009 at 3:51 PM, Jeff King <peff@peff.net> wrote:
Show 30 quoted lines
> On Fri, Sep 11, 2009 at 06:23:29AM -0400, Jeff King wrote:
>
>> > I faced a problem when trying to clone git://gitorious.org/qt/qt.git
>> >
>> > this works:
>> > git clone -n git://gitorious.org/qt/qt.git repo
>> >
>> > this doesn't:
>> > git clone -n git://gitorious.org/qt/qt.git repo >log
>> > fatal: The remote end hung up unexpectedly
>> > fatal: early EOF
>> > fatal: index-pack failed
>>
>> I can reproduce the problem here. But after staring at the strace for a
>> long time, I don't think the problem is on the client side. The remote
>> end _does_ hang up unexpectedly.
>>
>> Looking at what we send, the only difference between the redirected and
>> unredirected case I could find is that we send the "no-progress" flag to
>> the server, which then hangs up on us instead of sending us the pack.
>> Which makes no sense.
>
> I did a little more testing, and I can't reproduce the problem against a
> local git-daemon. I tried using several versions for the server, going
> all the way back to v1.5.0, which pre-dates no-progress, and all of them
> worked just fine.
>
> So I am inclined to think there is something non-standard or broken at
> gitorious.org. I'm cc'ing support@gitorious to see if they have any
> comment.

Some quick tests seem to indicate it's related to the fact that our wonderful little fork+exec git-daemon[1] (which is different from the one distributed with git) exec's to "git-upload-pack --strict --timeout=30 /path/to/repo". Now, why exactly that'll trigger when the no-progress flag is given I'm not sure of. The daemon itself execs as soon as it figures out what repo the client requested, so apart from the timeout the only thing it reacts to is the header (the "${headersize}git-upload-pack project/repo.git\0host=gitorious.org\0" part).

We also do redirect stderr to /dev/null for reasons I cannot remember (so probably not good ones), that may be related as well. Well run some more tests...

[1]: http://gitorious.org/gitorious/mainline/blobs/master/script/git-daemon
Show 7 quoted lines
>
> -Peff
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: Jeff KingNext: Jeff King
Message 7 of 10 in “Cannot clone redirecting stdout”
  1. AloisioSep 10, 2009
  2. Stefan NaeweSep 11, 2009
  3. Stefan NaeweSep 11, 2009
  4. Jean-Luc HerrenSep 11, 2009
  5. Jeff KingSep 11, 2009
  6. Jeff KingSep 11, 2009
  7. Johan SørensenSep 11, 2009
  8. Jeff KingSep 11, 2009
  9. Jeff KingSep 11, 2009
  10. Daniel BarkalowSep 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.