git 如何修复获取/提交时“地址空间已被占用”的错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11107155/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 13:57:58  来源:igfitidea点击:

How to fix "address space is already occupied" error on fetch/commit?

gitcygwin

提问by iCodeLikeImDrunk

Started recently, basically every time I try to fetch or commit it gives me this weird error. It'll continuously try to "refetch/recommit" until I give up and CtrlC.

最近开始,基本上每次我尝试获取或提交它都会给我这个奇怪的错误。它会不断尝试“重新获取/重新提交”,直到我放弃并且CtrlC.

C:\cygwin\home\git\new_trunk>git sf
      1 [main] perl 760 child_info_fork::abort: address space needed by 'cygreadline7.dll' (0x960000) is already occupied

C:\cygwin\home\git\new_trunk>git svn dcommit
      1 [main] perl 2672 child_info_fork::abort: address space needed by 'cygreadline7.dll' (0x980000) is already occupied

Any idea why this is happening?

知道为什么会这样吗?

采纳答案by nshy

Take a look at this Cygwin FAQ sectionand this too. In my case disabling Avast's Behaviour and Filesystem Realtime shields and then restarting Cygwind was the answer.

看看这个 Cygwin FAQ 部分这个。在我的情况下,禁用 Avast 的行为和文件系统实时防护,然后重新启动 Cygwind 是答案。

So, probably, you are running windows programs that hook their dlls into forked processes disrupting adresses and thus causing fork to malfunction.

因此,很可能您正在运行 Windows 程序,这些程序将它们的 dll 挂接到分叉的进程中,从而破坏地址,从而导致分叉出现故障。

回答by Tarc

Rebasing my Cygwin install solved this for me. I followed the doc Rebaseall, running dash as admin from Windows Explorer and then issuing the following:

重新安装我的 Cygwin 为我解决了这个问题。我按照文档Rebaseall,从 Windows 资源管理器中以管理员身份运行 dash,然后发出以下命令:

/usr/bin/rebaseall -v

P.S.: No Cygwin service should be running for this to work.

PS:不应运行任何 Cygwin 服务才能使其正常工作。

回答by JRS

I had this same fork() problem when my virus scanner, Symantec Endpoint Protection, was upgraded to 64-bit, but I was still running the 32-bit version of Cygwin. 'Rebaseall' didn't help. Upgrading to the 64-bit version of Cygwin has fixed the problem for me.

当我的病毒扫描程序 Symantec Endpoint Protection 升级到 64 位时,我遇到了同样的 fork() 问题,但我仍在运行 32 位版本的 Cygwin。'Rebaseall' 没有帮助。升级到 64 位版本的 Cygwin 为我解决了这个问题。

回答by sancho.s ReinstateMonicaCellio

As mentioned by Tarc, no Cygwin services should be running to rebaseall. Otherwise you get

正如Tarc提到的,不应运行 Cygwin 服务到rebaseall. 否则你得到

https://superuser.com/questions/231590/running-rebaseall-on-cygwin

https://superuser.com/questions/231590/running-rebaseall-on-cygwin

Even after seemingly closing all Cygwin/Msys2 instances, you may find problems, as I did. Using Win 10 and Msys2 from PortableApps, I went to Task Manager, I sorted the list by the column "Command line". There I found my ssh-agent from Msys2 still running. I killed it, and then I could rebaseall.

即使在看似关闭了所有 Cygwin/Msys2 实例之后,您也可能会发现问题,就像我所做的那样。使用来自 PortableApps 的 Win 10 和 Msys2,我进入了任务管理器,我按“命令行”列对列表进行了排序。在那里我发现来自 Msys2 的 ssh-agent 仍在运行。我杀了它,然后我可以rebaseall