Hi,

From time to time we receive error reports telling us 'Deadlock' happened. I have no clue where to start looking for this since the stacktrace is pretty inconclusive. The only lead is the XTensive.Orm.Providers.NextRow() call. Below is the stack trace.

Regards Paul

16-4-2014 15:27 Error   Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.    System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
   at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
   at System.Data.SqlClient.SqlDataReader.Read()
   at Xtensive.Orm.Providers.Command.NextRow()
ClientConnectionId:4c6eab6b-abcc-4a8d-ba05-d99c79fdad1c

asked Apr 23 '14 at 06:18

Paul%20Sinnema's gravatar image

Paul Sinnema
261888896


2 Answers:

We added the Reprocessing Framework of X-Tensive to solve this. Since that was implemented we sparsely get deadlocks

answered Sep 17 '14 at 01:56

Paul%20Sinnema's gravatar image

Paul Sinnema
261888896

Hello Paul,

for diagnostics you could set SessionConfiguration.ReaderPreloading to ReaderPreloadingPolicy.Always. This setting will force DataObjects.Net to fetch all data from the DbDataReader before it is returned to user. This would allow you to trace exception to a specific query.

answered Apr 24 '14 at 06:13

Denis%20Krjuchkov's gravatar image

Denis Krjuchkov
179325

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×5
×1

Asked: Apr 23 '14 at 06:18

Seen: 53,886 times

Last updated: Sep 17 '14 at 01:56

powered by OSQA