Skip to content

Host Activation test failures on OSX: exit code 0x86 (134) #118904

Closed

Description

@AndyAyersMS

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1126641
Build error leg or test failing: Microsoft.DotNet.CoreSetup.Test.HostActivation.DependencyResolution.LocalPath.Microsoft.DotNet.CoreSetup.Test.HostActivation.DependencyResolution.LocalPath.RuntimeAssemblies_SelfContained
Pull request: #118870

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": ["osx", "  Exit Code: 0x86"],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1126641
Error message validated: [could not be formatted with string.Format]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 8/19/2025 8:34:05 PM UTC

Report

Build Definition Test Pull Request
1127376 dotnet/runtime HostActivation.Tests.WorkItemExecution #118889
1126641 dotnet/runtime HostActivation.Tests.WorkItemExecution #118870

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 2 2

Report

Build Definition Test Pull Request
1142088 dotnet/runtime HostActivation.Tests.WorkItemExecution #119379
1141842 dotnet/runtime HostActivation.Tests.WorkItemExecution #119409
1141481 dotnet/runtime HostActivation.Tests.WorkItemExecution #119438
1141245 dotnet/runtime HostActivation.Tests.WorkItemExecution
1140878 dotnet/runtime HostActivation.Tests.WorkItemExecution #119417
1140709 dotnet/runtime HostActivation.Tests.WorkItemExecution #119408
1140453 dotnet/runtime HostActivation.Tests.WorkItemExecution
1139605 dotnet/runtime HostActivation.Tests.WorkItemExecution #119359
1138729 dotnet/runtime HostActivation.Tests.WorkItemExecution #119336
1138431 dotnet/runtime HostActivation.Tests.WorkItemExecution #115335
1137603 dotnet/runtime HostActivation.Tests.WorkItemExecution #118778
1137475 dotnet/runtime HostActivation.Tests.WorkItemExecution #119210
1137325 dotnet/runtime HostActivation.Tests.WorkItemExecution #119275
1137363 dotnet/runtime HostActivation.Tests.WorkItemExecution #118966
1137130 dotnet/runtime HostActivation.Tests.WorkItemExecution #119272
1137126 dotnet/runtime HostActivation.Tests.WorkItemExecution #119271
1136578 dotnet/runtime HostActivation.Tests.WorkItemExecution #98643
1136206 dotnet/runtime HostActivation.Tests.WorkItemExecution #119242
1135925 dotnet/runtime Microsoft.DotNet.CoreSetup.Test.HostActivation.DependencyResolution.LocalPath.Microsoft.DotNet.CoreSetup.Test.HostActivation.DependencyResolution.LocalPath.NativeLibraries_SelfContained
1135770 dotnet/runtime HostActivation.Tests.WorkItemExecution #119226
1135246 dotnet/runtime HostActivation.Tests.WorkItemExecution #118361
1134688 dotnet/runtime HostActivation.Tests.WorkItemExecution #119182
1134552 dotnet/runtime HostActivation.Tests.WorkItemExecution #118469
1133625 dotnet/runtime HostActivation.Tests.WorkItemExecution #119160
1133606 dotnet/runtime HostActivation.Tests.WorkItemExecution #119119
1132567 dotnet/runtime HostActivation.Tests.WorkItemExecution #119122
1132285 dotnet/runtime HostActivation.Tests.WorkItemExecution #116390
1131302 dotnet/runtime HostActivation.Tests.WorkItemExecution #118990
1130362 dotnet/runtime HostActivation.Tests.WorkItemExecution
1130348 dotnet/runtime HostActivation.Tests.WorkItemExecution #119018
1130124 dotnet/runtime HostActivation.Tests.WorkItemExecution #108513
1130007 dotnet/runtime HostActivation.Tests.WorkItemExecution
1129763 dotnet/runtime HostActivation.Tests.WorkItemExecution #118960
1128917 dotnet/runtime HostActivation.Tests.WorkItemExecution #118901
1127376 dotnet/runtime HostActivation.Tests.WorkItemExecution #118889
1126641 dotnet/runtime HostActivation.Tests.WorkItemExecution #118870

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
2 16 36

