Re: Not enough storage is available to process this command. (Exceptio
- From: jwgoerlich@xxxxxxxxx
- Date: Wed, 20 Jun 2007 04:36:12 -0700
My guess is that it is a memory allocation problem with Windows
Management Instrumentation (WMI). The code makes a managed call to WMI
(ManagementClass) for the network adapter information
(Win32_NetworkAdapter), which then gets invoked as an unmanaged COM+
call into Cimwin32.dll (InteropServices). The 0x80070008 COM
exceptions occur when the thread's local storage is exhausted.
If correct, this would explain why it occurs sporadically. There may
be a memory leak. I am not sure that this is a security issue, as
Martin Xie suggested. If it was, one would think the exception would
occur each time the code executed.
Have you tried applying .Net 2 SP1?
J Wolfgang Goerlich
MSDN Documentation: Win32_NetworkAdapter
Microsoft Article 812280, EventLogEntry Class May Cause Leaks in
Thread Local Storage and Event ID 4199 Event Log Entries
Microsoft Article 824262, Memory Leak When You Use the
Win32_NetworkAdapter Notification Query
On Jun 20, 6:12 am, Dan Händevik
I have a piece of code that gives an exception in some cases. The code works
most of the time but on some installations the error occurs sometimes (once a
day or so)
The error below is thrown.
[COMException (0x80070008): Not enough storage is available to process this
command. (Exception from HRESULT: 0x80070008)]
errorCode, IntPtr errorInfo) +0
System.Management.ManagementScope.InitializeGuts(Object o) +784
System.Management.ManagementObject.Initialize(Boolean getObject) +619
And the code that generates the exception is
ManagementClass managementClass = new ManagementClass("Win32_NetworkAdapter");
ManagementObjectCollection managementObjects = managementClass.GetInstances();
The code is running on a Windows Server 2003 R2, sp1
The error was not observed until the following patches where installed
kb935839, kb929123, kb935840.
The code is run in an asp.net environment.
Has anyone any idea about the source of the error?
What does InitializeGuts do that can result in a com exception like that
- Prev by Date: Re: Error: 0x800700005 access denied when creating a new task
- Next by Date: Re: CVE-2007-2229: Administrator passwords are stored somewhere?!
- Previous by thread: Re: Error: 0x800700005 access denied when creating a new task
- Next by thread: How unsafe is Outlook Express?