需要帮助让 NGen 恢复工作状态

发布于 2024-07-13 11:53:06 字数 1187 浏览 5 评论 0原文

NGen 对我的计算机不满意,我无法找到一种方法来深入了解出了什么问题。

每次启动后,ngen 都会记录以下消息:

.NET 运行时优化服务 (clr_optimization_v2.0.50727_32) - 服务达到瞬时限制 错误。 将关闭。 最后一个错误 从服务管理器返回: 0x8000ffff。

当我尝试在命令行启动优化服务时,我再次记录相同的错误。

我设法启动 ngen 服务并立即暂停队列(通过编写一个两行批处理文件,如下所示:

网络启动 clr_optimization_v2.0.50727_32

ngen 队列暂停

所以现在我尝试通过执行不同状态级别的项目来清除队列,如下所示:

ngenexecutequeueitems 3 /nologo /详细

但结果始终是:

灾难性故障(异常 HRESULT:0x8000FFFF(E_UNEXPECTED))

...我卸载/重新安装了 Visual Studio 2008。 我已经卸载了 SQL Server 2005,并且运行了“系统文件检查器”: sfc /scannow

缺乏想法,希望得到 ngen 专家的帮助。

我如何获取信息,例如 “是什么导致了这些灾难性的失败?” (请注意,/verbose 选项不会增加我发现的信息量。 “等待生成的队列中有哪些文件?” -- 我可以删除其中一些文件,或者将责任归咎于某个特定文件吗...

卸载并重新安装 .net Framework 2.0 并不容易,因为这是 Vista 并且它是操作系统的受保护部分。

更新: 我还尝试了提供的建议

C:\Windows\Microsoft.NET\Framework\v2.0.50727>ngen 执行队列项目 /nologo 灾难性故障(例外情况 HRESULT:0x8000FFFF(E_UNEXPECTED))

NGen is unhappy on my computer, and i can't find a way to get a deep understanding of what is going wrong.

After every startup, ngen logs this message:

.NET Runtime Optimization Service
(clr_optimization_v2.0.50727_32) -
Service reached limit of transient
errors. Will shut down. Last error
returned from Service Manager:
0x8000ffff.

And when i try to start the optimization service at the commandline i get that same error logged again.

I managed to start the ngen service and immediately pause the queue (by writing a two line batch file, like this:

net start
clr_optimization_v2.0.50727_32

ngen queue pause

so now i tried clearing out the queue, by executing items at different status levels, like this:

ngen executequeueditems 3 /nologo
/verbose

but the result is always:

Catastrophic failure (Exception from
HRESULT: 0x8000FFFF (E_UNEXPECTED))

...along the way i've uninstalled/re-installed visual studio 2008.
And i've uninstalled SQL server 2005, and i've run the 'system file checker':
sfc /scannow

Running short of ideas, and would love help from an ngen expert.

How do i get info such as
"What's causing these catastrophic failures?"
(note that the /verbose option doesn't increase the amount of info I find out.
"What files are in the queue to be generated?" -- Can I remove some of those files, or pin the blame on a particular file...

Uninstalling and reinstalling the .net framework 2.0 isn't easy, as this is vista and it's a protected part of the operating system.

Update:
i've also tried the advice offered here (and mentioned in the first reply) -- but i just get the same catastrophic failure message.

C:\Windows\Microsoft.NET\Framework\v2.0.50727>ngen
executequeueditems /nologo
Catastrophic failure (Exception from
HRESULT: 0x8000FFFF (E_UNEXPECTED))

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

我也只是我 2024-07-20 11:53:06

回答这部分问题:

“是什么导致了这些灾难性的后果
失败?”

可以帮助回答这个问题:(

C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.log
C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen_service.log

以及通常的应用程序日志,尽管它不太有用)

回答:

“队列中有哪些文件
生成?”

通常的答案是,这可以通过运行看到:(

ngen.exe display

尽管在我的例子中它只返回

NGEN Roots:    
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

In answer to this part of the question:

"What's causing these catastrophic
failures?"

There's two log files that can help answer this:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.log
C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen_service.log

(As well as the usual application log, though it is less helpful)

In answer to:

"What files are in the queue to be
generated?"

The usual answer is that this can be seen by running:

ngen.exe display

(Though in my case it only returns

NGEN Roots:    
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

)

小伙你站住 2024-07-20 11:53:06

来自

.NET 运行时优化服务
尝试重新尝试编译
当它遇到它时的组件
认为是暂时性错误;
示例包括 RPC 错误,
内存不足错误等。但是,
在尝试编译相同的内容之后
组装20次仍失败
为此,它会输出上面的消息
并关闭。 我看到你已经
已经尝试卸载.NET
您机器上的 Framework 2.0 以及
重新安装它,但你仍然有
这个错误。 我猜想尝试
修复安装没有帮助
任何一个。 你可以尝试跑步吗
随后是“ngen.exe ExecuteQueuedItems”
通过“ngen.exe 更新”来自
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\?
这将尝试编译所有
还没有的程序集
任何/最新的 32 位 NGen 映像
同步而不经过
优化服务。 一旦
更新命令完成,可以一次吗
再次尝试启动服务并
检查你是否仍然得到
系统日志中是否有相同的消息? 如果
这个问题并不特定于
服务,我希望你会看到
命令行中的编译错误
输出也是如此。

From this:

The .NET Runtime Optimization Service
attempts to re-try compilation of
assemblies when it runs into what it
believes are transient errors;
examples include RPC errors,
out-of-memory errors etc. However,
after it has tried to compile the same
assembly 20 times and has still failed
to do so, it outputs the message above
and shuts down. I see that you've
already tried to uninstall .NET
Framework 2.0 from your machine and
re-install it, but that you still have
this error. I am guessing that trying
to repair the install doesn't help
either. Can you possibly try to run
"ngen.exe ExecuteQueuedItems" followed
by "ngen.exe Update" from
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\?
That will attempt to compile all
assemblies that don't yet have
any/up-to-date 32-bit NGen images
synchronously without going through
the optimization service. Once the
update command completes, can you once
again try starting the service and
checking to see whether you still get
the same message in the system log? If
this problem is not specific to the
service, I expect that you will see
compilation errors in the command-line
output as well.

谷夏 2024-07-20 11:53:06

我遇到了同样的问题(安装 Asp MVC 1.0)。
在寻找答案时,我发现了黑客博客,其中一些原因已得到解释。
花了 2 个小时试图解决这个问题,我非常沮丧,因为我使用了

ngen /delete *

它,它起作用了。 但我不确定这是否不会造成小灾难;/

也许这会有所帮助..

I had the same problem (installing Asp MVC 1.0).
Looking for the answer I've spotted Haacked Blog where some reasons have been explained.
Having spent 2 hours of trying to solve this I was so frustrated that I have used

ngen /delete *

It worked. But i'm not sure if it wouldn't make small disaster ;/

Maybe this will help..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文