Activity

  1. added
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    Known Build ErrorUse this to report build issues in the .NET Helix tab
    on Aug 19, 2025
  2. added
    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
    on Aug 19, 2025
  3. AndyAyersMS commented on Aug 20, 2025

    @AndyAyersMS
    MemberAuthor

    Also seeing failures in #118902, this time no log for one an a different assertion for the other

    https://dev.azure.com/dnceng-public/public/_build/results?buildId=1126817&view=ms.vss-test-web.build-test-results-tab

    Tracing enabled @ Tue Aug 19 21:28:46 2025 UTC
    Reading from host interface version: [0x16041101:248] to initialize policy version: [0x16041101:248]
    , but found -1 (difference of -1)
    
  4. dotnet-policy-service commented on Aug 20, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
    See info in area-owners.md if you want to be subscribed.

  5. elinor-fung commented on Aug 20, 2025

    @elinor-fung
    Member

    Actual issues appears to be a crash (SIGABRT) - updated the error message filter. Unfortunately, we don't have dumps because the dumps were too large to upload (dotnet/arcade#14201).

    In the logs, we have the trace message from the start of hostpolicy_init_t::init - the next expected trace message would be from

    trace_corehost_init(hostpolicy_init, argc, argv, location);

    So either somewhere in hostpolicy_init_t::init or the first part of corehost_main (not much before that trace message, so likely the init).

  6. changed the title [-]Host Activation test failures on OSX[/-] [+]Host Activation test failures on OSX: exit code 0x86 (134)[/+] on Aug 21, 2025
  7. removed
    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
    on Aug 21, 2025
  8. removed
    untriagedNew issue has not been triaged by the area owner
    on Sep 3, 2025
  9. added this to the 11.0.0 milestone on Sep 3, 2025
  10. elinor-fung commented on Sep 3, 2025

    @elinor-fung
    Member

    I haven't been able to repro this on my arm64 Mac.

    I've been manually sending off to Helix (OSX.1200.Amd64.Open) one of the tests that hit this with a loop. With some extra logging, a trace message added after L102 is printed and a trace message added before L132 is not. It seems we're crashing after we exit the if block here:

    for (size_t i = 0; i < fx_count; ++i)
    {
    trace::verbose(_X(" name='%s', dir='%s', requested_version='%s', found_version='%s'"),
    fx_names[i].c_str(), fx_dirs[i].c_str(), fx_requested_versions[i].c_str(), fx_found_versions[i].c_str());
    auto fx = new fx_definition_t(fx_names[i], fx_dirs[i], fx_requested_versions[i], fx_found_versions[i]);
    init->fx_definitions.push_back(std::unique_ptr<fx_definition_t>(fx));
    }
    }

    before we get to:
    init_host_command(input, init);

  11. elinor-fung commented on Sep 5, 2025

    @elinor-fung
    Member

    Just based on when this started happening, I tried reverting 7195086. Without that, my 'run in a loop' repro (5000 iterations of a test that intermittently fails) stops hitting this. I don't see how that change would have caused this issue though. The only thing interesting in there is get_host_env_var (always called passing a string literal) - which I've stepped / mentally gone through a bunch of times and don't see what would be the issue:

    template<size_t NameLen>
    bool get_host_env_var(const pal::char_t (&name)[NameLen], pal::string_t* value)
    {
    assert(name[NameLen - 1] == _X('\0')); // name is expected to be null-terminated
    // DOTNET_HOST_* takes precedence
    constexpr size_t dotnet_host_prefix_len = STRING_LENGTH("DOTNET_HOST_");
    pal::char_t dotnet_host_name[dotnet_host_prefix_len + NameLen];
    pal::snwprintf(dotnet_host_name, ARRAY_SIZE(dotnet_host_name), _X("DOTNET_HOST_%s"), name);
    if (pal::getenv(dotnet_host_name, value))
    return true;
    // COREHOST_* for backwards compatibility
    constexpr size_t corehost_prefix_len = STRING_LENGTH("COREHOST_");
    pal::char_t corehost_name[corehost_prefix_len + NameLen];
    pal::snwprintf(corehost_name, ARRAY_SIZE(corehost_name), _X("COREHOST_%s"), name);
    return pal::getenv(corehost_name, value);
    }
    }

  12. elinor-fung commented on Sep 5, 2025

    @elinor-fung
    Member

    Switching to appending to a std::string still repros the crash:

    template<size_t NameLen>
    bool get_host_env_var(const pal::char_t (&name)[NameLen], pal::string_t* value)
    {
        assert(name[NameLen - 1] == _X('\0')); // name is expected to be null-terminated
    
        // DOTNET_HOST_* takes precedence
        constexpr size_t dotnet_host_prefix_len = STRING_LENGTH("DOTNET_HOST_");
        pal::string_t dotnet_host_name = _X("DOTNET_HOST_");
        dotnet_host_name.append(name, NameLen - 1);
        if (pal::getenv(dotnet_host_name.c_str(), value))
            return true;
    
        // COREHOST_* for backwards compatibility
        constexpr size_t corehost_prefix_len = STRING_LENGTH("COREHOST_");
        pal::string_t corehost_name = _X("COREHOST_");
        corehost_name.append(name, NameLen - 1);
        return pal::getenv(corehost_name.c_str(), value);
    }

    but this does not:

    +bool get_host_env_var(const pal::char_t* name, size_t NameLen, pal::string_t* value)
    -template<size_t NameLen>
    -bool get_host_env_var(const pal::char_t (&name)[NameLen], pal::string_t* value)
    {
        assert(name[NameLen - 1] == _X('\0')); // name is expected to be null-terminated
    
        // DOTNET_HOST_* takes precedence
        constexpr size_t dotnet_host_prefix_len = STRING_LENGTH("DOTNET_HOST_");
        pal::string_t dotnet_host_name = _X("DOTNET_HOST_");
        dotnet_host_name.append(name, NameLen - 1);
        if (pal::getenv(dotnet_host_name.c_str(), value))
            return true;
    
        // COREHOST_* for backwards compatibility
        constexpr size_t corehost_prefix_len = STRING_LENGTH("COREHOST_");
        pal::string_t corehost_name = _X("COREHOST_");
        corehost_name.append(name, NameLen - 1);
        return pal::getenv(corehost_name.c_str(), value);
    }
    
    +bool get_host_env_var(const pal::char_t* name, pal::string_t* value)
    +{
    +    return get_host_env_var(name, pal::strlen(name) + 1, value);
    +}
  13. elinor-fung commented on Sep 8, 2025

    @elinor-fung
    Member

    This stops reproing running on OSX.13.Amd64.Open instead of OSX.1200.Amd64.Open (with sources from main, 10k iterations of the test). Given macOS 12 is out of support (and the helix queues are slated to be removed, so we'll need to update anyways), I'm inclined to just update the queue.

  14. locked and limited conversation to collaborators on Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Known Build ErrorUse this to report build issues in the .NET Helix tabarea-Hostblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions