Skip to content

HighNumberedFd_NotLeakedAfterLoweringRLimit test failing in CI #135795

Closed

Description

@jkotas
     Condition(s) not met: "IsWindows"
Unhandled exception. Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 0
Actual:   -1
   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 102
   at Xunit.Assert.Equal[T](T expected, T actual) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 36
   at System.Diagnostics.Tests.ProcessHandlesTests.<>c.<HighNumberedFd_NotLeakedAfterLoweringRLimit>b__31_0() in /_/src/libraries/System.Diagnostics.Process/tests/ProcessHandlesTests.Unix.cs:line 86
   at System.Reflection.IntrinsicInvokeHelper.Instance_Void_0(IntPtr fn, Object obj, IntPtr* _, RuntimeType __) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/IntrinsicInvokeHelper.cs:line 837

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1635241
Build error leg or test failing: Wasm.Build.Tests.Blazor.MiscTests.MultiClientHostedBuildAndPublish
Pull request: #135772

Error Message

DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.

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

{
  "ErrorMessage": "HighNumberedFd_NotLeakedAfterLoweringRLimit",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1635241
Error message validated: [HighNumberedFd_NotLeakedAfterLoweringRLimit]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 10/14/2026 9:07:55 PM UTC

Report

Build Repository Test Pull Request
1637051 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135846
1636952 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135863
1636956 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135847
1636935 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135739
1636900 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135763
1636888 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135757
1636831 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135833
1636847 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135837
1636834 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135834
1636833 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135835
1636793 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135858
1636749 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135665
1636724 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135739
1636687 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135854
1636682 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135853
1636677 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135852
1636667 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135850
1636672 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135851
1636660 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #133422
1636637 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135758
1636621 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135847
1636599 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135846
1636584 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit
1636515 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135566
1636428 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135602
1636295 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135834
1636423 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135830
1636410 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135839
1636406 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135838
1636401 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135774
1636393 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #129683
1636366 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135827
1636355 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135808
1636080 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135798
1636306 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135836
1636300 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135835
1636308 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135837
1636290 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135833
1636266 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135764
1636179 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135806
1636161 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135577
1636156 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135830
1636145 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135823
1636109 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135820
1636095 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135440
1636083 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135829
1636076 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #130935
1636057 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135826
1636025 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135610
1636016 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135766
1635997 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135821
1635985 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135769
1635980 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #133659
1635944 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #132637
1635934 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135805
1635931 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135650
1635921 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135804
1635907 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135803
1635865 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135799
1635896 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135802
1635885 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135801
1635877 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135800
1635857 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135794
1635843 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135797
1635809 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135651
1635803 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135761
1635775 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #132425
1635749 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #134819
1635729 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135793
1635708 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135253
1635699 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135790
1635689 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135778
1635680 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135788
1635673 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit
1635566 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135377
1635549 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #134983
1635546 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135783
1635475 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #131589
1635241 dotnet/runtime System.Diagnostics.Tests.ProcessHandlesTests.HighNumberedFd_NotLeakedAfterLoweringRLimit #135772

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
78 79 79

Activity

  1. added
    blocking-clean-ci
    Known Build Error
    on Oct 14, 2026
  2. added
    untriaged
    on Oct 14, 2026
  3. jkotas commented on Oct 14, 2026

    @jkotas
    MemberAuthor

    @adamsitnik New test introduced by #135753

  4. dotnet-policy-service commented on Oct 14, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-diagnostics-process
    See info in area-owners.md if you want to be subscribed.

  5. pcshrosbree commented on Oct 14, 2026

    @pcshrosbree
    Contributor

    I suspect the test's own rlimit P/Invoke declarations. On #135772 and #135774 the only failing configuration for this test was Alpine.324.Arm32, with setrlimit returning -1 at line 86. That is in the test's setup, before the restricted grandchild is started.

    The test declares RLimit as two nuint fields, which is 8 bytes on arm32. musl defines rlim_t as unsigned long long on every architecture (include/sys/resource.h), so its struct rlimit is 16 bytes. getrlimit therefore writes past the end of limit, and setrlimit reads its hard limit from the 8 bytes after newLimit, which the test doesn't set. That could explain the -1, but the log has no errno and I haven't run this on Alpine arm32.

    A possible fix is to include the existing src/libraries/Common/src/Interop/Unix/System.Native/Interop.ResourceLimits.cs in the test project, as the System.IO.FileSystem and FileSystem.Watcher test projects already do, and use Interop.Sys.GetRLimit and Interop.Sys.SetRLimit. Their RLimit has two ulong fields, which System.Native converts to and from the platform's struct rlimit. Three details change with it:

    • The resource is Interop.Sys.RlimitResources.RLIMIT_NOFILE. That is a PAL value (9), which System.Native maps to Linux's 7, so the test's constant 7 can't be passed as is.
    • The skip check compares with Interop.Sys.RLIM_INFINITY (ulong.MaxValue), because System.Native reports infinity that way on 32-bit as well.
    • The lowered limit sets only CurrentLimit and keeps the returned MaximumLimit.

    Capturing Marshal.GetLastPInvokeError() straight after a failed call and including it in the assertion message would help identify the failure if it persists.

    Note

    This comment was prepared with AI assistance (Anthropic Claude, checked by OpenAI Codex) at my request. I reviewed it before posting.

  6. adamsitnik commented on Oct 15, 2026

    @adamsitnik
    Member

    I suspect the test's own rlimit P/Invoke declarations. On #135772 and #135774 the only failing configuration for this test was Alpine.324.Arm32, with setrlimit returning -1 at line 86. That is in the test's setup, before the restricted grandchild is started.

    The test declares RLimit as two nuint fields, which is 8 bytes on arm32. musl defines rlim_t as unsigned long long on every architecture (include/sys/resource.h), so its struct rlimit is 16 bytes. getrlimit therefore writes past the end of limit, and setrlimit reads its hard limit from the 8 bytes after newLimit, which the test doesn't set. That could explain the -1, but the log has no errno and I haven't run this on Alpine arm32.

    A possible fix is to include the existing src/libraries/Common/src/Interop/Unix/System.Native/Interop.ResourceLimits.cs in the test project, as the System.IO.FileSystem and FileSystem.Watcher test projects already do, and use Interop.Sys.GetRLimit and Interop.Sys.SetRLimit. Their RLimit has two ulong fields, which System.Native converts to and from the platform's struct rlimit. Three details change with it:

    • The resource is Interop.Sys.RlimitResources.RLIMIT_NOFILE. That is a PAL value (9), which System.Native maps to Linux's 7, so the test's constant 7 can't be passed as is.
    • The skip check compares with Interop.Sys.RLIM_INFINITY (ulong.MaxValue), because System.Native reports infinity that way on 32-bit as well.
    • The lowered limit sets only CurrentLimit and keeps the returned MaximumLimit.

    Capturing Marshal.GetLastPInvokeError() straight after a failed call and including it in the assertion message would help identify the failure if it persists.

    Note

    This comment was prepared with AI assistance (Anthropic Claude, checked by OpenAI Codex) at my request. I reviewed it before posting.

    @pcshrosbree would you like to send a PR with a fix?

  7. pcshrosbree commented on Oct 15, 2026

    @pcshrosbree
    Contributor

    Sure, I've opened #135867.

  8. added a commit that references this issue on Oct 15, 2026
    e089bbe
  9. removed
    untriaged
    on Oct 15, 2026
  10. locked and limited conversation to collaborators on Nov 15, 2026
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 Errorarea-System.Diagnostics.Processblocking-clean-ci

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions