dotnet/runtime · critical
END: coreclr_initialize failed - Error: 0x%08x
Error message
END: coreclr_initialize failed - Error: 0x%08x
What it means
The closing marker of the coreclr_initialize failure block at src/coreclr/hosts/corerun/corerun.cpp:617. It prints after logger.dump_details() to delimit the end of the diagnostic dump. The same HRESULT as 240 is printed so log parsers can correlate the begin/end pair. The function then returns -1.
Solutions
- Treat 240 and 241 as one event: capture the entire BEGIN..END block and decode the HRESULT.
- Apply the same fixes as for error 240 (runtime path, bitness, properties).
- If no useful detail appears between BEGIN and END, enable verbose CoreCLR diagnostics via the DOTNET_DiagnosticPorts / DOTNETCORE_DiagnosticPorts environment variables or a checked runtime build.
Defensive patterns
Strategy: validation
Prevention
- Treat the BEGIN/END pair as a single log block; capture everything in between for triage.
- Apply the same runtime-path validation as for error 240 before launching corerun.
When it happens
Trigger: Always emitted together with error 240 whenever coreclr_init_func fails. The trigger is identical to error 240; this line exists only to frame the diagnostic output.
Common situations: Seen in every corerun launch where the runtime refuses to start. CI logs show this line directly after the detailed stack/property dump that the BEGIN line introduced.
Related errors
- BEGIN: coreclr_initialize failed - Error: 0x%08x
- BEGIN: coreclr_execute_assembly failed - Error: 0x%08x
- coreclr_shutdown_2 failed - Error: 0x%08x
- END: coreclr_execute_assembly failed - Error: 0x%08x
- Export ' ' not found.
AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10).
Data as JSON: /api/errors/9b741663b9d5ad9e.
Report an issue: GitHub.
Appendix: source
Thrown at src/coreclr/hosts/corerun/corerun.cpp:617
#ifdef TARGET_WASM
// install the pinvoke override callback to resolve p/invokes to statically linked libraries
add_pinvoke_override();
#endif // TARGET_WASM
int result;
result = coreclr_init_func(
exe_path_utf8.c_str(),
"corerun",
propertyCount,
propertyKeys.data(),
propertyValues.data(),
&CurrentClrInstance,
&CurrentAppDomainId);
if (FAILED(result))
{
pal::fprintf(stderr, W("BEGIN: coreclr_initialize failed - Error: 0x%08x\n"), result);
logger.dump_details();
pal::fprintf(stderr, W("END: coreclr_initialize failed - Error: 0x%08x\n"), result);
return -1;
}
if (coreclr_set_error_writer_func != nullptr)
{
coreclr_set_error_writer_func(nullptr);
}
int exit_code;
{
actions.before_execute_assembly(config.entry_assembly_fullpath);
result = coreclr_execute_func(
CurrentClrInstance,
CurrentAppDomainId,
config.entry_assembly_argc,
argv_utf8.get(),
entry_assembly_utf8.c_str(),View on GitHub (pinned to 60108ba66e)