We experience intermittent crashes in the COM runtime in a large server application.
Here is what we have:
The server process running as a Windows service contains numerous freely distributed COM components written in C ++ / ATL. Several client processes written in C ++ / MFC and .NET use these components through cross proxy calls to COM calls (including .NET interaction) on the same computer. The OS is a Windows Server 2008 terminal server (32-bit). The entire software package was developed at home, we have the source code for all components. Trace toolkit records errors and exceptions that are thrown during operation.
What's happening:
After some random period of smooth sailing (from 5 days to 3 weeks), the COM server runtime falls apart with any combination of these symptoms:
- RPC_E_INVALID_HEADER (0x80010111) - "OLE received a packet with an invalid header" returned to the caller in cross calls to server component methods
- Call CoCreateInstance (CCI) for CLSCTX_LOCAL_SERVER
CoInitializeEx (COINIT_MULTITHREADED) call failed with CO_E_INIT_TLS (0x80004006)
All incoming COM operations continue to work, CCI works for CLSCTX_INPROC_SERVER.
- The overall system remains responsive, SQL Server is running, no sign of problems outside of our maintenance process.
- System resources are OK, memory leaks, abnormal CPU usage, lack of fraud
The only way is to restart the broken service.
() :
- : Xeon 5 , 3 .
- .NET Interop, .NET COM- .
- .
, , . , .
- RPC_E_INVALID_HEADER HRESULT? .
COM Runtime, COM, , , ? TLS (CO_E_INIT_TLS)?