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

Better diagnostics for coreclr initialization failures #70211

Closed
janvorli opened this issue Jun 3, 2022 · 5 comments
Closed

Better diagnostics for coreclr initialization failures #70211

janvorli opened this issue Jun 3, 2022 · 5 comments
Assignees
Milestone

Comments

@janvorli
Copy link
Member

janvorli commented Jun 3, 2022

When coreclr_initialize fails, the returned exit code is most often the generic 0x80004005 (E_FAIL). To diagnose such failures, runninga repro under a debugger is the only viable option now.
We should add some extra logging so that a host can report more details on such a failure that could pinpoint the error source quickly, without a need to execute a repro under a debugger.

@janvorli janvorli added this to the Future milestone Jun 3, 2022
@janvorli janvorli self-assigned this Jun 3, 2022
@richlander
Copy link
Member

That sounds good! I have sometimes use COREHOST_TRACE to get information on what went wrong. Would you expect this extra information to be included in that tracing? If not, where?

@AaronRobinsonMSFT
Copy link
Member

/cc @elinor-fung

@janvorli
Copy link
Member Author

@richlander I would make this extra info part of the message that currently reports the coreclr initialization failure. We currently print this into console:

Failed to initialize CoreCLR, HRESULT: 0x80004005

I was thinking that it would be sufficient to add some extra number identifying the source of the failure. Alternatively, we could possibly generate a special range of HRESULT codes that we would use instead of the E_FAIL.

@richlander
Copy link
Member

SGTM ... look forward to seeing a demo. I love error messages.

@janvorli
Copy link
Member Author

janvorli commented Jan 2, 2023

Fixed by #78790

@janvorli janvorli closed this as completed Jan 2, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants