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

Test failure: System.Transactions.Tests.TransactionManagerTest.DefaultTimeout_MaxTimeout_Set_Get #105124

Open
v-wenyuxu opened this issue Jul 19, 2024 · 6 comments
Assignees
Labels
area-System.Transactions blocking-clean-ci-optional Blocking optional rolling runs bug Known Build Error Use this to report build issues in the .NET Helix tab os-windows
Milestone

Comments

@v-wenyuxu
Copy link

v-wenyuxu commented Jul 19, 2024

Failed in: runtime-coreclr crossgen2 20240717.1

Failed tests:

net9.0-windows-Release-x64-TestReadyToRun_Release-(Windows.Nano.1809.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:nanoserver-1809-helix-amd64
    - System.Transactions.Tests.TransactionManagerTest.DefaultTimeout_MaxTimeout_Set_Get

Error message:

 Assert.Equal() Failure: Values differ
Expected: 00:02:00
Actual:   00:01:00

Stack trace:

   at System.Transactions.Tests.TransactionManagerTest.DefaultTimeout_MaxTimeout_Set_Get() in /_/src/libraries/System.Transactions.Local/tests/TransactionManagerTest.cs:line 15
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Known Issue Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "at System.Transactions.Tests.TransactionManagerTest.DefaultTimeout_MaxTimeout_Set_Get",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=745900
Error message validated: [at System.Transactions.Tests.TransactionManagerTest.DefaultTimeout_MaxTimeout_Set_Get]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/24/2024 6:15:28 PM UTC

Report

Build Definition Test Pull Request
937032 dotnet/runtime System.Transactions.Tests.TransactionManagerTest.DefaultTimeout_MaxTimeout_Set_Get #112060
929200 dotnet/runtime System.Transactions.Tests.TransactionManagerTest.DefaultTimeout_MaxTimeout_Set_Get #111691

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 2
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 19, 2024
Copy link
Contributor

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

@steveisok steveisok removed the untriaged New issue has not been triaged by the area owner label Jul 19, 2024
@steveisok steveisok added this to the 9.0.0 milestone Jul 19, 2024
@steveisok
Copy link
Member

@jkotas I'm perplexed at how this can happen. Any insight?

@steveisok
Copy link
Member

Since this isn't happening in any current runs, I'm going to close.

@jkotas jkotas added test-bug Problem in test source code (most likely) bug Known Build Error Use this to report build issues in the .NET Helix tab and removed area-crossgen2-coreclr arch-x64 test-bug Problem in test source code (most likely) labels Jul 24, 2024
@jkotas
Copy link
Member

jkotas commented Jul 24, 2024

I'm perplexed at how this can happen. Any insight?

This is a bug in TransationManager.

TransationManager.DefaultTimeOut is a global static. What can happen is:

This is a product bug. Reading the default timeout value on one thread should not lead to default value set on the on a different thread to be lost.

The bug is caused by mixing of lock used by LazyInitializer.EnsureInitialized and Interlocked operations that does not provide the thread safety desired here. Either both places should use lock or both places should use Interlocked operations.

This does not always repro, but it reproes often enough that we have seen the same issue filled in the past (e.g. #90085).

@jkotas jkotas reopened this Jul 24, 2024
@jkotas
Copy link
Member

jkotas commented Jul 24, 2024

This bug was introduced in #71703. cc @imcarolwang @HongGit

@SamMonoRT
Copy link
Member

@HongGit - assigning to you for tracking. Please adjust milestone based on your investigation and estimated timeline for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Transactions blocking-clean-ci-optional Blocking optional rolling runs bug Known Build Error Use this to report build issues in the .NET Helix tab os-windows
Projects
None yet
Development

No branches or pull requests

5 participants