Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak profiler error messages to remove mention of COM #67664

Closed
danmoseley opened this issue Apr 6, 2022 · 3 comments · Fixed by #67774
Closed

Tweak profiler error messages to remove mention of COM #67664

danmoseley opened this issue Apr 6, 2022 · 3 comments · Fixed by #67774
Labels
area-Diagnostics-coreclr help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@danmoseley
Copy link
Member

danmoseley commented Apr 6, 2022

On non-Windows, profilers are still activated using a GUID identifier, but it's not a real CLSID and there's no COM involved - they are Windows anachronisms in that context. It would be good to have no mention of those concepts in the error messages.

Below messages contain such mentions.

Per discussion in #66000 (comment)

 728:         IDS_E_PROF_NO_CLSID                     "Loading profiler failed.  COR_ENABLE_PROFILING was set properly, but COR_PROFILER was not.  COR_PROFILER must be set to the CLSID of the profiler to load.\n"
  729:         IDS_E_PROF_INTERNAL_INIT                "Loading profiler failed due to an internal profiling services initialization failure.  Profiler CLSID: '%s'.  HRESULT: 0x%x.\n"
  730:         IDS_E_PROF_BAD_CLSID                    "Loading profiler failed.  COR_PROFILER is set to an invalid CLSID: '%s'.  HRESULT: 0x%x.\n"
  731:         IDS_E_PROF_NO_CALLBACK_IFACE            "Loading profiler failed.  COR_PROFILER is set to a CLSID of a COM object that does not implement the interface GUID (IID) requested by the CLR.  This often indicates that the profiler does not support this version of the CLR.  Profiler CLSID: '%s'.  Requested IID: '%s'.\n"
  732:         IDS_E_PROF_CCI_FAILED                   "Loading profiler failed during CoCreateInstance.  Profiler CLSID: '%s'.  HRESULT: 0x%x.\n"
  733:         IDS_E_PROF_INIT_CALLBACK_FAILED         "Loading profiler failed.  The profiler COM object was instantiated, but the profiler failed during its initialization callback.  Profiler CLSID: '%s'.  HRESULT: 0x%x.\n"
  735:         IDS_PROF_LOAD_COMPLETE                  "The profiler was loaded successfully.  Profiler CLSID: '%s'.\n"
  736:         IDS_E_PROF_NOT_ATTACHABLE               "Loading profiler failed.  The profiler COM object was instantiated, but the profiler does not support attaching to a live process.  The profiler must be loaded at application startup by using a launcher program included with the profiler (if any) or by setting the COR_ENABLE_PROFILING and COR_PROFILER environment variables before launching the application to be profiled.  Profiler CLSID: '%s'\n"
  737:         IDS_E_PROF_UNHANDLED_EXCEPTION_ON_LOAD  "Loading profiler failed.  There was an unhandled exception while trying to instantiate the profiler COM object.  Please ensure the CLSID is associated with a valid profiler designed to work with this version of the runtime.  Profiler CLSID: '%s'.\n"
  738:         IDS_PROF_ATTACH_REQUEST_RECEIVED        "The CLR received a request to attach a profiler. Profiler CLSID: '%s'.\n"
  742:         IDS_PROF_CANCEL_ACTIVATION              "The profiler has requested that the CLR instance not load the profiler into this process.  Profiler CLSID: '%s'.\n"
  743:         IDS_PROF_V2PROFILER_DISABLED            "Loading profiler failed.   The profiler that was configured to load was designed for an older version of the CLR.  You can use the COMPlus_ProfAPI_ProfilerCompatibilitySetting environment variable to allow older profilers to be loaded by the current version of the CLR.  Please consult the documentation for information on how to use this environment variable, and the risks associated with it.  Profiler CLSID: '%s'.\n"
  744:         IDS_PROF_V2PROFILER_ENABLED             "A profiler designed for an older version of the CLR was loaded because of the environment variable setting below.  Older profilers will continue to work in many cases, but if you encounter problems, please consider upgrading the profiler or changing the setting of the environment variable.  Please consult the documentation for information on how to use this environment variable, and the risks associated with it.  Environment variable setting: %s=%s.  Profiler CLSID: '%s'.\n"
  745:         IDS_PROF_PROFILER_DISABLED              "Profilers will not be loaded by the current version of the CLR because of the environment variable setting below.  Please consult the documentation for information on how to use this environment variable, and the risks associated with it.  Environment variable setting: %s=%s. Profiler CLSID: '%s'.\n"
  748:         IDS_E_PROF_TIMEOUT_WAITING_FOR_CONCURRENT_GC    "Profiler timed out on waiting for concurrent GC to finish after '%d' milliseconds. Please configure your profiler to increase its attaching time out value or consult the documentation for the COMPlus_ProfAPI_AttachProfilerMinTimeoutInMs environment variable and try again. Profiler CLSID: '%s'.\n"
@dotnet-issue-labeler dotnet-issue-labeler bot added area-Diagnostics-coreclr untriaged New issue has not been triaged by the area owner labels Apr 6, 2022
@ghost
Copy link

ghost commented Apr 6, 2022

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

<table>
  <tr>
    <th align="left">Author:</th>
    <td>danmoseley</td>
  </tr>
  <tr>
    <th align="left">Assignees:</th>
    <td>-</td>
  </tr>
  <tr>
    <th align="left">Labels:</th>
    <td>

`area-Diagnostics-coreclr`, `untriaged`

</td>
  </tr>
  <tr>
    <th align="left">Milestone:</th>
    <td>-</td>
  </tr>
</table>
</details>

@tommcdon tommcdon added this to the 7.0.0 milestone Apr 6, 2022
@tommcdon tommcdon added help wanted [up-for-grabs] Good issue for external contributors and removed untriaged New issue has not been triaged by the area owner labels Apr 6, 2022
@danmoseley
Copy link
Member Author

What terms would you prefer used @tommcdon ? You mentioned adding more info in the messages, but in the short term I could throw up a PR to change the text.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Apr 8, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Apr 10, 2022
@danmoseley
Copy link
Member Author

Not sure whether it's worth opening a separate issue to add the path to the profiler into these messages. (On Unix, you're passing that in.)

@ghost ghost locked as resolved and limited conversation to collaborators May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Diagnostics-coreclr help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants