为什么是的MSBuild和LINK.EXE"吊"在构建过程中? [英] Why is msbuild and link.exe "hanging" during a build?

查看:244
本文介绍了为什么是的MSBuild和LINK.EXE"吊"在构建过程中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有几个C ++的解决方案,我们使用调用msbuild.exe为每一个解决方案的配置批处理文件运行一些构建脚本。

We have a few C++ solutions and we run some build scripts using batch files that call msbuild.exe for each of the configurations in the solutions.

这已经3开发的机器和一个构建机器工作正常,但随后的一个项目开始连接时挂起。这只是发生这是一个四核,2.8GHz的我认为最新的机器上。它运行Windows Server 2003上,其他的是在XP或Vista。

This had been working fine on 3 developer machines and one build machine, but then one of the projects started to hang when linking. This only happens on the newest machine which is a quad core, 2.8ghz I think. It runs on Windows Server 2003 and the others are on XP or Vista.

这情况持续,即使我更改顺序来建立在bat文件。

This happens consistently even if I change the order of builds in the bat file.

如果我的机器上运行从IDE构建它不挂。

If I run the build from the IDE on that machine it does not hang.

有关什么可能会导致此任何想法?

Any ideas about what could possibly be causing this?

我使用Visual Studio 2008。

I am using Visual Studio 2008.


我现在看到的,当它被挂在正在运行以下内容:

I see now that when it is hung the following are running:


  • LINK.EXE(2实例)的一个大的内存使用和一个内存使用少量。

  • vcbuild.exe

  • msbuild.exe

  • vcbuildhelper.exe

  • mspdbsrv.exe


EXE文件的存在也是如此PDB文件。

The exe file exists and so does the pdb file.

EXE文件是由一些进程锁定,我不能删除或移动它。我虽然可以删除PDB文件。

The exe file is locked by some process, and I can't delete it or move it. I can delete the pdb file though.

我也有这个问题,如果我只是用VCBuild.exe。

I also have the problem if I just use VCBuild.exe.

我决定尝试调试2 LINK.EXE过程和mspdbsrv.exe流程。

I decided to try debugging the 2 link.exe processes and the mspdbsrv.exe processes.

当我连接调试器/ IDE MSDEV他们我得到一个消息框,说,应用程序死锁和/或的所有线程都已经退出。

When I attached the debugger/MSdev IDE to them I got a message box saying that the application was deadlocked and/or that "all threads have exited".

我想我将不得不检查一个服务包为MSDEV安装机器。

I guess I will have to check for a service pack for that msdev install on that machine.


在debug.htm输出文件中我得到的所有耍酷的输出产生LINK.EXE命令后。

In the debug.htm output file I get all sorts of stuff output after the link.exe command is generated.

然而,对于释放buildlog.htm的linke.exe行是最后一行。

However, for the release buildlog.htm the linke.exe line is the last line.

这显然是在链接挂起。这绝对是一个错误微软

This is clearly a hang in the linker. Definitely a Microsoft bug.

我现在想弄清楚的.rsp(连接响应)的文件是什么。

I am now trying to figure out what the .rsp (linker response) file is.

当我发出:

LINK.EXE @c:\\\\发布\\ RSP00000535202392.rsp / NOLOGO / ERRORREPORT:队列

link.exe @c:\\Release\RSP00000535202392.rsp /NOLOGO /ERRORREPORT:QUEUE

这是在释放生成日志的最后一行。调试人有很多后更多的信息。

That is the last line in the release build log. The debug one has lots more information after that.

重新安装一个不同版本的Visual Studio并没有解决这个问题。

Reinstalling a different version of Visual Studio did not solve the problem.

我将打开微软的问题/票。如果我能我将发布一个答案。

I will open an issue/ticket with Microsoft. I will post an answer if I can.

推荐答案

整个程序优化(/ GL和/ LTCG)和/ MP不混合 - 连接器挂起。我提出这个在连接

Whole-program optimization (/GL and /LTCG) and /MP don't mix -- the linker hangs. I raised this on Connect.

其结果是,它在VS2008已确认的bug;联系PSS如果你想有一个修补程序;和修复程序包含在VS2010。

The upshot is that it's a confirmed bug in VS2008; contact PSS if you want a hotfix; and the fix is included in VS2010.

如果你不能等那么久,关闭/ MP(慢编译)或/ LTCG(较慢code)。

If you can't wait that long, turn off /MP (slower compiles) or /LTCG (slower code).

这篇关于为什么是的MSBuild和LINK.EXE"吊"在构建过程中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