-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 enters a crash-loop hang on startup #4808
Comments
The MSYS2 runtime code hails from Cygwin. Is this also happening with regular Cygwin? |
Hmm... For me, the Cygwin installer gets stuck trying to run the
So perhaps an issue in Cygwin (caused by some change in the most recent Windows builds)? |
I'm going to follow up on the Cygwin mailing lists now that I have a reproducible example independent of Git for Windows -- thanks for helping point me in the right direction. |
@kevinushey would you mind circling back with a link once there is a mail thread? (I did not see anything related on the cygwin mailing list yet.) |
Done; I just submitted to the mailing list here (https://inbox.sourceware.org/cygwin/CAJXgQP0ZpcQXON_oKbgE=S8Y-M=9+b00cZ6s4Het01TCTp3ajA@mail.gmail.com/T/#u) and provided a back-reference to this thread just in case. |
I like to renew this issue. We as Microsoft discovered internally that this issue will return soon as a result of changes in the OS that will go to pre-release flighting. To refresh everybody's mind: This issue is caused by AMD64 cygwin crashing when running on ARM64 when emulated. This is because cygwin performs an 'optimisation' where it tries to find some assembly code in ntdll.dll. That is highly unsupported and should not be done at all! Realy cygwin should just stop doing this. On AMD64 they sort of get away with it (often doesn't work, but doesn't crash) but looking for x64 assembly code in an ARM64EC ntdll.dll is not only going to fail, but can lead to crashes. Accidental shifts in ntdll.dll earlier this year made the issue appear and a bit later disappear. New optimizations and code changes in ntdll.dll that will appear publicly soon, will cause the crash to come back. Fortunately cygwin already made a fix by not doing this scanning when running on ARM64 emulated. After all, you'll never find the correct x64 assembly sequence anyway when running on ARM64. However, it seems Git has not pulled over this fix yet. If so, it is essential Git will do this ASAP to prevent crashes in the future. Fix here: cygwin/cygwin@4e77fa9 Latest version 2.47.0.2 installer is affected and will start crashing soon on ARM64 if not fixed. We may be able to delay the code changes from going out for a while, but we really need Git to help pull this fix in. |
I didn't see this issue was closed, so I've posted a new bug report here: #5239 |
https://cygwin.com/pipermail/cygwin/2024-February/255397.html reports a crash on ARM64 probably related to checking x86_64 code on the x86_64 emulator on AArch64. At least for testing, pull the code checking the host HW up to be called before trying to evaluate assembler code. This fixes git-for-windows/git#4808 Backported from 4e77fa9b8b (Cygwin: find_fast_cwd: don't run assembler checking code on ARM64, 2024-02-13). Signed-off-by: Corinna Vinschen <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
https://cygwin.com/pipermail/cygwin/2024-February/255397.html reports a crash on ARM64 probably related to checking x86_64 code on the x86_64 emulator on AArch64. At least for testing, pull the code checking the host HW up to be called before trying to evaluate assembler code. This fixes git-for-windows/git#4808 Backported from 4e77fa9 (Cygwin: find_fast_cwd: don't run assembler checking code on ARM64, 2024-02-13). Signed-off-by: Corinna Vinschen <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
https://cygwin.com/pipermail/cygwin/2024-February/255397.html reports a crash on ARM64 probably related to checking x86_64 code on the x86_64 emulator on AArch64. At least for testing, pull the code checking the host HW up to be called before trying to evaluate assembler code. This fixes git-for-windows/git#4808 Backported from 4e77fa9 (Cygwin: find_fast_cwd: don't run assembler checking code on ARM64, 2024-02-13). Signed-off-by: Corinna Vinschen <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Setup
Using the 64-bit build.
This is an aarch64 build of Windows, running in a Parallels VM on an M1 macOS machine.
defaults?
to the issue you're seeing?
Git for Windows was working without issue previously, so I suspect something may have changed in the latest Windows Insider builds that is causing trouble here.
When I attach to the process with gdb, I see the following:
Is there anything else that's useful that I could provide? Note that I can successfully invoke
git.exe
fromcmd.exe
shell, so I suspect the issue is unique to the Git Bash shell.Details
Using the default Git Bash shell.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
This reproduces just when attempting to start Git Bash -- here, when clicking on the icon in my taskbar.
No busy-hang.
Busy-hang.
URL to that repository to help us with testing?
N/A
The text was updated successfully, but these errors were encountered: