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

[macOS-arm64] System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [FAIL] on CoreCLR #49107

Open
Tracked by #64600
sdmaclea opened this issue Mar 4, 2021 · 6 comments · Fixed by #53779
Open
Tracked by #64600
Labels
Milestone

Comments

@sdmaclea
Copy link
Contributor

sdmaclea commented Mar 4, 2021

See https://dev.azure.com/dnceng/public/_build/results?buildId=1021947

----- start Wed Mar 3 17:35:59 PST 2021 =============== To repro directly: =====================================================
pushd .
/tmp/helix/working/C24F0A5F/p/dotnet exec --runtimeconfig System.Diagnostics.Process.Tests.runtimeconfig.json --depsfile System.Diagnostics.Process.Tests.deps.json xunit.console.dll System.Diagnostics.Process.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=failing 
popd
===========================================================================================================
/private/tmp/helix/working/C24F0A5F/w/A42D099B/e /private/tmp/helix/working/C24F0A5F/w/A42D099B/e
  Discovering: System.Diagnostics.Process.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Diagnostics.Process.Tests (found 247 of 310 test cases)
  Starting:    System.Diagnostics.Process.Tests (parallel test collections = on, max threads = 8)
    System.Diagnostics.Tests.ProcessStartInfoTests.ShellExecute_Nano_Fails_Start [SKIP]
      Condition(s) not met: "IsWindowsNanoServer"
    System.Diagnostics.Tests.ProcessTests.ProcessStart_UseShellExecute_OnWindows_OpenMissingFile_Throws [SKIP]
      Condition(s) not met: "HasWindowsShell"
Darwin
    System.Diagnostics.Tests.ProcessTests.ProcessStart_UseShellExecute_OnWindows_DoesNotThrow [SKIP]
      Condition(s) not met: "HasWindowsShell"
    System.Diagnostics.Tests.ProcessTests.TestProcessRecycledPid [SKIP]
      Condition(s) not met: "IsStressModeEnabledAndRemoteExecutorSupported"

Usage: dotnet [options]
Usage: dotnet [path-to-application]

Options:
  -h|--help         Display help.
  --info            Display .NET information.
  --list-sdks       Display the installed SDKs.
  --list-runtimes   Display the installed runtimes.

path-to-application:
  The path to an application .dll file to execute.
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [FAIL]
      Assert.InRange() Failure
      Range:  (1 - 9223372036854775807)
      Actual: 0
      Stack Trace:
        /_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs(742,0): at System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64()
in OSX, programToOpenWith is /usr/bin/open, while ProcessName is dotnet.
in OSX, programToOpenWith is /usr/bin/nano, while ProcessName is dotnet.
  Finished:    System.Diagnostics.Process.Tests
=== TEST EXECUTION SUMMARY ===
   System.Diagnostics.Process.Tests  Total: 307, Errors: 0, Failed: 1, Skipped: 4, Time: 17.581s
/private/tmp/helix/working/C24F0A5F/w/A42D099B/e
----- end Wed Mar 3 17:36:17 PST 2021 ----- exit code 1 ----------------------------------------------------------

/cc @sandreenko Might be an ABI issue ???

@ghost
Copy link

ghost commented Mar 4, 2021

Tagging subscribers to this area:
See info in area-owners.md if you want to be subscribed.

Issue Details

See https://dev.azure.com/dnceng/public/_build/results?buildId=1021947

----- start Wed Mar 3 17:35:59 PST 2021 =============== To repro directly: =====================================================
pushd .
/tmp/helix/working/C24F0A5F/p/dotnet exec --runtimeconfig System.Diagnostics.Process.Tests.runtimeconfig.json --depsfile System.Diagnostics.Process.Tests.deps.json xunit.console.dll System.Diagnostics.Process.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=failing 
popd
===========================================================================================================
/private/tmp/helix/working/C24F0A5F/w/A42D099B/e /private/tmp/helix/working/C24F0A5F/w/A42D099B/e
  Discovering: System.Diagnostics.Process.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Diagnostics.Process.Tests (found 247 of 310 test cases)
  Starting:    System.Diagnostics.Process.Tests (parallel test collections = on, max threads = 8)
    System.Diagnostics.Tests.ProcessStartInfoTests.ShellExecute_Nano_Fails_Start [SKIP]
      Condition(s) not met: "IsWindowsNanoServer"
    System.Diagnostics.Tests.ProcessTests.ProcessStart_UseShellExecute_OnWindows_OpenMissingFile_Throws [SKIP]
      Condition(s) not met: "HasWindowsShell"
Darwin
    System.Diagnostics.Tests.ProcessTests.ProcessStart_UseShellExecute_OnWindows_DoesNotThrow [SKIP]
      Condition(s) not met: "HasWindowsShell"
    System.Diagnostics.Tests.ProcessTests.TestProcessRecycledPid [SKIP]
      Condition(s) not met: "IsStressModeEnabledAndRemoteExecutorSupported"

Usage: dotnet [options]
Usage: dotnet [path-to-application]

Options:
  -h|--help         Display help.
  --info            Display .NET information.
  --list-sdks       Display the installed SDKs.
  --list-runtimes   Display the installed runtimes.

path-to-application:
  The path to an application .dll file to execute.
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [FAIL]
      Assert.InRange() Failure
      Range:  (1 - 9223372036854775807)
      Actual: 0
      Stack Trace:
        /_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs(742,0): at System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64()
in OSX, programToOpenWith is /usr/bin/open, while ProcessName is dotnet.
in OSX, programToOpenWith is /usr/bin/nano, while ProcessName is dotnet.
  Finished:    System.Diagnostics.Process.Tests
=== TEST EXECUTION SUMMARY ===
   System.Diagnostics.Process.Tests  Total: 307, Errors: 0, Failed: 1, Skipped: 4, Time: 17.581s
/private/tmp/helix/working/C24F0A5F/w/A42D099B/e
----- end Wed Mar 3 17:36:17 PST 2021 ----- exit code 1 ----------------------------------------------------------

/cc @sandreenko Might be an ABI issue ???

Author: sdmaclea
Assignees: -
Labels:

arch-arm64, area-System.Diagnostics.Process, os-mac-os-x-big-sur

Milestone: 6.0.0

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Mar 4, 2021
@sandreenko sandreenko self-assigned this Mar 4, 2021
@sdmaclea
Copy link
Contributor Author

sdmaclea commented Mar 9, 2021

Seems to be possibly an intermittent failure. It didn't fail in one of my runs, but it did fail again in https://dev.azure.com/dnceng/public/_build/results?buildId=1028375

@sdmaclea sdmaclea added the disabled-test The test is disabled in source code against the issue label Apr 8, 2021
@sandreenko sandreenko assigned sdmaclea and unassigned sandreenko Jun 5, 2021
@sandreenko
Copy link
Contributor

@sdmaclea I think it is the same intermittent failure that you are fighting with not related to JitStress but happening there oftener because of the longer runs. Feel free to assign it back if it stays after your fix.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 6, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 6, 2021
@sandreenko sandreenko reopened this Jun 6, 2021
@sandreenko
Copy link
Contributor

I left it running for a night yesterday (just the single test) and it shows some errors:

hundreds of successful runs before

   System.Diagnostics.Process.Tests  Total: 1, Errors: 0, Failed: 0, Skipped: 0, Time: 0.404s
  Discovering: System.Diagnostics.Process.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Diagnostics.Process.Tests (found 1 of 310 test case)
  Starting:    System.Diagnostics.Process.Tests (parallel test collections = on, max threads = 8)
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [STARTING]
A fatal error occurred. The folder [/Users/seandree/git/runtime/artifacts/bin/testhost/net6.0-OSX-Release-arm64/shared/Microsoft.NETCore.App/6.0.0/host/fxr] does not exist
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [FAIL]
      Assert.InRange() Failure
      Range:  (1 - 9223372036854775807)
      Actual: 0
      Stack Trace:
        /Users/seandree/git/runtime/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs(750,0): at System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64()
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [FINISHED] Time: 0.1286223s
  Finished:    System.Diagnostics.Process.Tests
=== TEST EXECUTION SUMMARY ===
   System.Diagnostics.Process.Tests  Total: 1, Errors: 0, Failed: 1, Skipped: 0, Time: 0.607s
  Discovering: System.Diagnostics.Process.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Diagnostics.Process.Tests (found 1 of 310 test case)
  Starting:    System.Diagnostics.Process.Tests (parallel test collections = on, max threads = 8)
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [STARTING]
A fatal error occurred. The folder [/Users/seandree/git/runtime/artifacts/bin/testhost/net6.0-OSX-Release-arm64/shared/Microsoft.NETCore.App/6.0.0/host/fxr] does not exist
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [FAIL]
      Assert.InRange() Failure
      Range:  (1 - 9223372036854775807)
      Actual: 0
      Stack Trace:
        /Users/seandree/git/runtime/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs(750,0): at System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64()
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [FINISHED] Time: 0.1283732s
  Finished:    System.Diagnostics.Process.Tests
=== TEST EXECUTION SUMMARY ===
   System.Diagnostics.Process.Tests  Total: 1, Errors: 0, Failed: 1, Skipped: 0, Time: 0.516s
  Discovering: System.Diagnostics.Process.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Diagnostics.Process.Tests (found 1 of 310 test case)
  Starting:    System.Diagnostics.Process.Tests (parallel test collections = on, max threads = 8)
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [STARTING]
A fatal error occurred. The folder [/Users/seandree/git/runtime/artifacts/bin/testhost/net6.0-OSX-Release-arm64/shared/Microsoft.NETCore.App/6.0.0/host/fxr] does not exist
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [FAIL]
      Assert.InRange() Failure
      Range:  (1 - 9223372036854775807)
      Actual: 0
      Stack Trace:
        /Users/seandree/git/runtime/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs(750,0): at System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64()
    System.Diagnostics.Tests.ProcessTests.TestVirtualMemorySize64 [FINISHED] Time: 0.1293544s
  Finished:    System.Diagnostics.Process.Tests

hundreds of successful runs after

looks like it still exists and my initial testing was not lucky to catch it. I will return the exclusion. It is suspicious that the failures happened one after each other and showed this The folder [/Users/seandree/git/runtime/artifacts/bin/testhost/net6.0-OSX-Release-arm64/shared/Microsoft.NETCore.App/6.0.0/host/fxr] does not exist, could it be an OS issue with a blocked file or something?

@sdmaclea sdmaclea removed their assignment Jun 9, 2021
@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Jul 6, 2021
@danmoseley
Copy link
Member

this means libproc.GetProcessInfoById(pid).Value.ptinfo.pti_virtual_size was 0.
Interop definitions are in https://github.com/dotnet/runtime/blob/e7b743cae325d4720fceaf7f84f68aaaf7bb7dbe/src/libraries/Common/src/Interop/OSX/Interop.libproc.GetProcessInfoById.cs.
It all seems done correctly as far as I can see looking at
https://opensource.apple.com/source/xnu/xnu-7195.81.3/bsd/sys/proc_info.h.auto.html
https://opensource.apple.com/source/xnu/xnu-7195.81.3/bsd/kern/proc_info.c.auto.html
It also does check the return code of proc_pidinfo correctly.

The simplest explanation is that the API just occasionally returning 0 on Apple Silicon.

@danmoseley danmoseley modified the milestones: 6.0.0, Future Jul 29, 2021
@ericstj ericstj modified the milestones: Future, 7.0.0 Jan 25, 2022
@ericstj
Copy link
Member

ericstj commented Jan 25, 2022

Can we take a closer look at this in 7.0? We'd like to remove test exceptions on Apple Silicon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants