weixin_39765840
2021-01-11 10:07 阅读 0

Test Failure : System.Threading.Tests.MutexAclTests.Mutex_Create_BeyondMaxPathLength

Test System.Threading.Tests.MutexAclTests.Mutex_Create_BeyondMaxPathLength has failed. Build: 20191107.57(Master)

Details: https://helix.dot.net/api/2019-06-17/jobs/76a82635-179a-41d2-aa2f-a8ee166b3756/workitems/System.Threading.AccessControl.Tests/console

OS & Arch: Windows x64

Queue name: netcoreapp-Windows_NT-Release-x64-Windows.81.Amd64.Open

Log:


C:\dotnetbuild\work\76a82635-179a-41d2-aa2f-a8ee166b3756\Work\4ce763ce-4e19-4164-842d-99db68aacab9\Exec>"C:\dotnetbuild\work\76a82635-179a-41d2-aa2f-a8ee166b3756\Payload\dotnet.exe" exec --runtimeconfig System.Threading.AccessControl.Tests.runtimeconfig.json xunit.console.dll System.Threading.AccessControl.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=nonnetcoreapptests -notrait category=nonwindowstests -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Threading.AccessControl.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Threading.AccessControl.Tests (found 20 of 21 test cases)
  Starting:    System.Threading.AccessControl.Tests (parallel test collections = on, max threads = 2)
    System.Threading.Tests.MutexAclTests.Mutex_Create_BeyondMaxPathLength [FAIL]
      System.Threading.WaitHandleCannotBeOpenedException : A WaitHandle with system-wide name 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' cannot be created. A WaitHandle of a different type might have the same name.
      Stack Trace:
        /_/src/System.Threading.AccessControl/src/System/Threading/MutexAcl.cs(76,0): at System.Threading.MutexAcl.ValidateMutexHandle(SafeWaitHandle mutexHandle, String name, Boolean& createdNew)
        /_/src/System.Threading.AccessControl/src/System/Threading/MutexAcl.cs(48,0): at System.Threading.MutexAcl.Create(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity)
        /_/src/System.Threading.AccessControl/tests/MutexAclTests.cs(103,0): at System.Threading.Tests.MutexAclTests.CreateAndVerifyMutex(Boolean initiallyOwned, String name, MutexSecurity expectedSecurity, Boolean expectedCreatedNew)
        /_/src/System.Threading.AccessControl/tests/MutexAclTests.cs(56,0): at System.Threading.Tests.MutexAclTests.Mutex_Create_BeyondMaxPathLength()
  Finished:    System.Threading.AccessControl.Tests
=== TEST EXECUTION SUMMARY ===
   System.Threading.AccessControl.Tests  Total: 79, Errors: 0, Failed: 1, Skipped: 0, Time: 0.259s
----- end Fri 11/08/2019  4:02:16.41 ----- exit code 1 ----------------------------------------------------------

该提问来源于开源项目:dotnet/runtime

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

5条回答 默认 最新

  • weixin_40005887 weixin_40005887 2021-01-11 10:07

    It looks like in Mutex_Create_BeyondMaxPathLength also Mutex_Create_NameMultipleNew and Mutex_Create_CreateNewExisting the mutex is not getting disposed? Therefore I think will this happen if the tests are run twice on the same machine.

    点赞 评论 复制链接分享
  • weixin_39576127 weixin_39576127 2021-01-11 10:07

    same failure here https://github.com/dotnet/corefx/pull/41723 https://helix.dot.net/api/2019-06-17/jobs/99b33a41-6912-4120-b28b-edf49252a04d/workitems/System.Threading.AccessControl.Tests/console

    点赞 评论 复制链接分享
  • weixin_40005887 weixin_40005887 2021-01-11 10:07

    Ah, EventWaitHandle_Create_BeyondMaxPathLength has the same problem - doesn't Dispose. I'm guessing they're colliding over the same namespace, racing with the finalizer who is trying to dispose the first one.

    点赞 评论 复制链接分享
  • weixin_40005887 weixin_40005887 2021-01-11 10:07

    Oops, I missed the using keyword. The dispose is happening deterministically, but if the two tests run at the same time, they will still collide. They can't both be new string('x', Interop.Kernel32.MAX_PATH + 100);

    点赞 评论 复制链接分享
  • weixin_39768083 weixin_39768083 2021-01-11 10:07

    Thanks for letting me know. I'll take a look at this as soon as I finish working on the 3.1 fix.

    点赞 评论 复制链接分享

相关推荐