2016-01-23 73 views
17

的Git已经给我这个错误Github上/ Cygwin的错误:cygheap碱基错配检测

0 [main] sh (47116) C:\Users\Marcus\AppData\Local\GitHub\PortableGit_c7e0cbde92ba565cb218a521411d0e854079a28c\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x11C7400/0x1297400. 
This problem is probably due to using incompatible versions of the cygwin DLL. 
Search for cygwin1.dll using the Windows Start->Find/Search facility 
and delete all but the most recent version. The most recent version *should* 
reside in x:\cygwin\bin, where 'x' is the drive on which you have 
installed the cygwin distribution. Rebooting is also suggested if you 
are unable to find another cygwin DLL. 
    0 [main] sh 42052 fork: child -1 - forked process 47116 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 
/mingw32/libexec/git-core/git-sh-setup: fork: retry: No child processes 
This problem is probably due to using incompatible versions of the cygwin DLL. 
Search for cygwin1.dll using the Windows Start->Find/Search facility 
and delete all but the most recent version. The most recent version *should* 
reside in x:\cygwin\bin, where 'x' is the drive on which you have 
installed the cygwin distribution. Rebooting is also suggested if you 
are unable to find another cygwin DLL. 
    0 [main] sh 42052 fork: child -1 - forked process 47116 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 
/mingw32/libexec/git-core/git-sh-setup: fork: retry: No child processes 

事情我已经尝试过包括:

  • C:\cygwinC:\cygwin64删除Cygwin和重新安装
  • 使用卸载程序和安装程序重新安装github。
  • 卸载github并手动删除其本地和漫游的appdata文件夹,然后重新安装。
  • 重新启动电脑
  • 重新装订C:\cygwin,它成功了,但没有解决任何问题。
  • 重新装订%appdata%\Local\Github\PortableGit_c7e...\.它再次返回原始错误。

仅供参考,我正在运行Windows 10 64位。唯一的另一个问题,我可以找到该针指出我从来没有达到的解决方案的错误:link here

我不知道除了重新安装Windows完全没有别的地方,任何帮助将不胜感激。

回答

12

git-for-windowsbased on msys2)的外壳并不意味着在Cygwin或msys2的不同安装中运行。

GitHub Desktop采用了old git-for-windows (2.5.3, Sept. 2015)

对于一个Git bash命令,你不需要Cygwin的或GitHub的桌面。

解压缩latest git-for-windows azrchive you can find

然后:

cd c:\prgs\git 
mklink /J latest PortableGit-2.7.0-64-bit 
set GIT_ROOT=c:\prgs\git\latest 
set PATH=%PATH%;%GIT_ROOT%;%GIT_ROOT%\bin;%GIT_ROOT%\cmd;%GIT_ROOT%\us`\bin 

然后,您将能够输入git-bash推出了基于linux的bash命令。

或者,从一个普通CMD shell会话,你将有机会获得200 +的UNIX命令(curlcatxargsls,...)。
不需要Cygwin。

+0

谢谢!这是一个很好的帮助,当然可以解决这个问题。我现在可以在命令行,powershell和git bash中使用git!但是如果你不介意的话,我有一些后续行动?我应该如何让github识别新的可用git命令?因为即使我试图用新的工作替换它的便携式git,它会覆盖它并且错误随之而来。 –

+0

@MarcusGosselin我试图在GitHub桌面之前更改git,并且我遇到了与以前相同的问题:http://stackoverflow.com/a/33703716/6309。我更喜欢打开一个独立的shell(我控制的),在那里我可以使用我想要的Git。 – VonC

+0

我也面临同样的问题,但是当我从GitHub桌面访问Git shell时。当我从独立的Powershell打开目录时,Git可以正常工作。有任何想法吗? –

2

OK我类似的错误ffmpeg $ ./configure ...

License: LGPL version 2.1 or later 
Creating config.mak, config.h, and doc/config.texi... 
     1 [main] cmp (5984) C:\Program Files\Git\usr\bin\cmp.exe: *** fatal error - cygheap base mismatch detected - 0x180326400/0x180330400. 
This problem is probably due to using incompatible versions of the cygwin DLL. 
Search for cygwin1.dll using the Windows Start->Find/Search facility 
and delete all but the most recent version. The most recent version *should* 
reside in x:\cygwin\bin, where 'x' is the drive on which you have 
installed the cygwin distribution. Rebooting is also suggested if you 
are unable to find another cygwin DLL. 

意思是“你正在试图建立使用MSYS2却意外故障转移到一些Git的分布式cmp.exe文件,这显然unuseable”(见VonC的答案)。

修复在我的情况:它们安装到MSYS2正确:

$ pacman -S make 

$ pacman -S diffutils # for cmp package 
+1

因此你的编辑提到了一个不兼容的msys2安装。得到它了。 +1 – VonC

0

一些MSYS2你安装的软件包与X发生冲突:\ Cygwin的\ bin中,所以只要删除MSYS2 PATH系统环境中的

3

重新启动为我固定它。我可能因为升级Git for Windows而出现此错误。在做任何其他疯狂的事情之前尝试重新启动!

3

我有一个非常类似的问题,但既不重新启动,也没有重新安装git或cygwin的帮助。我总是有:

 1 [main] sh (12220) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x37C7408/0x38E7408. 
This problem is probably due to using incompatible versions of the cygwin DLL. 
Search for cygwin1.dll using the Windows Start->Find/Search facility 
and delete all but the most recent version. The most recent version *should* 
reside in x:\cygwin\bin, where 'x' is the drive on which you have 
installed the cygwin distribution. Rebooting is also suggested if you 
are unable to find another cygwin DLL. 
     0 [main] sh 6928 fork: child -1 - forked process 12220 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 
C:\Program Files\Git\mingw64/libexec/git-core\git-stash: fork: retry: Resource temporarily unavailable 

我花了一段时间才能弄清楚,它开始后,我读到有关一个Windows漏洞“系统范围的强制ASLR”,以及如何通过Windows UI提供的设置未设置正确的注册表项。让我的系统更安全通过添加此注册表项,cygwin的分叉后爆发:

Windows Registry Editor Version 5.00 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel] 
"MitigationOptions"=hex:00,01,01,00,00,00,00,00,00,00,00,00,00,00,00,00 

来源:Clarifying the behavior of mandatory ASLR

这导致混帐藏匿不工作了,也不Cygwin的工作(这是我后来安装 删除该注册表项再次固定问题

+1

类似案例在这里!我认为Windows 10 Fall Creators更新附带了Windows Defender中新的“Exploit Protection”设置面板,其中一个是“强制ASLR”。它在默认情况下是禁用的,但是我前段时间启用了它,并且它破坏了'git stash'。禁用它并重新启动Windows解决了这个问题。 –

0

在你的系统的Windows Defender安全中心禁用Force randomization for images (mandatory ASLR) 或者exclude ASLR for git executables:。

Get-Item -Path "C:\Program Files\Git\usr\bin\*.exe" | %{ Set-ProcessMitigation -Name $_.Name -Disable ForceRelocateImages } 
+2

这是一个边界[仅链接答案](// meta.stackexchange.com/q/8231)。你应该扩大你的答案,在这里包含尽可能多的信息,并使用链接仅供参考。 –