sh.exe.stackdump when use git stash

2020-01-27 07:13发布

问题:

I'm new with Git and have a problem with "stash" commands.

When i write commands like "git stash", "git stash list", "git stash apply", "git drop", ... , i always get a file named "sh.exe.stackdump" with this:

Exception: STATUS_STACK_OVERFLOW at rip=7FFFE2A29F97
rax=0000000000001250 rbx=00000000FFFFADF0 rcx=0000000000000000
rdx=0000000180010018 rsi=0000000180271780 rdi=000000018021C490
r8 =00000000000C2790 r9 =0000000180271780 r10=00000000FFFF9000
r11=00000000FFE03190 r12=00000000FFFFACD0 r13=000000018021C490
r14=00000000FFFFAC70 r15=00000000FFFFADF8
rbp=0000000000000420 rsp=00000000FFFFAAD8
program=C:\Program Files\Git\usr\bin\sh.exe, pid 7748, thread unknown (0x3144)
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B

or

Exception: STATUS_STACK_OVERFLOW at rip=7FFFE2A29F97
rax=0000000000001250 rbx=00000000FFFFACD0 rcx=0000000000000000
rdx=0000000180010018 rsi=0000000180271780 rdi=000000018021C490
r8 =00000000006A2790 r9 =0000000180271780 r10=00000000FFFF9000
r11=00000000FFE03490 r12=00000000FFFFABB0 r13=000000018021C490
r14=00000000FFFFAB50 r15=00000000FFFFACD8
rbp=0000000000000420 rsp=00000000FFFFA9B8
program=C:\Program Files\Git\usr\bin\sh.exe, pid 11624, thread unknown (0x13B8)
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B

Commands works fine, but it's annoying to delete it everytime i use "stash".

And when i try to name a stash, i get this error:

Cannot save the current index state

What should i do? I'm using Windows 10, git version 2.15.0.windows.1, and the windows command prompt

回答1:

I was experiencing this problem for months, I tried numerous Internet solutions (PATH fix, reinstall), today I finally managed to solve: The problem was a conflict with Comodo Internet Security (Comodo Firewall in my case), when I removed it, the error disappeared immediately.

I found the solution here: https://github.com/desktop/desktop/issues/4556

And here how to preserve the Comodo: https://help.comodo.com/topic-72-1-766-11485-Miscellaneous-Settings.html#shellcode_injection&_ga=2.241892802.1773408369.1525225022-41239862.1525101797



回答2:

I have been struggling with this for some time. I used to get the following exception when I try to write any kind of server side hooks on my 64 bit Git for Windows installed on a 64-bit Windows Server OS. I fixed it by reworking the order of the Path variables as mentioned by VonC. Just note that you need to be careful of the order since I noticed that by using Windows Process Explorer (you can download this) the sh.exe sometimes messes up my company installed Anti-Virus so experiment with the order

remote:       0 [main] sh 2288 D:\git\installation\Git-2.19.1-64-bit\usr\bin\sh.exe: *** fatal error - add_item ("\??\D:\git\installation\Git-2.19.1-64-bit", "/", ...) fa
iled, errno 1
remote: Stack trace:
remote: Frame        Function    Args
remote: 000FFFF9BC0  0018005E0DE (0018025366A, 00180230C39, 00600010000, 000FFFF8B40)
remote: 000FFFF9BC0  001800468F9 (000FFFFAC12, 000FFFF9BC0, 00000000000, 00000000000)
remote: 000FFFF9BC0  00180046932 (000FFFF9BC0, 00000000001, 00600010000, 675C3A445C3F3F5C)
remote: 000FFFF9BC0  001800CD2CB (00000000000, 00040000024, 00000000000, 00000000000)
remote: 1D4881AD919ABD9  0018011BF95 (001800B463C, 00000000000, 00000000000, 00000000000)
remote: 000FFFFCCD0  00180046EF3 (00000000000, 00000000000, 00000000000, 00000000000)
remote: 00000000000  00180045A03 (00000000000, 00000000000, 00000000000, 00000000000)
remote: 000FFFFFFF0  00180045AB4 (00000000000, 00000000000, 00000000000, 00000000000)