-
Notifications
You must be signed in to change notification settings - Fork 480
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
Access violation exception in msys-2.0.dll in ssh.exe #1667
Comments
After poking around the disassembly with snowman (https://derevenets.com/), it looks like the code at that address might be in this file: https://github.com/Alexpux/Cygwin/blob/msys2-master/winsup/cygwin/shm.cc as the code around the exception address seems to match up with the functions in that file, theres a string "shmdt (shmaddr = %p)" that matches the printf in shmdt() for example. The function that causes the exception also seems pretty short, the decompiled version snowman managed to make is here:
looks like some sort of spinlock, is it a mutex guard maybe? The exception happens at the |
Does it fail in the same place when running ssh-keygen, as per this issue: #1731 Might be a smaller reproduction case. |
I forgot this was here. closing this since I'm unable to follow up. |
I would like to reopen this Issue since it appeared in a setup. The git-for-windows ssh-client crashes with It happens as soon as the shell request is accepted.
All I do to trigger or fix it is to switch between git-for-windows Version Git-2.28.0-64-bit and Git-2.44.0-64-bit. The systems ssh-client installed by Microsofts OpenSSH-Port works fine. |
I have a rather strange error running ssh.exe with any valid arguments causes it to throw an access violation exception during password input, debugging with visual studio gives the following info:
Exception thrown at 0x000000018012B647 (msys-2.0.dll) in ssh.exe: 0xC0000005: Access violation writing location 0x0000000000000000.
The surrounding disassembly looks like:
Strangely enough if I start ssh.exe with "Step into new instance" from visual studio, it works, and does not throw the exception.
Starting it from the msys2 shell in either mintty, conemu or cmd causes it to just crash during password input, breaking the terminal (it gets stuck in password mode, a quick
reset
fixes that but it will still crash again every time).Strace of
ssh sdf.org
:I'm was thinking this might have had something to do with the PGHook.dll thats loaded by Avecto Privilege Guard, but the version of ssh & msys2 shipped with git-bash 2.17.1 does work, the latest one has the same problem as regular msys2. It still segfaults in strace for some reason.
That has
ssh -V: OpenSSH_7.7p1, OpenSSL 1.0.2o 27 Mar 2018
While the one that fails is:
OpenSSH_8.0p1, OpenSSL 1.1.1c 28 May 2019
strace ssh sdf.org
on git-bash 2.17:A difference I see is that on git-bash 2.17 it does not say
create_child: ssh sdf.org
, so did some behaviour change for openssh 8 which added forking or something similar?Is there a way to fix this or will I have to stick with a separate install of git-bash 2.17 for all things ssh?
The text was updated successfully, but these errors were encountered: