microsoft / microsoft/CLRInstrumentationEngine

CLR Will No Longer Release Profiler COM Object

Open
#142 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

task
Dominant language
C++
Stars
102
Forks
52
Avg merge
13h 11m
Merged PRs (30d)
6

Description

A change to the .NET Core CLR has been made such that the deconstructor of attached profilers will no longer be called: https://github.com/dotnet/coreclr/issues/15136#issuecomment-534325458

The advice given is that all shutdown logic must be contained within ICorProfilerCallback::Shutdown since the CLR will never release the COM object. The current Instrumentation Engine does some minimal work in CProfilerManager::~CProfilerManager, which needs to be done elsewhere (e.g. ICorProfilerCallback::Shutdown).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked CLR issue first, then inspect CProfilerManager::~CProfilerManager and the ICorProfilerCallback::Shutdown implementation. Identify the minimal shutdown work currently performed by the destructor and ensure it is handled during Shutdown, with cleanup still occurring when the CLR does not release the profiler COM object.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.