Tracing in COM and COMplus

Warning You should not enable tracing functionality on production systems unless a Microsoft support representative indicates that the tracing information is required to diagnose an issue. The performance of the computer may be affected. As soon as the reason for the issue has been found and resolved, you should disable tracing functionality. By default, tracing functionality is disabled. Therefore, there is no performance effect on a regular installation

Event Tracing for Windows[ETW] provides a mechanism to trace and log events that are raised by user-mode applications and kernel-mode drivers. In Microsoft Windows Server 2003 SP2, Windows Vista and newer Operating Systems, you can use ETW to trace events for some COM+ components and for some base COM components. COM tracing can help troubleshooting issues related to registration errors (such as 80004002, 80040154, 80040155 etc.,) OR Access Denied's (80070005), Activation Failures etc.,

How to enable COM+ and COM diagnostic tracing
https://support.microsoft.com/default.aspx?scid=kb;EN-US;926098

In the above KB article, we discuss how to start and stop tracing using logman.exe. Logman.exe is shipped with the Operating System. However, on some Windows 2003 systems, logman may not work and return an error “collection does not exist” . We are investigating this issue.

If you run into this problem, please use tracelog.exe that is shipped with Windows Resource Kit or Windows DDK. More info on tracelog at https://msdn.microsoft.com/en-us/library/ms797927.aspx

If you are tracing ole32, make sure to enable tracing. Please follow the steps to enable ole32 provider tracing from Q926098

Starting tracing using tracelog:

tracelog -start OLE32 -guid c:\ole32.ctl -flags 15 -f c:\OLE32.etl

tracelog -start DCOMSCM -guid c:\dcommscm.ctl -flags 15 -f c:\DCOMSCM.etl

tracelog -start COMSVCS -guid c:\comsvcs.ctl -flags 15 -f c:\comsvcs.etl

tracelog -start COMADMIN -guid c:\comadmin.ctl -flags 15 -f c:\comadmin.etl

Note the .ctl files just contain the GUID for the specific provider. You can create a text file and rename it to .ctl file and past the GUID of the specific provider

The ole32 GUID is bda92ae8-9f11-4d49-ba1d-a4c2abca692e

The DCOMSCM GUID is 9474a749-a98d-4f52-9f45-5b20247e4f01

The COMSVCS GUID is b46fa1ad-b22d-4362-b072-9f5ba07b046d

The COMADMIN GUID is a0c4702b-51f7-4ea9-9c74-e39952c694b8

For example, ole32.ctl file would contain just the following content

b46fa1ad-b22d-4362-b072-9f5ba07b046d

Stopping tracing:

After running the repro, you can stop tracing using:

tracelog –stop OLE32

tracelog –stop DCOMSCM

tracelog –stop COMSVCS

tracelog –stop COMADMIN

Analyzing traces:

Currently formatting COM traces relies on private symbols, so please contact Microsoft Customer Service Support to have the files formatted into text files.

 

 

ole32.ctl