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

Re: [PATCH] builtin/credential-cache--daemon: fix error when "exit"ing on Cygwin

From
Jeff King <peff@peff.net>
Date
Oct 16, 2024, 15:09 UTC
Message-ID
<20241016150922.GA1848210@coredump.intra.peff.net>
In-Reply-To
<20241016145539.GA703747@coredump.intra.peff.net>
On Wed, Oct 16, 2024 at 10:55:40AM -0400, Jeff King wrote:
Show 22 quoted lines
> > 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.

-Peff
Previous: Jeff KingNext: Ramsay Jones
Message 3 of 22 in “builtin/credential-cache--daemon: fix error when "exit"ing on Cygwin”
  1. builtin/credential-cache--daemon: fix error when "exit"ing on CygwinPatrick Steinhardt, Oct 16, 2024
  2. Jeff KingOct 16, 2024
  3. Jeff KingOct 16, 2024
  4. Ramsay JonesOct 16, 2024
  5. Taylor BlauOct 16, 2024
  6. Jeff KingOct 17, 2024
  7. Patrick SteinhardtOct 17, 2024
  8. Ramsay JonesOct 17, 2024
  9. Patrick SteinhardtOct 18, 2024
  10. Taylor BlauOct 17, 2024
  11. Ramsay JonesOct 16, 2024
  12. builtin/credential-cache--daemon: fix error when "exit"ing on CygwinPatrick Steinhardt, Oct 18, 2024
  13. credential-cache: treat ECONNABORTED like ECONNRESETJeff King, Oct 18, 2024
  14. Patrick SteinhardtOct 18, 2024
  15. Ramsay JonesOct 18, 2024
  16. Taylor BlauOct 18, 2024
  17. Kristoffer HaugsbakkOct 18, 2024
  18. Jeff KingOct 19, 2024
  19. Comment trailers vs. bracketed linesKristoffer Haugsbakk, Oct 20, 2024
  20. Kristoffer HaugsbakkMay 7, 2025
  21. Jeff KingMay 8, 2025
  22. Junio C HamanoMay 7, 2025

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.