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

[Mono] Named mutexes are not working cross-process #36307

Open
kouvel opened this issue May 12, 2020 · 3 comments
Open

[Mono] Named mutexes are not working cross-process #36307

kouvel opened this issue May 12, 2020 · 3 comments
Labels
area-VM-threading-mono backlog-cleanup-candidate An inactive issue that has been marked for automated closure. disabled-test The test is disabled in source code against the issue no-recent-activity
Milestone

Comments

@kouvel
Copy link
Member

kouvel commented May 12, 2020

The following test is failing, it looks like named mutexes used cross-process are not working:

public void CrossProcess_NamedMutex_ProtectedFileAccessAtomic(string prefix)

Output:

System.AggregateException : One or more errors occurred. (Remote process failed with an unhandled exception.)\n---- Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.

   at System.Threading.Tests.ThreadTestHelpers.<>c__DisplayClass4_0.<CreateGuardedThread>b__1() in /_/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs:line 52
   at System.Threading.Tests.ThreadTestHelpers.<>c__DisplayClass4_0.<CreateGuardedThread>b__2() in /_/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs:line 57
   at System.Threading.Tests.ThreadTestHelpers.RunTestInBackgroundThread(Action test) in /_/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs:line 108
   at System.Threading.Tests.MutexTests.CrossProcess_NamedMutex_ProtectedFileAccessAtomic(String prefix) in /_/src/libraries/System.Threading/tests/MutexTests.cs:line 411
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /_/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs:line 359
----- Inner Stack Trace -----

Child exception:
  System.Threading.WaitHandleCannotBeOpenedException: No handle of the given name exists.
   at System.Threading.Mutex.OpenExisting(String name) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.cs:line 47
   at System.Threading.Tests.MutexTests.<>c.<CrossProcess_NamedMutex_ProtectedFileAccessAtomic>b__15_1(String m, String f) in /_/src/libraries/System.Threading/tests/MutexTests.cs:line 417
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /_/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs:line 359

Child process:
  System.Threading.Tests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.Threading.Tests.MutexTests+<>c Void <CrossProcess_NamedMutex_ProtectedFileAccessAtomic>b__15_1(System.String, System.String)

Child arguments:
  4f0f3cb57d5d4a829ed482bd5e0633897e26520d8a4f4b3fbfe733be1414a3df, /tmp/MutexTests_wr0kxyxs.z1h/CrossProcess_NamedMutex_ProtectedFileAccessAtomic_408_6634c51e

Failed in CI run: https://dev.azure.com/dnceng/public/_build/results?buildId=640943&view=ms.vss-test-web.build-test-results-tab

Might be a known issue. The test was disabled before the runtime repo existed. I was trying to enable it in #36268 and saw the failures. For now I'll be disabling that test on Mono in that PR.

@kouvel kouvel added disabled-test The test is disabled in source code against the issue area-VM-threading-mono labels May 12, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label May 12, 2020
@stephentoub
Copy link
Member

Last I knew, mono implemented named sync primitives to be process-wide rather than system-wide names.

@lambdageek lambdageek removed the untriaged New issue has not been triaged by the area owner label May 15, 2020
@lambdageek
Copy link
Member

Stephen is correct.

@lambdageek lambdageek added this to the Future milestone Jun 22, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VM-threading-mono backlog-cleanup-candidate An inactive issue that has been marked for automated closure. disabled-test The test is disabled in source code against the issue no-recent-activity
Projects
None yet
Development

No branches or pull requests

4 participants