[Mono-bugs] [Bug 463999] New: System.Transactions unit tests fail randomly

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 6 20:16:17 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=463999


           Summary: System.Transactions unit tests fail randomly
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: vargaz at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


The unit tests for System.Transactions fail randomly:

1) MonoTests.System.Transactions.AsyncTest.AsyncFail3 : Expected
TransactionAbortedException, got System.Runtime.Remoting.RemotingException
at MonoTests.System.Transactions.AsyncTest.AsyncFail3 () [0x00099] in
/raid/home/zovarga/mono-svn/mcs/class/System.Transactions/Test/AsyncTest.cs:117
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00057] in
/raid/home/zovarga/mono-svn/mcs/class/corlib/System.Reflection/MonoMethod.cs:159

It is easier to repro this by running mono with MONO_NO_SMP=1

The underlying exception is this:

System.Runtime.Remoting.RemotingException: The async result object is null or
of an unexpected type.
  at (wrapper managed-to-native)
object:__icall_wrapper_mono_delegate_end_invoke (object,intptr)
  at (wrapper delegate-end-invoke)
System.Transactions.Transaction/AsyncCommit:end_invoke_void__this___IAsyncResult
(System.IAsyncResult)
  at System.Transactions.Transaction.EndCommitInternal (IAsyncResult ar)
[0x00000] in
/raid/home/zovarga/mono-svn/mcs/class/System.Transactions/System.Transactions/Transaction.cs:282
  at System.Transactions.CommittableTransaction.EndCommit (IAsyncResult ar)
[0x00017] in
/raid/home/zovarga/mono-svn/mcs/class/System.Transactions/System.Transactions/CommittableTransaction.cs:64
  at MonoTests.System.Transactions.AsyncTest.CommitCallback (IAsyncResult ar)
[0x0001e] in
/raid/home/zovarga/mono-svn/mcs/class/System.Transactions/Test/AsyncTest.cs:86

The cause seems to be this line in CommitableTransaction.cs:

                        asyncResult = BeginCommitInternal (cb);

and this in EndCommit ():
                        EndCommitInternal (asyncResult);

basically, BeginCommitInterval will invoke a delegate asynchronously, and
the delegate calls EndCommit (), which will pass asyncResult to
EndCommitInternal (), but asyncResult is not yet set since BeginCommitInterval
() might not have returned yet.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list