-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 in System.Transactions.Tests.OleTxTests.Volatile_and_durable_enlistments #73874
Comments
Will take a look, thanks. |
Notes (mainly to self):
|
Make sure we don't accidentally set our state to initialized when an exception occurs. Related to dotnet#73874.
Make sure we don't accidentally set our state to initialized when an exception occurs. Related to #73874.
We are also seeing win-arm64 failures on this test in libraries-jitstress runs but with a different message. Message: Starting: System.Transactions.Local.Tests (parallel test collections = on, max threads = 8)
System.Transactions.Tests.OleTxTests.Volatile_and_durable_enlistments(volatileCount: 0) [FAIL]
System.Transactions.TransactionException : The operation is not valid for the state of the transaction.
---- System.Transactions.TransactionManagerCommunicationException : Communication with the underlying transaction manager has failed.
-------- System.Runtime.InteropServices.COMException : The Transaction Manager is not available. (0x8004D01B)
Stack Trace:
/_/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionState.cs(203,0): at System.Transactions.TransactionState.EnlistDurable(InternalTransaction tx, Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction)
/_/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionState.cs(552,0): at System.Transactions.EnlistableStates.EnlistDurable(InternalTransaction tx, Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction)
/_/src/libraries/System.Transactions.Local/src/System/Transactions/Transaction.cs(503,0): at System.Transactions.Transaction.EnlistDurable(Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions)
/_/src/libraries/System.Transactions.Local/tests/OleTxTests.cs(109,0): at System.Transactions.Tests.OleTxTests.Volatile_and_durable_enlistments(Int32 volatileCount)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
/_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(64,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
----- Inner Stack Trace -----
/_/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/OletxTransactionManager.cs(613,0): at System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException)
/_/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/DtcTransactionManager.cs(63,0): at System.Transactions.Oletx.DtcTransactionManager.Initialize()
/_/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/DtcTransactionManager.cs(79,0): at System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
/_/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/OletxTransactionManager.cs(448,0): at System.Transactions.Oletx.OletxTransactionManager.CreateTransaction(TransactionOptions properties)
/_/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionState.cs(2172,0): at System.Transactions.TransactionStatePromoted.EnterState(InternalTransaction tx)
----- Inner Stack Trace -----
at System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionImportWhereabouts.GetWhereaboutsSize(UInt32& pcbSize)
/_/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcProxyShimFactory.cs(87,0): at System.Transactions.DtcProxyShim.DtcProxyShimFactory.<>c__DisplayClass10_0.<ConnectToProxy>b__0()
/_/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/OletxHelper.cs(41,0): at System.Transactions.DtcProxyShim.OletxHelper.Retry(Action action)
/_/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcProxyShimFactory.cs(87,0): at System.Transactions.DtcProxyShim.DtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, Object managedIdentifier, Boolean& nodeNameMatches, Byte[]& whereabouts, ResourceManagerShim& resourceManagerShim)
/_/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/DtcTransactionManager.cs(38,0): at System.Transactions.Oletx.DtcTransactionManager.Initialize() |
@jakobbotsch thanks. Yeah, I suspect the root cause here is the same as the NRT posted above, #73918 may eliminate the NRT itself and make the real exception propagate. As written above, tes Volatile_and_durable_enlistments with volatileCount=0 is the very first test which communicates with MSDTC, and the stack trace shows the communication failure happening on the very first attempt to connect to it (ConnectToProxy). MSDTC has an on-demand feature, where it's disabled by default on Windows boot, and then the first call to it (DtcGetTransactionManagerEx) starts is "on demand". This call throws XACT_E_TMNOTAVAILABLE, but only on the very first connection; so I suspect that in our CI environment the MSDTC starts too slowly or similar, causing the first failure, but by the time the 2nd test runs, all is OK. I'll work around this by using a class fixture to trigger DtcGetTransactionManagerEx multiple times, as necessary, before the first test runs. If we see users complaining about this, we can consider some sort of loop inside Sys.Tx itself. |
Test failure in System.Transactions.Tests.OleTxTests, found in https://github.com/dotnet/runtime/pull/73748/checks?check_run_id=7812731906
LOG: https://helix.dot.net/api/2019-06-17/jobs/3d6ddf47-29eb-453d-96aa-7f19f2e55bc6/workitems/System.Transactions.Local.Tests/console
The text was updated successfully, but these errors were encountered: