git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git hangs with --separate-git-dir

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
May 16, 2023, 21:30 UTC
Message-ID
<ZGP2AzYJSLpI4kGN@tapette.crustytoothpaste.net>
In-Reply-To
<BY5PR14MB36544D63ECEAB9954C14407FA5799@BY5PR14MB3654.namprd14.prod.outlook.com>
On 2023-05-16 at 17:54:41, Tim Walter (Visual Concepts) wrote:
Show 22 quoted lines
> Windows 10 PC
> large project
> 300GB
> 500,000 files
> mix of binary and text assets.
> 
> cd /d D:\myproject
> git init --separate-git-dir=F:\myproject.git
> git add *
> 
> Git runs for a little while then hangs and does some really bad things to the OS as well.
> it seems impossible to kill git.exe even with administrator priviledges.
> f: drive ends up locked and any other process, such as explorer that try to look at it also hang
> you cannot log out without hanging
> or even restart
> This then requires a hard power cycle to fix.
>
> 100% reproducable.
> 
> running git init without --separate-git-dir and git add * works fine (takes 3 hours,.. but works)
> then I can move the .git dir to f: and reinit with --separate-git-dir and that works.
> So this seems to only be a problem for the initial init.

I don't use Windows so I can't verify this, but I would not expect this problem to occur. Even hashing 500,000 files consuming 300 GB should not hang the computer or take 3 hours.

What kind of disk is F:? Is it an external disk (USB or such, and if so, what speed and kind)? Is it a network drive? Is it another local disk in the computer (SSD or HDD)?

Are you using an antivirus or firewall other than the default, or any sort of other monitoring software? What I suspect is happening here is that you have an antivirus intercepting Git's operations and scanning the files for viruses, making everything really slow, and then at some point a bug occurs in the antivirus (which may have a kernel driver) and then things hang. This is probably made worse if F: is an external drive or network drive.

If you are, can you try to completely uninstall that software and reboot, and then try again?

-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: Tim Walter (Visual Concepts)Next: Tim Walter (Visual Concepts)
Message 2 of 6 in “git hangs with --separate-git-dir”
  1. Tim Walter (Visual Concepts)May 16, 2023
  2. brian m. carlsonMay 16, 2023
  3. Tim Walter (Visual Concepts)May 16, 2023
  4. brian m. carlsonMay 17, 2023
  5. Erik Cervin EdinMay 17, 2023
  6. Tim Walter (Visual Concepts)May 17, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.