Question

We have seen this a few times. I'm sure there is some sort of NHibernate issue with MSDTC however why doesn't NserviceBus send the exception to the error queue instead of crashing the Host process? We have seen the exception in both 3.2.6 and 3.3.3

This also happened on the 17th before we did the endpoint upgrade at 7:34AM

Log Name: Application Source: Application Error Date: 12/17/2012 7:34:20 AM Event ID: 1000 Task Category: (100) Level: Error Keywords: Classic User: N/A Computer: 411357-SVCS01.daxko.local Description: Faulting application name: NServiceBus.Host.exe, version: 3.2.6.0, time stamp: 0x4ffd66f8 Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c Exception code: 0xe0434352 Fault offset: 0x000000000000cacd Faulting process id: 0x2200 Faulting application start time: 0x01cddc556e2ef369 Faulting application path: D:\store\endpoints\Production\OnlineRegistrationEndpoint\NServiceBus.Host.exe Faulting module path: C:\Windows\system32\KERNELBASE.dll Report Id: 75b6c18c-484e-11e2-b05c-0050568e4fb1 Event Xml: 1000 2 100 0x80000000000000 40360 Application 411357-SVCS01.daxko.local NServiceBus.Host.exe 3.2.6.0 4ffd66f8 KERNELBASE.dll 6.1.7601.17651 4e21213c e0434352 000000000000cacd 2200 01cddc556e2ef369 D:\store\endpoints\Production\OnlineRegistrationEndpoint\NServiceBus.Host.exe C:\Windows\system32\KERNELBASE.dll 75b6c18c-484e-11e2-b05c-0050568e4fb1

Log Name: Application Source: .NET Runtime Date: 12/17/2012 7:34:18 AM Event ID: 1026 Task Category: None Level: Error Keywords: Classic User: N/A Computer: 411357-SVCS01.daxko.local Description: Application: NServiceBus.Host.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException Stack: at NHibernate.AdoNet.ConnectionManager.Disconnect() at NHibernate.Impl.SessionImpl.Close() at NHibernate.Impl.SessionImpl.Dispose(Boolean) at NHibernate.Transaction.AdoNetWithDistrubtedTransactionFactory+<>c_DisplayClass1.b_0(System.Object, System.Transactions.TransactionEventArgs) at System.Transactions.TransactionCompletedEventHandler.Invoke(System.Object, System.Transactions.TransactionEventArgs) at System.Transactions.TransactionStatePromotedAborted.EnterState(System.Transactions.InternalTransaction) at System.Transactions.InternalTransaction.DistributedTransactionOutcome(System.Transactions.InternalTransaction, System.Transactions.TransactionStatus) at System.Transactions.Oletx.RealOletxTransaction.FireOutcome(System.Transactions.TransactionStatus) at System.Transactions.Oletx.OutcomeEnlistment.InvokeOutcomeFunction(System.Transactions.TransactionStatus) at System.Transactions.Oletx.OletxTransactionManager.ShimNotificationCallback(System.Object, Boolean) at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(System.Object, Boolean)

Event Xml: 1026 2 0 0x80000000000000 40359 Application 411357-SVCS01.daxko.local Application: NServiceBus.Host.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException Stack: at NHibernate.AdoNet.ConnectionManager.Disconnect() at NHibernate.Impl.SessionImpl.Close() at NHibernate.Impl.SessionImpl.Dispose(Boolean) at NHibernate.Transaction.AdoNetWithDistrubtedTransactionFactory+<>c_DisplayClass1.<EnlistInDistributedTransactionIfNeeded>b_0(System.Object, System.Transactions.TransactionEventArgs) at System.Transactions.TransactionCompletedEventHandler.Invoke(System.Object, System.Transactions.TransactionEventArgs) at System.Transactions.TransactionStatePromotedAborted.EnterState(System.Transactions.InternalTransaction) at System.Transactions.InternalTransaction.DistributedTransactionOutcome(System.Transactions.InternalTransaction, System.Transactions.TransactionStatus) at System.Transactions.Oletx.RealOletxTransaction.FireOutcome(System.Transactions.TransactionStatus) at System.Transactions.Oletx.OutcomeEnlistment.InvokeOutcomeFunction(System.Transactions.TransactionStatus) at System.Transactions.Oletx.OletxTransactionManager.ShimNotificationCallback(System.Object, Boolean) at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(System.Object, Boolean)

Was it helpful?

Solution

I got a response from the NServicebus forums that explains a fix and reason for NServiceBus not being able to handle the exception. http://tech.groups.yahoo.com/group/nservicebus/message/17328

After googling this, it looks like it is a bug in NHibernate ( https://nhibernate.jira.com/browse/NH-2420 ) that should have been fixed in > 3 versions!

The reason your endpoint crashed and nothing is sent to the error queue is because this is an unhandled exception in a background thread.

I'm not sure if there is anything we can do to prevent this from happening!

On 19 December 2012 04:20, porsche4me1999 wrote: at NHibernate.AdoNet.ConnectionManager.Disconnect()

-- Regards John Simons NServiceBus

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top