threads / bug / 60707

Bug: Git spawns subprocesses on windows

Subject: Bug: Git spawns subprocesses on windows

## tl;dr

3 messages between Jan 9, 2024 and Jan 10, 2024.

replies: 2people: 2as markdown or json

Domen Golob· Jan 9, 2024, 15:33 UTC · lore

Hello, the problem is exactly the same as what was reported here on stackoverflow: c# - Git for windows seems to create sub-processes that never die - Stack Overflow https://stackoverflow.com/questions/69579065/git-for-windows-seems-to-create-sub-processes-that-never-die

Additionally I have found out that:
- a Git for Windows subprocess is created for each repository and
every time a git command is issued this process grows in size and it
never dies.
- you cannot delete the .git folder from the terminal, but it works
via file explorer
- deleting the .git folder kills the Git for windows process
- creating changes in several repos creates multiple processes, and
sometimes the process is created as a subprocess

Here are some screenshots: https://photos.app.goo.gl/oinHVY1NAzHChU6CA

Hope this helps,
Thanks for making git awesome :)

Best regards, Domen

brian m. carlson· Jan 9, 2024, 22:56 UTC · re: Domen Golob · lore

Re: Bug: Git spawns subprocesses on windows

On 2024-01-09 at 15:33:43, Domen Golob wrote:
Show 15 quoted lines
> Hello,
> the problem is exactly the same as what was reported here on stackoverflow:
> c# - Git for windows seems to create sub-processes that never die -
> Stack Overflow
> https://stackoverflow.com/questions/69579065/git-for-windows-seems-to-create-sub-processes-that-never-die
> 
> Additionally I have found out that:
> - a Git for Windows subprocess is created for each repository and
> every time a git command is issued this process grows in size and it
> never dies.
> - you cannot delete the .git folder from the terminal, but it works
> via file explorer
> - deleting the .git folder kills the Git for windows process
> - creating changes in several repos creates multiple processes, and
> sometimes the process is created as a subprocess

You probably want to contact Git for Windows at https://github.com/git-for-windows/git. The reason I suggest that is that this is usually not a behaviour we see on Unix, and seems to be Windows-specific.

I don't know if it's possible to see command-line arguments of processes on Windows like it is with `ps` on Unix, but including that information if possible will be very useful to the maintainers. Without knowing that information, it's very unlikely that anyone will be able to help you since we don't know what's going on.

There are some possibilities of what's going on here:
* git gc is running.
* git maintenance or the fsmonitor is configured and is running.
* You have a non-default antivirus or monitoring software that causes
  processes to hang or not complete, so one of Git's subprocesses can't
  exit.  If you're using such software, we usually recommend completely
  removing it completely (disabling it is usually not sufficient),
  rebooting, and testing again to make sure it's not the problem.
* You have some other process which is running which spawns Git commands
  (editors, content indexers, etc.).
* We actually have a bug and some process is not waited for correctly,
  and zombie processes manifest differently on Windows than on Unix.
* Something else I haven't considered.

However, as I said, you'll probably want to contact the Git for Windows folks through their issue tracker.

-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Domen Golob· Jan 10, 2024, 09:29 UTC · re: brian m. carlson · lore

Re: Bug: Git spawns subprocesses on windows

Thanks for your answer, indeed this does not happen on Unix, and I don't have this issue there. Will report the bug to the windows team.

Thanks.

On Tue, 9 Jan 2024 at 23:56, brian m. carlson <sandals@crustytoothpaste.net> wrote:

Show 49 quoted lines
>
> On 2024-01-09 at 15:33:43, Domen Golob wrote:
> > Hello,
> > the problem is exactly the same as what was reported here on stackoverflow:
> > c# - Git for windows seems to create sub-processes that never die -
> > Stack Overflow
> > https://stackoverflow.com/questions/69579065/git-for-windows-seems-to-create-sub-processes-that-never-die
> >
> > Additionally I have found out that:
> > - a Git for Windows subprocess is created for each repository and
> > every time a git command is issued this process grows in size and it
> > never dies.
> > - you cannot delete the .git folder from the terminal, but it works
> > via file explorer
> > - deleting the .git folder kills the Git for windows process
> > - creating changes in several repos creates multiple processes, and
> > sometimes the process is created as a subprocess
>
> You probably want to contact Git for Windows at
> https://github.com/git-for-windows/git.  The reason I suggest that is
> that this is usually not a behaviour we see on Unix, and seems to be
> Windows-specific.
>
> I don't know if it's possible to see command-line arguments of processes
> on Windows like it is with `ps` on Unix, but including that information
> if possible will be very useful to the maintainers.  Without knowing
> that information, it's very unlikely that anyone will be able to help
> you since we don't know what's going on.
>
> There are some possibilities of what's going on here:
>
> * git gc is running.
> * git maintenance or the fsmonitor is configured and is running.
> * You have a non-default antivirus or monitoring software that causes
>   processes to hang or not complete, so one of Git's subprocesses can't
>   exit.  If you're using such software, we usually recommend completely
>   removing it completely (disabling it is usually not sufficient),
>   rebooting, and testing again to make sure it's not the problem.
> * You have some other process which is running which spawns Git commands
>   (editors, content indexers, etc.).
> * We actually have a bug and some process is not waited for correctly,
>   and zombie processes manifest differently on Windows than on Unix.
> * Something else I haven't considered.
>
> However, as I said, you'll probably want to contact the Git for Windows
> folks through their issue tracker.
> --
> brian m. carlson (he/him or they/them)
> Toronto, Ontario, CA

← back to recent threads