[BUG REPORT] git fetch --prefetch with incorrect options hangs with 2.47.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Eric Mills (he/him) | Epic | Hyperspace
ermills@xxxxxxxx | (608) 271-9000

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
I ran `git fetch --prefetch origin main` with git 2.47 on both my
Windows machine (2.47.windows.2) and my Mac (2.47.0) and it hangs.

When I downgrade, same command succeeds on
2.46.2.Windows.1 / 2.46.2 (macOS).

What did you expect to happen? (Expected behavior)
I expect the fetch to complete without hanging as it does in 2.46.2.

Note that while investigating this, I learned that `git fetch
--prefetch` may not be meant to be run with specific refs. The idea
was to prefetch `main`, but it seems that in 2.46.2 this prefetches
all refs from that remote even when a specific ref is given. If
prefetching specific refs is explicitly not allowed, I would expect a
more targeted error message instead of hanging. If it is meant to work,
I would expect that only that ref is prefetched.

What happened instead? (Actual behavior)
It hangs to the point that I have to end the process in Task Manager.

What's different between what you expected and what actually happened?
I don't expect the command to hang.

Anything else you want to add:
To quickly recap, the hang occurs on both macOS and Windows. It doesn't
happen in 2.46.2, but does happen in 2.47.0.

Even though I might be using the command incorrectly, I thought it was
worth reporting because it seems to be a regression.

I found the issue on Windows, but since I could reproduce it on macOS
(or something similar on macOS), I'm filing the issue upstream.

On Windows, I don't get an error. It hangs indefinitely.
On macOS, after a few seconds I got the following:

git(84051,0x20171cf40) malloc: *** error for object 0x600001978390:
pointer being freed was not allocated

git(84051,0x20171cf40) malloc: *** set a breakpoint in
malloc_error_break to debug

[1]    84051 abort      git fetch --prefetch origin main

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
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
uname: Windows 10.0 22631
compiler info: gnuc: 14.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe


[Enabled Hooks]

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux