git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: kusmabite@gmail.com
Cc: msysgit@googlegroups.com, Git Mailing List <git@vger.kernel.org>
Subject: Re: [msysGit] upload-pack timing issue on windows?
Date: Sat, 6 Feb 2010 23:18:59 +0100	[thread overview]
Message-ID: <201002062318.59180.j6t@kdbg.org> (raw)
In-Reply-To: <40aa078e1002060401r1dec3c2ate3ddd4f5f5db1e0c@mail.gmail.com>

On Samstag, 6. Februar 2010, Erik Faye-Lund wrote:
> However, I have tracked down a bit of what goes on in the client.
> There's a call to read_in_full, called from pack-write.c, line 246
> that fails in the failure-case, but not in the success-case. This is
> where the client expects "pack\tSHA-1" or "keep\tSHA-1". There "fatal:
> early EOF"-messages seems to originate from index-pack.c, line 197.
> This is the first line of code in parse_pack_header(), it's also
> AFAICT the first call-site for any read(0, <...>) (though fill()).

This looks like upload-pack died without sending enough to fill a pack header.

Try merging this branch:

  git://repo.or.cz/git/mingw/j6t.git async-in-thread

It contains your changes to start_async plus a refinement of die() when it is 
called from the async procedure (it passes t5530, for example). It is also 
converted to pthreads, and therefore also works on Unix. The new 
implementation of start_async is more careful about the file handles, though 
not so much on Windows.

If there's no change for you, then you could look into implementing 
fcntl(F_GETFD/SETFD, FD_CLOEXEC), which are currently ignored, on top of this 
branch, using Get/SetHandleInformation().

Background: On Unix, we need FD_CLOEXEC so that the fds that are meant for the 
async thread do not remain open in an unrelated child process; on Windows, we 
are just lucky and can get away without FD_CLOEXEC because our pipe()s are 
non-inheritable and async only work with pipes. But once we pass other fds to 
the async procedure, we need a working FD_CLOEXEC. Perhaps something in this 
direction is related to your problem.

You could push out your current state of the git-daemon and a recipe to 
reproduce the problem. Perhaps I find some time to look into it.

-- Hannes

  reply	other threads:[~2010-02-06 22:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 23:51 upload-pack timing issue on windows? Erik Faye-Lund
2010-02-06 10:06 ` Johannes Sixt
2010-02-06 12:01   ` [msysGit] " Erik Faye-Lund
2010-02-06 22:18     ` Johannes Sixt [this message]
2010-02-08 11:18       ` Erik Faye-Lund
2010-02-10 20:41         ` Jay Soffian
2010-08-22 23:27         ` Erik Faye-Lund
2010-08-24 19:24           ` Johannes Sixt
2010-08-25 17:40             ` Erik Faye-Lund
2010-08-25 20:53               ` Johannes Sixt
2010-08-25 20:57                 ` Erik Faye-Lund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002062318.59180.j6t@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=kusmabite@gmail.com \
    --cc=msysgit@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).