Skip to content

[release/8.0] Named mutex tests fail on Mono #136060

Closed

Description

@ViveliDuCh

Build information

Failing tests and configurations

  1. System.Threading.Tests.MutexTests.NamedMutex_UserScopedSharedMemoryPathAndPermissions
  2. System.Threading.Tests.MutexTests.NamedMutex_SharedMemoryDirectoryReplacementDoesNotRedirectFileAccess
Runtime configuration Helix configuration Permissions test result Directory-replacement test result
Linux ARM64, Debug libraries, release Mono AzureLinux.3.ArmArch.Open Result Result
Linux x64, Debug libraries, release Mono interpreter Ubuntu.2204.Amd64.Open Result Result
Linux x64, Debug libraries, release Mono Debian.12.Amd64.Open Result Result

Console logs

Exceptions

Excerpts from the linked ARM64 Mono log.

NamedMutex_UserScopedSharedMemoryPathAndPermissions

Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.

Child exception:
Xunit.Sdk.TrueException: Assert.True() Failure
Expected: True
Actual:   False
   at System.Threading.Tests.MutexTests.<>c.<NamedMutex_UserScopedSharedMemoryPathAndPermissions>b__10_0(String homeDirectory) in /_/src/libraries/System.Threading/tests/MutexTests.cs:line 307

NamedMutex_SharedMemoryDirectoryReplacementDoesNotRedirectFileAccess

Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.

Child exception:
System.IO.DirectoryNotFoundException: Could not find a part of the path '/tmp/#MutexTests_ulplgbvm.vvv/NamedMutex_SharedMemoryDirectoryReplacementDoesNotRedirectFileAccess_330_ffjhpjti/.dotnet/shm'.
   at System.IO.FileSystem.MoveDirectory(String sourceFullPath, String destFullPath, Boolean isCaseSensitiveRename) in /_/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Unix.cs:line 459
   at System.IO.Directory.Move(String sourceDirName, String destDirName) in /_/src/libraries/System.Private.CoreLib/src/System/IO/Directory.cs:line 273
   at System.Threading.Tests.MutexTests.<>c.<NamedMutex_SharedMemoryDirectoryReplacementDoesNotRedirectFileAccess>b__11_0(String userRuntimeDirectory) in /_/src/libraries/System.Threading/tests/MutexTests.cs:line 345

Observed behavior

Both tests fail in the three listed Linux Mono configurations, including the x64 interpreter:

  • NamedMutex_UserScopedSharedMemoryPathAndPermissions fails at the backing-file existence assertion, line 307.
  • NamedMutex_SharedMemoryDirectoryReplacementDoesNotRedirectFileAccess throws DirectoryNotFoundException at the attempt to rename .dotnet/shm, line 345. It fails before reaching the assertions about where the second mutex's file is created.

Activity

  1. dotnet-policy-service commented on Oct 19, 2026

    @dotnet-policy-service
    Contributor

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

  2. added this to the 8.0.x milestone on Oct 20, 2026
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Oct 20, 2026
  4. added a commit that references this issue on Oct 20, 2026
    ba6f9a0
  5. ViveliDuCh commented on Oct 21, 2026

    @ViveliDuCh
    MemberAuthor

    Fixed by #136170

  6. locked and limited conversation to collaborators on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions