I have an automated test that tries to clone a bunch of specific revisions from the local Git repository by using the following asynchronous Nim procedure.
proc cloneSpecificRevision(downloadMethod: DownloadMethod,
url, downloadDir: string,
vcsRevision: Sha1Hash) {.async.} =
assert vcsRevision != notSetSha1Hash
display("Cloning", "revision: " & $vcsRevision, priority = MediumPriority)
case downloadMethod
of DownloadMethod.git:
let downloadDir = downloadDir.quoteShell
createDir(downloadDir)
discard await tryDoCmdExAsync("git", @["-C", downloadDir, "init"])
discard await tryDoCmdExAsync("git",
@["-C", downloadDir, "remote", "add", "origin", url])
discard await tryDoCmdExAsync("git",
@["-C", downloadDir, "fetch", "--depth", "1", "origin", $vcsRevision])
discard await tryDoCmdExAsync("git",
@["-C", downloadDir, "reset", "--hard", "FETCH_HEAD"])
of DownloadMethod.hg:
discard await tryDoCmdExAsync("hg", @["clone", url, "-r", $vcsRevision])
The result is
Downloading /tmp/tlockfile/origins/dep1 using git
Cloning revision: 8b6ce61df05f4e21ad954f9ddb487eda8fb64f41
Executing git -C /tmp/nimble_94295/_tmptlockfileoriginsdep1_0.1.0_8b6ce61df05f4e21ad954f9ddb487eda8fb64f41 init
Downloading /tmp/tlockfile/origins/dep2 using git
Cloning revision: d1ba2f37a1647ca1ed804dfa0c8c73a7de98201e
Executing git -C /tmp/nimble_94295/_tmptlockfileoriginsdep2_0.1.0_d1ba2f37a1647ca1ed804dfa0c8c73a7de98201e init
Error: Resource temporarily unavailable (code: 11)
The used Git version is:
> git --version
git version 2.31.1
The problem happens only on Linux and my tests are passing normally on Windows and macOS systems. What can be the reason for this problem?