<deadlock-list><deadlock victim="process975948"><process-list><process id="process975948" taskpriority="0" logused="1200" waitresource="KEY: 7:72057896813723648 (12b7fb17bed7)" waittime="3406" ownerId="246136309" transactionname="implicit_transaction" lasttranstarted="2013-05-20T15:42:05.577" XDES="0x68e80b940" lockMode="U" schedulerid="3" kpid="3932" status="suspended" spid="111" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-05-20T15:42:06.613" lastbatchcompleted="2013-05-20T15:42:06.577" lastattention="2013-05-20T15:42:02.660" clientapp="Microsoft Dynamics NAV Classic client" hostname="XXX" hostpid="5564" loginname="xxx" isolationlevel="repeatable read (3)" xactid="246136309" currentdb="7" lockTimeout="15000" clientoption1="671156320" clientoption2="128058"><executionStack><frame procname="adhoc" line="1" stmtstart="146" sqlhandle="0x02000000b9909a38cb14cedec052fade5f1ef4575410c630"> SELECT SUM("Quantity (Base)") FROM "xxx"."dbo"."xxx$Reservation Entry" WITH (UPDLOCK) WHERE (("Source ID"=@P1)) AND (("Source Ref_ No_"=@P2)) AND (("Source Type"=@P3)) AND (("Source Subtype"=@P4)) AND (("Source Batch Name"=@P5)) AND (("Source Prod_ Order Line"=@P6)) AND (("Reservation Status"=@P7)) </frame><frame procname="unknown" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"> unknown </frame></executionStack><inputbuf> (@P1 varchar(20),@P2 int,@P3 int,@P4 int,@P5 varchar(10),@P6 int,@P7 int)SELECT SUM("Quantity (Base)") FROM "xxx_NAV"."dbo"."xxx$Reservation Entry" WITH (UPDLOCK) WHERE (("Source ID"=@P1)) AND (("Source Ref_ No_"=@P2)) AND (("Source Type"=@P3)) AND (("Source Subtype"=@P4)) AND (("Source Batch Name"=@P5)) AND (("Source Prod_ Order Line"=@P6)) AND (("Reservation Status"=@P7)) </inputbuf></process><process id="processc14bf8508" taskpriority="0" logused="1380" waitresource="KEY: 7:72057896813723648 (a6489cbaee4e)" waittime="3334" ownerId="246138565" transactionname="implicit_transaction" lasttranstarted="2013-05-20T15:42:05.990" XDES="0x823deee80" lockMode="U" schedulerid="7" kpid="2932" status="suspended" spid="139" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-05-20T15:42:06.683" lastbatchcompleted="2013-05-20T15:42:06.680" lastattention="2013-05-20T15:42:00.293" clientapp="Microsoft Dynamics NAV Classic client" hostname="xxx" hostpid="10808" loginname="xxxALTIC\t.juska" isolationlevel="repeatable read (3)" xactid="246138565" currentdb="7" lockTimeout="15000" clientoption1="671156320" clientoption2="128058"><executionStack><frame procname="adhoc" line="1" stmtstart="168" sqlhandle="0x0200000002d0bf09a7d26c3a37fee9983219bb238fbbe7ae"> SELECT TOP 51 * FROM "xxx_NAV"."dbo"."xxx$Reservation Entry" WITH (UPDLOCK) WHERE (("Source ID"=@P1)) AND (("Source Ref_ No_"=@P2)) AND (("Source Type"=@P3)) AND (("Source Subtype"=@P4)) AND (("Source Batch Name"=@P5)) AND (("Source Prod_ Order Line"=@P6)) AND (("Qty_ to Handle (Base)"<>@P7)) ORDER BY "Source ID","Source Ref_ No_","Source Type","Source Subtype","Source Batch Name","Source Prod_ Order Line","Reservation Status","Shipment Date","Expected Receipt Date","Entry No_","Positive" </frame><frame procname="mssqlsystemresource.sys.sp_execute" line="1" sqlhandle="0x0400ff7fb925310a01000000000000000000000000000000"> sp_execute </frame></executionStack><inputbuf> (@P1 varchar(20),@P2 int,@P3 int,@P4 int,@P5 varchar(10),@P6 int,@P7 decimal(38,20))SELECT TOP 51 * FROM "xxx_NAV"."dbo"."xxx$Reservation Entry" WITH (UPDLOCK) WHERE (("Source ID"=@P1)) AND (("Source Ref_ No_"=@P2)) AND (("Source Type"=@P3)) AND (("Source Subtype"=@P4)) AND (("Source Batch Name"=@P5)) AND (("Source Prod_ Order Line"=@P6)) AND (("Qty_ to Handle (Base)"<>@P7)) ORDER BY "Source ID","Source Ref_ No_","Source Type","Source Subtype","Source Batch Name","Source Prod_ Order Line","Reservation Status","Shipment Date","Expected Receipt Date","Entry No_","Positive" </inputbuf></process></process-list><resource-list><keylock hobtid="72057896813723648" dbid="7" objectname="xxx_NAV.dbo.xxx$Reservation Entry" indexname="$1" id="lock1536505700" mode="X" associatedObjectId="72057896813723648"><owner-list><owner id="processc14bf8508" mode="X"/></owner-list><waiter-list><waiter id="process975948" mode="U" requestType="wait"/></waiter-list></keylock><keylock hobtid="72057896813723648" dbid="7" objectname="xxx_NAV.dbo.xxx$Reservation Entry" indexname="$1" id="lock1534aff880" mode="X" associatedObjectId="72057896813723648"><owner-list><owner id="process975948" mode="X"/></owner-list><waiter-list><waiter id="processc14bf8508" mode="U" requestType="wait"/></waiter-list></keylock></resource-list></deadlock></deadlock-list>
Hi,
I don't understand, why the process already having X lock on the KEY, would request U lock on it?
How can two processes deadlock on the same KEY??