From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Peter Baumann <waste.manager@gmx.de>,
Robert Wruck <wruck@tweerlei.de>,
git@vger.kernel.org
Subject: Re: [BUG] git cat-file does not terminate
Date: Tue, 8 Mar 2011 16:14:23 -0500 [thread overview]
Message-ID: <20110308211423.GB4594@sigill.intra.peff.net> (raw)
In-Reply-To: <7vzkpa7qmp.fsf@alter.siamese.dyndns.org>
On Fri, Mar 04, 2011 at 09:16:30AM -0800, Junio C Hamano wrote:
> How prevalent is the problematic cygwin1.dll 1.7.8? Also for how long did
> this bug exist, in other words, if we were to make a table of problematic
> versions, would we have only just a handful entries in it? Also can we at
> runtime find out what version we are running?
>
> The reason I am asking these questions is because I think, assuming that
> this would affect many unsuspecting Cygwin users, the best fix would be to
> add a hook in the compat/ layer that decides if MAX_WRITE_SIZE workaround
> is necessary at runtime, and do something like this:
>
> ssize_t xwrite(int fd, const void *buf, size_t len)
> {
> ssize_t nr;
> static size_t max_write_size = platform_max_write_size();
>
> if (max_write_size && max_write_size < len)
> len = max_write_size;
> ...
> }
How are we doing the runtime test for platform max write?
If I read the original bug report correctly, the problem was that write
would actually write some bytes _and_ return -1, which is terrible. We
can detect "seems to be returning -1 over and over", but we can't handle
a misbehavior like writing and claiming not to have done so.
So I think the test needs to be "is our version of cygwin in the broken
list" and not "let's try a few different writes and see what works".
But it is still not clear to me how many versions have this bug. I think
the next stop is to show the cygwin developers a clear test-case and see
whether it's already fixed, and which versions show the behavior. They
should be able to get that information much more easily than us. I
really don't want to get involved in bisecting bugs in cygwin (according
to cygwin.com, it's kept in CVS. Blech).
Robert, can you try (or have you already tried) submitting a bug report
to Cygwin?
-Peff
next prev parent reply other threads:[~2011-03-08 21:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 13:04 [BUG] git cat-file does not terminate Robert Wruck
2011-03-04 15:40 ` Peter Baumann
2011-03-04 16:00 ` Jeff King
2011-03-04 17:16 ` Junio C Hamano
2011-03-04 17:29 ` Robert Wruck
2011-03-04 18:26 ` Robert Wruck
2011-03-08 21:14 ` Jeff King [this message]
2011-03-08 22:52 ` Junio C Hamano
2011-03-09 14:49 ` Robert Wruck
2011-03-09 19:32 ` Junio C Hamano
2011-03-09 19:51 ` Robert Wruck
2011-03-09 21:43 ` Jeff King
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110308211423.GB4594@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=waste.manager@gmx.de \
--cc=wruck@tweerlei.de \
/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.
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 NNTP newsgroup(s).