Fetching on MacOS intermittently hangs in secure transport layer (+ gha reproducer) · Issue #6417 · libgit2/libgit2 · GitHub
Skip to content

Fetching on MacOS intermittently hangs in secure transport layer (+ gha reproducer) #6417

Open

Description

@jeroen

MacOS users of the R bindings have reported that cloning on MacOS randomly fails with TLS errors about 20% of the time, depending on the user's networking speed. I was able to confirm this and create a reproducible example that shows the problem, details are here: https://github.com/jeroen/libgit2-macos-bug

The same repository also contains a github action that runs a few clones, after a while one of them always fails: https://github.com/jeroen/libgit2-macos-bug/actions

Transferred 9311 of 9312 objects...
  SecureTransport error: connection closed via error

The problem does not happen with command-line git on the same machines, which rules out a misbehaved server.

Also the problem does not appear on Windows or Linux, so likely something in MacOS SecureTransport.

Reproduction steps

A reproducer script is here: https://github.com/jeroen/libgit2-macos-bug

Actual behavior

Clone hangs and eventually fails.

Version of libgit2 (release number or SHA1)

Tested with 1.5.0, 1.4.2 and 1.3.0

Operating system(s) tested

MacOS 10.13, 10.15, 11, 12, and 13, both on ARM and Intel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions