-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hanging on domain joined systems #4830
Comments
Could you |
I did another test and installed Git for Windows from the installer. I no longer seem to notice any big hangs, though the delays were somewhat intermittent before. It could be the problem only occurs when installing from Chocolaty (or just re-installing somehow fixed it).
Still, looking into the suggested strace output (with the new, non-hanging or at least seemingly faster, Git installation):
(Not connected to VPN, results look similar when connected. I redacted parts of some of the addresses just to be sure, I don't think it's sensitive, but I'd rather be safe than sorry). So maybe Privilege Guard is the thing doing the domain lookups, I'll check with IT. |
(un)fortunately, re-installing git using chocolaty again did not bring the issue back, and the output of strace looks the same. I'll try to get a strace log again when I notice delays. |
Interestingly, when I run a git command with strace it is faster than without.
The strace output shows that most of the time is spent on the same "Process 23180, exception c0000005 at ..." . In some cases, seemingly when running git log for the first time in a while on a repo, it can take multiple minutes to complete, absolutely breaking my workflow (same relatively small repo checked out in a different location):
|
I was also able to figure out:
|
Could be. And those Access Violations (0xC0000005) certainly look concerning. |
Frustratingly, I can't seem to reproduce Is there any way to run
|
That's because GIT_PAGER="strace -o /tmp/a1 less.exe" git log -20 |
Thanks @dscho, I was able to find out a bit more thanks to this It looks like quite a bit of time is spent opening "cygpid.59"
I'm still trying to figure out what exactly this means. On thing that might cause issues is that I have multiple cygwin and MinGW Unix tools installed on my system (Git for Windows, TDM-GCC-64 and an old Cygwin 3.4 I need for a legacy toolchain). It looks like
However, even when removing the Cygwin 3.4 Unix commands from my PATH, Interestingly, even if I connect to the VPN, resulting in a fast
It could however explain why I was seeing improvements after re-installing git. 1156236 is only ~ 1 second. Is there any other internal process git might be using that could slow down as a result of the domain server being unavailable? |
TL;DR: in Powershell, setting the HOME environmental variable seems to resolve the issue (even though the HOME env var is already set for my user in Windows). By looking at the Windows event viewer, something seems to be blocking my git commands before they make it to the pager. From a
Looking at git trace of the same command, it looks like the delay occurs somewhere between strace and sh:
Looking into the trace logs, less itself takes < 1second, but I did notice
This is unexpected, because the In git shell (bash), My guess is some Cygwin tool is trying to find my home folder, it's for some reason not picking up the |
today, for some reason, setting the Digging a bit further, it looks like
Launching C:\Program Files\Git\usr\bin\sh.exe with WinDbg, it looks like it is stuck on
Enabling debug logging for the Netlogon service I can see :
So it looks like:
If I am connected to the VPN, I can see calls to Could the shell git uses be replaced by a different shell, e.g. a MinGW bash or Powershell? I have a strong suspicion that the "BeyondTrust Privilege Management Service" / hook is what is actually doing the DC lookups. Would there be a way to prove this? |
I'm having similar issue that started today (or maybe few weeks ago), using
|
Setup
defaults?
Git was installed with chocolatey.
to the issue you're seeing?
Domain joined system in a WFH scenario, i.e. set up to use a domain controller, but the domain controller is only reachable over VPN.
Details
Primarily Powershell, but the same problem exists when using CMD. Bash (Git Bash) has a large start-up time.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
This commands should be quick, especially on a small repo.
The commands hang for a long time. E.g
The issues seems to be resolved when connecting to the corporate VPN network, i.e. when the domain controller is reachable, suggesting an issue similar to #4459. I was also able to see many git / Cygwin commands performing attempts to talk to the domain controller. My guess is that these attempt have to time out before the commands can complete.
The text was updated successfully, but these errors were encountered: