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

PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration test failure #86013

Closed
jkotas opened this issue May 9, 2023 · 4 comments · Fixed by #86680
Labels
area-System.Resources blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Milestone

Comments

@jkotas
Copy link
Member

jkotas commented May 9, 2023

  Discovering: System.Resources.Extensions.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Resources.Extensions.Tests (found 26 test cases)
  Starting:    System.Resources.Extensions.Tests (parallel test collections = on, max threads = 2)
    System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration(useEnumeratorEntry: False) [FAIL]
      Assert.True() Failure
      Expected: True
      Actual:   False
      Stack Trace:
        /_/src/libraries/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs(531,0): at System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration(Boolean useEnumeratorEntry)
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(59,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
  Finished:    System.Resources.Extensions.Tests

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=266915
Build error leg or test failing: System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration
Pull request: #85962

Error Message

Fill the error message using known issues guidance.

{
  "ErrorMessage": "System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration",
  "BuildRetry": true,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

Report

Build Definition Step Name Console log Pull Request
270335 dotnet/runtime Send to Helix Log #86091
Build Definition Test Pull Request
284189 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #86674
282666 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #86567
282482 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration
276887 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #86151
276622 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #85965
274034 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #86252
272903 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #86210
270987 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #84384
270027 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #86074
269251 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #85843
268707 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #85317
266915 dotnet/runtime System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration #85962

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 3 13
@jkotas jkotas added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab area-System.Resources labels May 9, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label May 9, 2023
@ghost
Copy link

ghost commented May 9, 2023

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

Issue Details
  Discovering: System.Resources.Extensions.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Resources.Extensions.Tests (found 26 test cases)
  Starting:    System.Resources.Extensions.Tests (parallel test collections = on, max threads = 2)
    System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration(useEnumeratorEntry: False) [FAIL]
      Assert.True() Failure
      Expected: True
      Actual:   False
      Stack Trace:
        /_/src/libraries/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs(531,0): at System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration(Boolean useEnumeratorEntry)
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(59,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
  Finished:    System.Resources.Extensions.Tests

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=266915
Build error leg or test failing: System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration
Pull request: #85962

Error Message

Fill the error message using known issues guidance.

{
  "ErrorMessage": "System.Resources.Extensions.Tests.PreserializedResourceWriterTests.TestResourceManagerIsSafeForConcurrentAccessAndEnumeration",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}
Author: jkotas
Assignees: -
Labels:

area-System.Resources, blocking-clean-ci, Known Build Error

Milestone: -

@buyaa-n buyaa-n added this to the 8.0.0 milestone May 16, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label May 16, 2023
@buyaa-n
Copy link
Member

buyaa-n commented May 16, 2023

Related to #75054 CC: @madelson the test still fails occasionally

@madelson
Copy link
Contributor

@buyaa-n I assume we're hitting timeouts/contention? Do you think it would help to use TaskCreationOptions.LongRunning when creating the threads here?

We could also increase the timeout even more than what it currently is.

@buyaa-n
Copy link
Member

buyaa-n commented May 23, 2023

I assume we're hitting timeouts/contention?

Yes

Do you think it would help to use TaskCreationOptions.LongRunning when creating the threads here?

That was actually suggested previously and apparently you applied the suggestion only to ResourceManagerTests.cs

.Select(_ => Task.Factory.StartNew(
WaitForBarrierThenEnumerateResources,
CancellationToken.None,
TaskCreationOptions.LongRunning,
TaskScheduler.Default))

Please apply the suggestion to this test too, thanks!

madelson added a commit to madelson/runtime that referenced this issue May 24, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 24, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 24, 2023
buyaa-n added a commit that referenced this issue May 24, 2023
* Update BinaryResourceWriterUnitTest.cs

Apply suggestion from #86013 (comment)

Co-authored-by: Buyaa Namnan <[email protected]>
@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Resources blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants