I don't understand how this deadlock even gets started, it seems to say that process C8 has a U lock at the same time process 48 has an S lock on the same object. Shouldn't that be prevented right there? Shouldn't one wait on the other?
Then they both want to upgrade, the U to an X, the S to a U.
The statements are both simple updates by the clustered identity PK to the table, to a modest number of rows, maybe around 50.
Here's the resource list:
---
resource-list
keylock hobtid=72057594828095488 dbid=5 objectname=MYDB.dbo.mytable indexname=mytable$mytable_pk id=lock25a75e200 mode=U associatedObjectId=72057594828095488
owner-list
owner id=process3e194c8 mode=U
waiter-list
waiter id=process404d048 mode=U requestType=convert
keylock hobtid=72057594828095488 dbid=5 objectname=MYDB.dbo.mytable indexname=mytable$mytable_pk id=lock25a75e200 mode=U associatedObjectId=72057594828095488
owner-list
owner id=process404d048 mode=S
waiter-list
waiter id=process3e194c8 mode=X requestType=convert
---
There are a ton of indexes and a number of FKs on the table, and indexes on at least most of the FKs, in case that matters - but I saw it mentioned on a related thread:
Also, both processes were (I think) inside of open transactions.
Thanks.
Josh