git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG REPORT] git fetch --prefetch with incorrect options hangs with 2.47.0
@ 2024-11-11 22:15 Eric Mills
  2024-11-12  6:49 ` Jeff King
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Mills @ 2024-11-11 22:15 UTC (permalink / raw)
  To: git@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 82 bytes --]



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


[-- Attachment #2: git-bugreport-2024-11-11-1449.txt --]
[-- Type: text/plain, Size: 2627 bytes --]

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]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-11-12  9:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 22:15 [BUG REPORT] git fetch --prefetch with incorrect options hangs with 2.47.0 Eric Mills
2024-11-12  6:49 ` Jeff King
2024-11-12  8:32   ` [PATCH 0/3] double-free with git fetch --prefetch Jeff King
2024-11-12  8:34     ` [PATCH 1/3] fetch: adjust refspec->raw_nr when filtering prefetch refspecs Jeff King
2024-11-12  8:36     ` [PATCH 2/3] refspec: drop separate raw_nr count Jeff King
2024-11-12  8:39     ` [PATCH 3/3] refspec: store raw refspecs inside refspec_item Jeff King
2024-11-12  9:30       ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).