Regression found in git-core-2.9.3-1.fc25 and git-core-2.7.4-3.fc24
+++ This bug was initially created as a clone of Bug #1204193 +++
This bug affects git-2.1.0-4.fc21.x86_64 also.
+++ This bug was initially created as a clone of Bug #1204191 +++
A git19-git installation (being invoked via gitweb) goes into an infinite loop while serving pretty vanilla requests, if the refs/heads/ directory contains a symlink that's broken.
Reproduction recipe:
% git init
% mkdir .git/refs/remotes
% ln -s ../remotes/foo .git/refs/heads/bar
% strace git --git-dir=`pwd`.git ls-tree bar
[...]
open("/sourceware1/home/fche/tmp2/.git/refs/heads/bar", O_RDONLY) = -1 ENOENT (No such file or directory)
lstat("/sourceware1/home/fche/tmp2/.git/refs/heads/bar", {st_mode=S_IFLNK|0777, st_size=14, ...}) = 0
readlink("/sourceware1/home/fche/tmp2/.git/refs/heads/bar", "../remotes/foo", 255) = 14
open("/sourceware1/home/fche/tmp2/.git/refs/heads/bar", O_RDONLY) = -1 ENOENT (No such file or directory)
lstat("/sourceware1/home/fche/tmp2/.git/refs/heads/bar", {st_mode=S_IFLNK|0777, st_size=14, ...}) = 0
readlink("/sourceware1/home/fche/tmp2/.git/refs/heads/bar", "../remotes/foo", 255) = 14
[...endlessly looping...]
When gdb is sicced at it, the loop appears to be around line 1360..1401 of refs.c.
--- Additional comment from on 2015-03-23 11:10:08 EDT ---
correction:
-> % strace git --git-dir=`pwd`.git ls-tree bar
% strace git --git-dir=`pwd`/.git ls-tree bar
or just
git ls-tree bar
--- Additional comment from on 2015-03-26 07:46:59 EDT ---
Patches are proposed and wait for approval by upstream - or more precisely picked solution in upstream.
http://thread.gmane.org/gmane.comp.version-control.git/266145
--- Additional comment from Fedora Update System on 2015-06-23 02:18:11 EDT ---
git-2.1.0-5.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/git-2.1.0-5.fc21
--- Additional comment from Fedora Update System on 2015-06-23 02:18:20 EDT ---
git-2.4.3-4.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/git-2.4.3-4.fc22
--- Additional comment from Fedora Update System on 2015-06-24 11:55:37 EDT ---
Package git-2.1.0-5.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing git-2.1.0-5.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10565/git-2.1.0-5.fc21
then log in and leave karma (feedback).
--- Additional comment from Fedora Update System on 2015-06-27 08:40:48 EDT ---
git-2.4.3-4.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
--- Additional comment from Fedora Update System on 2015-07-03 14:48:26 EDT ---
git-2.1.0-5.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.