-
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
Git Bash significantly slower after upgrade to 2.41.0 #4459
Git Bash significantly slower after upgrade to 2.41.0 #4459
Comments
+1, it take 30s to start in my computer. Promon show new version just waste 10s for query "C:\Program Files\Git\usr\bin\DNSAPI.dll" and got "NAME NOT FOUND", while old query "C:\Windows\System32\dnsapi.dll" and immediately got "SUCCESS" |
Same here, the problem is with the bundled GNU utils. Git itself is fine and some built-in functionalities work normally, e.g. P.S. Downgrade to 2.40.1 fixes the problem, while even 2.41.0-rc0 is broken. |
Surprisingly, I cannot confirm any of this ❌ |
It's slow on Windows 10 but OK on Windows 11. |
We experience the same issue in our organization. The common thing for all of the employees is that the computers experiencing the slowdown are domain joined. Maybe this is the reason it's not 100% reproducible. |
Domain controller delay problems show up moderately often. Not easy to resolve. Worth searching the archives (closed issues ;-) |
OK, running
in elevated shell in |
OK, that did not really work, since the created passwd file had home directories pointing to |
|
Having similar performance issues on Windows 11 under PowerShell (not using git bash). Some commands like Reverting to 2.40.1 restored all performance back to acceptable levels. EDIT: I was able to test 2.41 on a non-domain joined machine, and I did not experience the same slowdowns. As others said, it appears to be domain related. |
I had quite similar problems, only when connected with the domain. It was totally unrelated to the repository, running Reverting back to 2.40.0 resolved all issues. I turned on all possible traces I case of the above Unfortunately I was not able to identify the problematic network request. |
I'm seeing a git pull taking over 4 minutes when it was taking a couple of seconds. Half the time GIT will also crash... (I can't upload an image due to work security policy) |
This problem is happening in Windows 10 using powershell as well. I can further confirm that, as mentioned in this discussion previously, the gnu utils seem to be the culprit. Running the command "c:\Program Files\Git\usr\bin\arch.exe" to around 30 seconds to return. Running under admin prompt makes no difference. UPDATE: I noticed today (25 July) when I am connected to my company network the problem happens but when not connected everything works normally. The cause is related to this somehow. |
I cannot reproduce here. For those who can, do you see the same issue with regular Cygwin (on which Git's Bash is based)? |
Using cygwin 3.4.6.1 and simply running any $ Measure-Command { .\ldd.exe --help }
Days : 0
Hours : 0
Minutes : 0
Seconds : 22
Milliseconds : 552
Ticks : 225529747
TotalDays : 0.000261029799768519
TotalHours : 0.00626471519444444
TotalMinutes : 0.375882911666667
TotalSeconds : 22.5529747
TotalMilliseconds : 22552.9747
$ .\ldd.exe --version
ldd (cygwin) 3.4.6
Print shared library dependencies
Copyright (C) 2009 - 2023 Chris Faylor
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
@ianichitei thank you. There is Cygwin v3.4.7 available now which might fix the issue. If not, could I ask you to report the bug to the Cygwin project? They probably can find a fix relatively quickly given your assistance, and we can then backport the fix into Git for Windows. |
I tried with 3.4.7 and the issue is not fixed. I'll try to report this directly to the Cygwin devs. |
Here is the Cygwin bug report. |
Based on the responses from the Cygwin mailing list I tried the second workaround from here and it solved the problem for me: Cygwin Terminal now starts instantly. I don't know how one could do something similar for the Cygwin bundled with Git for Windows. Also, while the FAQ mentions that "since Cygwin 1.7.34, new installations now use the SAM/AD databases directly", is it possible that the previous Git for Windows version did not had this turned on? It is a bit weird that it started to happen to different people from different organizations after updating to 2.41.0. |
You mean this? Run these commands in a Cygwin terminal with write access to
Also, set
If so, we already have the latter (even more than that: we comment out the
Indeed. The only thing we did that is notable was to upgrade from MSYS2 runtime v3.3.* to v3.4.*. But there were so many changes between those major versions that I would suspect some regression to have crept in. |
Yes, exactly those, but if that is already done in case of Git it probably means that there's another cause for the problem, and the slowdown I experienced with Cygwin has nothing to do with the one experienced with Git for Windows.
I don't really know how to further reply to the Cygwin issue with regards to this, but maybe someone on your side could add some context to that bug report? |
As I mentioned above, filling the |
Indeed. This basically provides the information about the current user such as the domain, the user name, and the SID. I bet we could obtain that information about the current user much quicker than going through Active Directory calls. However, debugging such things in the MSYS2 runtime is always quite a pain, in particular when you lack a setup to reproduce the issue :-( |
I have the same issues at my corporate workstation. As long as I'm connected to our VPN (which is required for most workflows), Git is painfully slow. How can I help to debug that? Edit: looks like I'm on msys, not cygwin:
Disabling the VPN still helps. |
You're actually on MSYS2, and both MSys and MSYS2 are forks of Cygwin, so for the purposes of this ticket it is irrelevant on which system you are. Disabling the VPN most likely cuts off the connection to the domain controller and the slow calls are simply skipped, which is consistent with what we knew already. What we still don't know is which parts of Cygwin's code is executed in the slow path, and most crucially: why it is executed when we do not really need all that information that the domain controller is asked to report. What would be helpful, therefore, would be a thorough debugging session that most likely requires instrumenting (and building) the MSYS2 runtime and repeatedly running simple commands both with the VPN enabled and disabled to identify above-mentioned code paths. |
I spent some time looking through diffs between MSYS2 3.3 and MSYS2 3.4, and I suspect the issue is related to git-for-windows/msys2-runtime@a5bcfe6 which removes a short-circuit for the current user and instead reaches out to AD for user information. This might also explain why having the "db" portion of the groups line in I don't really have the experience necessary to figure out how to build MSYS2 and get Git to use it to test it out quickly. I may use it as a learning experience, but just wanted to point this out in case anyone more experienced with building MSYS2 and git can give it a quick test, or provide me with some test binaries to try. |
Great work, @rglidden, that indeed looks like a plausible culprit!
I'm happy to report that it's not all that difficult to get started, in particular because we have tons of automation by now. All you've got to do is to fork & clone https://github.com/git-for-windows/msys2-runtime/, If this is indeed the culprit, I'll help you introduce a new setting for the |
Thanks for the detailed instructions @dscho. I was trying to figure out how to build things locally. I didn't realize I could leverage your build infrastructure by submitting a PR. That will make things a LOT easier! I'll see if I can find some time to try it in the next couple days and will let you know what I find. |
@rglidden thank you so much! I am in the process of integrating this into Git for Windows (will probably have to take a break and finish it tomorrow). |
@rglidden Thank you very much! :) |
Some Git commands (those producing paged output, for example) experienced a [significant slow-down](git-for-windows/git#4459) under certain circumstances, when running on a machine joined to a domain controller, which [has been fixed](git-for-windows/MSYS2-packages#124). Signed-off-by: gitforwindowshelper[bot] <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
Commit a5bcfe6 removed an optimization that fetches the default group from the current user token, as it is sometimes not accurate such as when groups like the builtin Administrators group is the primary group. However, removing this optimization causes extremely poor performance when connected to some Active Directory environments. Restored this optimization as the default behaviour, and added a `group: db-accurate` option to `nsswitch.conf` that can be used to disable the optimization in cases where accurate group information is required. This fixes git-for-windows/git#4459 Signed-off-by: Richard Glidden <[email protected]>
64-bit version of Git 2.41.0.windows.1
I already downgraded to 2.40.1, apologies.
Windows 11
defaults?
to the issue you're seeing?
No
Details
Git Bash on Windows Terminal
Minimal, Complete, and Verifiable example
this will help us understand the issue.
None, just upgraded to 2.41.0.
Same performance as before.
Everything is slower, cd to directory, git pull, git log, literally everything is significantly slower in Git Bash.
Every upgrade I did before throughout the years has been fine, except this one.
Downgrading to 2.40.1 fixed the issue.
The text was updated successfully, but these errors were encountered: