runtime icon indicating copy to clipboard operation
runtime copied to clipboard

AsyncTransactionScopeTests.AsyncTSTest failed in CI

Open stephentoub opened this issue 10 years ago • 25 comments

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()

stephentoub avatar Sep 30 '16 13:09 stephentoub

Again here: http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/centos7.1_debug_prtest/1268/

ericeil avatar Oct 06 '16 20:10 ericeil

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 avatar Oct 11 '16 00:10 jimcarley

@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.

danmoseley avatar Nov 16 '16 17:11 danmoseley

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 avatar Nov 16 '16 17:11 jimcarley

@jimcarley did you get a chance to turn on the logging? I'm trying to keep all the CI failure issues moving along.

danmoseley avatar Nov 21 '16 17:11 danmoseley

@jimcarley ?

danmoseley avatar Nov 29 '16 05:11 danmoseley

Sorry. I was out on vacation. We have a person working on enabling logging within the test.

jimcarley avatar Nov 29 '16 16:11 jimcarley

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()

jiangzeng avatar Dec 08 '16 01:12 jiangzeng

@jimcarley could you give an update -- did the logging go in?

danmoseley avatar Dec 16 '16 21:12 danmoseley

Not yet. Qi is working on it. She has a PR outstanding.

jimcarley avatar Dec 16 '16 21:12 jimcarley

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.

qizhanMS avatar Jan 03 '17 17:01 qizhanMS

OK, let's close this until it happens again. @jiangzeng please reactivate if it does.

danmoseley avatar Jan 04 '17 17:01 danmoseley

Thanks for the logging!

danmoseley avatar Jan 04 '17 17:01 danmoseley

@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 avatar Jan 04 '17 19:01 karelz

@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.

qizhanMS avatar Jan 04 '17 19:01 qizhanMS

I see, sorry for confusion then.

karelz avatar Jan 04 '17 19:01 karelz

Thanks for replying, Qi. I was in the process of writing a reply, but you beat me to it.

jimcarley avatar Jan 04 '17 19:01 jimcarley

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>

danmoseley avatar Jul 22 '17 05:07 danmoseley

@qizhanMS which file would the logging be in?

danmoseley avatar Jul 22 '17 05:07 danmoseley

https://mc.dot.net/#/user/danmosemsft/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/59bc20a58c0b3a277811d4010e2a51e2eb513c5a/workItem/System.Transactions.Local.Tests/wilogs

danmoseley avatar Jul 22 '17 05:07 danmoseley