git-for-windows / git

A fork of Git containing Windows-specific patches.
http://gitforwindows.org/
Other
8.39k stars 2.55k forks source link

shared memory deadlock between git commands launched in same shell #5237

Open ConceptualWempa opened 3 weeks ago

ConceptualWempa commented 3 weeks ago

Setup

64-bit

$ git --version --build-options

git --version --build-options git version 2.47.0.windows.2 cpu: x86_64 built from commit: 1f8a83cba6e88fad4b881885e64cfb89458e3653 sizeof-long: 4 sizeof-size_t: 8 shell-path: D:/git-sdk-64-build-installers/usr/bin/sh feature: fsmonitor--daemon libcurl: 8.10.1 OpenSSL: OpenSSL 3.2.3 3 Sep 2024 zlib: 1.3.1

10, 64-bit

$ cmd.exe /c ver

Microsoft Windows [Version 10.0.19045.5011]

defaults, except default branch name

One of the following:

type "C:\Program Files\Git\etc\install-options.txt" type "C:\Program Files (x86)\Git\etc\install-options.txt" type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt" type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt" $ cat /etc/install-options.txt

cat /etc/install-options.txt Editor Option: VIM Custom Editor Path: Default Branch Option: main Path Option: Cmd SSH Option: OpenSSH Tortoise Option: false CURL Option: OpenSSL CRLF Option: CRLFCommitAsIs Bash Terminal Option: MinTTY Git Pull Behavior Option: Merge Use Credential Manager: Enabled Performance Tweaks FSCache: Enabled Enable Symlinks: Disabled Enable FSMonitor: Disabled

None that I'm aware of.

Details

Git Bash

git gui & git log

git log should've printed usual output

git log hangs with no output ... upon ctrl-c, something similar to follow is printed:

  0 [] less 2283 C:\Program Files\Git\usr\bin\less.exe: *** fatal error - Can't reopen shared memory during exec, Win32 error 6

does not appear to be related to a specific repo ... although, perhaps significantly, 'git init ...' in the same shell does NOT hang, and 'git log' in the resulting empty workspace prints: fatal: your current branch 'main' does not have any commits yet as expected ... 'git status' and 'git add' also work, but 'git commit' hangs and ctrl-c elicits similar output (except the program reported is ...\usr\bin\sh.exe)

dscho commented 2 weeks ago

Hmm. I cannot reproduce. In a freshly-initialized worktree:

$ git gui &
[3] 2215

$  git log
fatal: your current branch 'main' does not have any commits yet
ConceptualWempa commented 1 week ago

@dscho try with a non-empty repo - I saw the same result with an empty one while experimenting, suppose I should've specified that "the usual output" meant at least one commit, i.e. a non-empty repo.