dotnet/runtime · critical

END: coreclr_initialize failed - Error: 0x%08x

Error message

END: coreclr_initialize failed - Error: 0x%08x

What it means

Closing marker (matching the BEGIN at line 615) that terminates the diagnostic block printed after coreclr_initialize() fails. The same HRESULT is repeated so log parsers can bracket the dump_details() output (exe path, properties, managed assembly, arguments) between BEGIN and END lines.

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 290d5ab72c)

Solutions

  1. Treat BEGIN (201) and END (202) as a pair; capture everything between them as the failure context.
  2. Apply the same HRESULT-driven diagnosis as for error 201.
  3. Automate extraction with a log filter that grabs lines between 'BEGIN: coreclr_initialize failed' and 'END: coreclr_initialize failed'.
Defensive patterns

Strategy: validation

Validate before calling

# log scraper: extract everything between BEGIN and END for 201
grep -A60 'BEGIN: coreclr_initialize failed' run.log | sed '/END: coreclr_initialize failed/q'

Prevention

When it happens

Trigger: Always emitted immediately after logger.dump_details() following a FAILED coreclr_init_func() result at line 613-614. Never appears without the preceding BEGIN line.

Common situations: Same as error 201; this line exists purely for log bracketing and tooling that extracts the property dump between BEGIN/END.

Related errors


AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06). Data as JSON: /api/errors/9b741663b9d5ad9e. Report an issue: GitHub.