AsyncTransactionScopeTests.AsyncTSTest failed in CI
http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/osx_debug_prtest/821/consoleText
System.Transactions.Tests.AsyncTransactionScopeTests.AsyncTSTest [FAIL]
System.AggregateException : One or more errors occurred. (Assert.Equal() Failure
Expected: Transaction { IsolationLevel = (throws ObjectDisposedException), PromoterType = (throws ObjectDisposedException), TransactionInformation = (throws ObjectDisposedException) }
Actual: (null))
---- Assert.Equal() Failure
Expected: Transaction { IsolationLevel = (throws ObjectDisposedException), PromoterType = (throws ObjectDisposedException), TransactionInformation = (throws ObjectDisposedException) }
Actual: (null)
Finished: System.Numerics.Vectors.Tests
Stack Trace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Transactions.Tests.AsyncTransactionScopeTests.AsyncTSTest()
----- Inner Stack Trace -----
at System.Transactions.Tests.AsyncTransactionScopeTests.AssertTransactionNull()
at System.Transactions.Tests.AsyncTransactionScopeTests.AssertTransaction(String txId)
at System.Transactions.Tests.AsyncTransactionScopeTests.SyncTSL3AsyncTSL2NestedTxWork(Boolean parentRequiresNew, Boolean childL2RequiresNew, Boolean childL3RequiresNew, Boolean asyncChildL3, Boolean asyncWorkBeforeChildL3, Boolean asyncWorkAfterChildL3, String txId)
at System.Transactions.Tests.AsyncTransactionScopeTests.<>c.<AsyncTSTest>b__4_11()
at System.Threading.Tasks.Task.Execute()
Again here: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_debug_prtest/1268/
Well, these builds are now gone, so I don't see how I can dig deeper.
In the first failure (osx_debug_prtest 821), it looks like the test expected Transaction.Current to be "null", but in fact it contained a Transaction object which was already disposed.
In the second failure (centos7.1_debug_prtest1268), I have no data as to what the failure might have been.
@jimcarley what's the next step here -- more logging? We can close this issue, but without reason to believe it is fixed, it will get reopened again eventually.
Now that we have tracing capabilities inside System.Transactions itself, I am looking into turning on that tracing for this test to get more information.
@jimcarley did you get a chance to turn on the logging? I'm trying to keep all the CI failure issues moving along.
@jimcarley ?
Sorry. I was out on vacation. We have a person working on enabling logging within the test.
Happening on build 20161207.04. https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20161207.04/workItem/System.Transactions.Tests/analysis/xunit/System.Transactions.Tests.AsyncTransactionScopeTests~2FAsyncTSTest
Suse.132.Amd64-AnyCPU-Release
Unhandled Exception of Type System.AggregateException
Message :
System.AggregateException : One or more errors occurred. (Assert.Equal() Failure\nExpected: Transaction { IsolationLevel = (throws ObjectDisposedException), PromoterType = (throws ObjectDisposedException), TransactionInformation = (throws ObjectDisposedException) }\nActual: (null))\n---- Assert.Equal() Failure\nExpected: Transaction { IsolationLevel = (throws ObjectDisposedException), PromoterType = (throws ObjectDisposedException), TransactionInformation = (throws ObjectDisposedException) }\nActual: (null)
Stack Trace :
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Transactions.Tests.AsyncTransactionScopeTests.AsyncTSTest()
----- Inner Stack Trace -----
at System.Transactions.Tests.AsyncTransactionScopeTests.AssertTransaction(String txId)
at System.Transactions.Tests.AsyncTransactionScopeTests.DoTaskUnderAsyncTS(Boolean requiresNew, String txId)
at System.Threading.Tasks.Task.Execute()
@jimcarley could you give an update -- did the logging go in?
Not yet. Qi is working on it. She has a PR outstanding.
Added tracing in AsyncTransactionScopeTests in pull request dotnet/corefx#14544 . If the test failed again, we will be able to get tracing information for further investigation.
OK, let's close this until it happens again. @jiangzeng please reactivate if it does.
Thanks for the logging!
@qizhanMS sadly, there is currently no way to collect ETW traces from a test failure in our infra (it's on infra backlog together with dump and hang dump collection).
We will need someone to manually run the test in a loop on a machine with ETW tracing explicitly turned on to track down the root cause. Reopening ...
@karelz We added ETW trace listener on this particular test case, if it fails, we will have the ETW trace information in test result file.
I see, sorry for confusion then.
Thanks for replying, Qi. I was in the process of writing a reply, but you beat me to it.
https://mc.dot.net/#/user/danmosemsft/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/59bc20a58c0b3a277811d4010e2a51e2eb513c5a/workItem/System.Transactions.Local.Tests/analysis/xunit/System.Transactions.Tests.AsyncTransactionScopeTests~2FAsyncTSTest(variation:%209)
unfortunately I do not see anything extra in the test result file:
<test name="System.Transactions.Tests.AsyncTransactionScopeTests.AsyncTSTest(variation: 9)" type="System.Transactions.Tests.AsyncTransactionScopeTests" method="AsyncTSTest" time="0.0291742" result="Fail">
<failure exception-type="System.AggregateException">
<message><![CDATA[System.AggregateException : One or more errors occurred. (Assert.Equal() Failure\nExpected: (null)\nActual: Transaction { IsolationLevel = (throws ObjectDisposedException), PromoterType = (throws ObjectDisposedException), TransactionInformation = (throws ObjectDisposedException) })\n---- Assert.Equal() Failure\nExpected: (null)\nActual: Transaction { IsolationLevel = (throws ObjectDisposedException), PromoterType = (throws ObjectDisposedException), TransactionInformation = (throws ObjectDisposedException) }]]></message>
<stack-trace><![CDATA[ at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Transactions.Tests.AsyncTransactionScopeTests.<>c__DisplayClass6_0.<AsyncTSTest>b__0() in /mnt/j/workspace/dotnet_corefx/master/linux-TGroup_netcoreapp+CGroup_Release+AGroup_x64+TestOuter_false_prtest/src/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs:line 156
at System.Transactions.Tests.TestEventListener.RunWithCallback(Action`1 handler, Action body) in /mnt/j/workspace/dotnet_corefx/master/linux-TGroup_netcoreapp+CGroup_Release+AGroup_x64+TestOuter_false_prtest/src/System.Transactions.Local/tests/TransactionTracingEventListener.cs:line 104
at System.Transactions.Tests.AsyncTransactionScopeTests.AsyncTSTest(Int32 variation) in /mnt/j/workspace/dotnet_corefx/master/linux-TGroup_netcoreapp+CGroup_Release+AGroup_x64+TestOuter_false_prtest/src/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs:line 417
----- Inner Stack Trace -----
at System.Transactions.Tests.AsyncTransactionScopeTests.DoTaskUnderAsyncTS(Boolean requiresNew, String txId) in /mnt/j/workspace/dotnet_corefx/master/linux-TGroup_netcoreapp+CGroup_Release+AGroup_x64+TestOuter_false_prtest/src/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs:line 1609
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)]]></stack-trace>
</failure>
</test>
@qizhanMS which file would the logging be in?
https://mc.dot.net/#/user/danmosemsft/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/59bc20a58c0b3a277811d4010e2a51e2eb513c5a/workItem/System.Transactions.Local.Tests/wilogs