git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Jeff King <peff@peff.net>
Cc: Patrick Steinhardt <ps@pks.im>,
	git@vger.kernel.org, Adam Dinwoodie <adam@dinwoodie.org>
Subject: Re: [PATCH] builtin/credential-cache--daemon: fix error when "exit"ing on Cygwin
Date: Wed, 16 Oct 2024 16:28:49 -0400	[thread overview]
Message-ID: <ZxAiAUdtddwk5RS7@nand.local> (raw)
In-Reply-To: <20241016150922.GA1848210@coredump.intra.peff.net>

On Wed, Oct 16, 2024 at 11:09:22AM -0400, Jeff King wrote:
> On Wed, Oct 16, 2024 at 10:55:40AM -0400, Jeff King wrote:
>
> > > The logic is broken on Cygwin though: when a client asks the daemon to
> > > exit, they won't see the EOF and will instead get an error message:
> > >
> > >   fatal: read error from cache daemon: Software caused connection abort
> > >
> > > This issue is known in Cygwin, see for example [1], but the exact root
> > > cause is not known.
> > > [...]
> > > [1]: https://github.com/cygporter/git/issues/51
> >
> > I don't see any details at that issue, but I'm not sure how it would fix
> > things. From the client's perspective, they are going to see the
> > descriptor either way. Unless there is some magic that fclose() does
> > that a normal descriptor-close-on-exit does not do.
> >
> > That "Software caused connection abort" thing seems like a weird
> > not-standard-Unix errno value. Searching for it mostly yields people
> > complaining about getting it from ssh under cygwin. :)
> >
> > If the magic that cygwin needs is actually "fclose before unlink", then
> > that is in opposition to other platforms (and I suspect would make t0301
> > racy there).
>
> This all seemed eerily familiar. Try this thread:
>
>   https://lore.kernel.org/git/9dc3e85f-a532-6cff-de11-1dfb2e4bc6b6@ramsayjones.plus.com/
>
> It looks like the conclusion was that we should adjust errno handling on
> the client side, but nobody ever followed up with an actual patch.

Thanks for digging. It would be great if you both and Ramsay could unify
on an agreeable path forward here.

In the meantime, I picked this up as 'ps/credential-cache-exit-cygwin'
in my tree, but let's hold it out from 'seen' as you note it racily
fails t0301.

Thanks,
Taylor

  parent reply	other threads:[~2024-10-16 20:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16 14:21 [PATCH] builtin/credential-cache--daemon: fix error when "exit"ing on Cygwin Patrick Steinhardt
2024-10-16 14:55 ` Jeff King
2024-10-16 15:09   ` Jeff King
2024-10-16 15:39     ` Ramsay Jones
2024-10-16 20:28     ` Taylor Blau [this message]
2024-10-17  2:33       ` Jeff King
2024-10-17  8:46         ` Patrick Steinhardt
2024-10-17 22:58           ` Ramsay Jones
2024-10-18  4:36             ` Patrick Steinhardt
2024-10-17 20:54         ` Taylor Blau
2024-10-16 15:12 ` Ramsay Jones
2024-10-18  4:36 ` [PATCH v2] " Patrick Steinhardt
2024-10-18  5:29   ` [PATCH] credential-cache: treat ECONNABORTED like ECONNRESET Jeff King
2024-10-18  5:32     ` Patrick Steinhardt
2024-10-18 15:33     ` Ramsay Jones
2024-10-18 21:17       ` Taylor Blau
2024-10-18 21:27     ` Kristoffer Haugsbakk
2024-10-19 21:21       ` Jeff King
2024-10-20 17:08         ` Comment trailers vs. bracketed lines Kristoffer Haugsbakk
2025-05-07 16:41           ` Kristoffer Haugsbakk
2025-05-08 20:24             ` Jeff King
2025-05-07 19:20           ` Junio C Hamano

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=ZxAiAUdtddwk5RS7@nand.local \
    --to=me@ttaylorr.com \
    --cc=adam@dinwoodie.org \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    /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).