Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Need help with 10-process deadlock

$
0
0

Deadlocks similar to this one have now happened 7 times, and it seems to be causing problems with the app, so I need to figure this out. Its a SQL 2008 Server Standard virtualized server running on Windows 2008 64-bit with 1 CPU and 4 GB memory. According to the deadlock XML, there are 10 processes involved, and only one resource, a KeyLock on a single value of the primary key of the DOFAnalysis table. The DOFAnalysis table has 64 columns, of which 12 are varchar(max) columns. So, how could a deadlock occur on only 1 resource--wouldn't there at least have to be 2? And the victim is only 1 process, indicating that it must be a circular deadlock and not a 9 process-against-1 process deadlock. I have uploaded the deadlock XML as "code". Thanks for your help.

<deadlock><victim-list><victimProcess id="processb6906748"/></victim-list><process-list><process id="processb6906748" taskpriority="0" logused="0" waitresource="KEY: 23:72057594055884800 (ac005e8606d9)" waittime="14923" ownerId="98445273" transactionname="implicit_transaction" lasttranstarted="2013-07-30T08:49:35.913" XDES="0xc08d2e90" lockMode="S" schedulerid="1" kpid="2376" status="suspended" spid="56" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:36.113" lastbatchcompleted="2013-07-30T08:49:36.103" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read committed (2)" xactid="98445273" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="78" sqlhandle="0x020000009b13bf34e8f904014ab641e2788694d02b83244c"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000),@P1 nvarchar(4000))select max(actiondate) from legis.legmeasureversion where legmeasureid = (    select lmv.legmeasureid    from dof.dofanalysis a    inner join legis.legmeasureversion lmv on a.legmeasureversionid = lmv.legmeasureversionid    where a.dofanalysisid = @P0 ) and legmeasureversionid &lt;= (    select a.legmeasureversionid    from dof.dofanalysis a    where a.dofanalysisid = @P1 ) and versionaction in (&apos;Amended Assembly&apos;, &apos;Amended Senate&apos;);                    </inputbuf></process><process id="process86a7e508" taskpriority="0" logused="0" waitresource="KEY: 23:72057594055884800 (ac005e8606d9)" waittime="7378" ownerId="98447737" transactionname="implicit_transaction" lasttranstarted="2013-07-30T08:49:37.380" XDES="0xbad63970" lockMode="S" schedulerid="1" kpid="2736" status="suspended" spid="163" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:43.623" lastbatchcompleted="2013-07-30T08:49:43.607" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read committed (2)" xactid="98447737" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="40" sqlhandle="0x020000000186b23313dc0523ffeeec88adfb1761f9121cf1"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000))select a.dofanalysisid, lmv.legmeasureid, a.analysisname, a.typecd, a.amenddate, (case when a.dofanalysisid = lm2.workingcopyanalysisid then &apos;Y&apos; else &apos;N&apos; end) workingcopy, s.analysisstatusdesc, a.lastupddate from dof.legmeasure2 lm2 inner join legis.legmeasureversion lmv on lmv.legmeasureid = lm2.legmeasureid inner join dof.dofanalysis a on a.legmeasureversionid = lmv.legmeasureversionid inner join reference.AnalysisStatus s on a.analysisstatuscd = s.analysisstatuscd where lmv.legmeasureid = @P0 order by workingcopy desc, dofanalysisid asc            </inputbuf></process><process id="process8032bb88" taskpriority="0" logused="0" waitresource="KEY: 23:72057594055884800 (ac005e8606d9)" waittime="13166" ownerId="98447729" transactionname="implicit_transaction" lasttranstarted="2013-07-30T08:49:37.373" XDES="0xbef0d970" lockMode="S" schedulerid="1" kpid="2020" status="suspended" spid="165" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:37.503" lastbatchcompleted="2013-07-30T08:49:37.500" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read committed (2)" xactid="98447729" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="382" sqlhandle="0x0200000076a9033503990da147bfb1ab43570995f9a51558"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 nvarchar(4000),@P3 nvarchar(4000),@P4 nvarchar(4000),@P5 nvarchar(4000),@P6 nvarchar(4000),@P7 nvarchar(4000),@P8 nvarchar(4000),@P9 nvarchar(4000))select top 1900 * from dof.vwAllCurLegMeasures where EBRDueDateData is not null and ctrl_unit_id in (@P0, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9) order by lmSort                                                                                    </inputbuf></process><process id="processc3782988" taskpriority="0" logused="0" waitresource="KEY: 23:72057594055884800 (ac005e8606d9)" waittime="13047" ownerId="98448955" transactionname="implicit_transaction" lasttranstarted="2013-07-30T08:49:37.633" XDES="0xbed2d680" lockMode="S" schedulerid="1" kpid="2248" status="suspended" spid="151" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:37.703" lastbatchcompleted="2013-07-30T08:49:37.670" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read committed (2)" xactid="98448955" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="40" sqlhandle="0x02000000dbb3cd2fd23c21f88088d2720b26a13baafb211b"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000))select * from dof.vwAllCurLegMeasures where pos_id = @P0 order by lmSort            </inputbuf></process><process id="processc3783b88" taskpriority="0" logused="0" waitresource="KEY: 23:72057594055884800 (ac005e8606d9)" waittime="12936" ownerId="98449701" transactionname="implicit_transaction" lasttranstarted="2013-07-30T08:49:37.853" XDES="0xc36b2dd0" lockMode="S" schedulerid="1" kpid="2908" status="suspended" spid="169" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:37.900" lastbatchcompleted="2013-07-30T08:49:37.880" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read committed (2)" xactid="98449701" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="40" sqlhandle="0x02000000dbb3cd2fd23c21f88088d2720b26a13baafb211b"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000))select * from dof.vwAllCurLegMeasures where pos_id = @P0 order by lmSort            </inputbuf></process><process id="processc3783dc8" taskpriority="0" logused="0" waitresource="KEY: 23:72057594055884800 (ac005e8606d9)" waittime="12923" ownerId="98448956" transactionname="implicit_transaction" lasttranstarted="2013-07-30T08:49:37.633" XDES="0xbd7d83b0" lockMode="S" schedulerid="1" kpid="2792" status="suspended" spid="172" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:37.910" lastbatchcompleted="2013-07-30T08:49:37.890" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read committed (2)" xactid="98448956" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="230" sqlhandle="0x0200000075f1fc170109a20bd214b89b141daccab075b82d"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 nvarchar(4000),@P3 nvarchar(4000),@P4 nvarchar(4000),@P5 nvarchar(4000))select * from dof.vwAllCurLegMeasures where pos_id in (@P0, @P1, @P2, @P3, @P4, @P5) order by lmSort                                                    </inputbuf></process><process id="process86a7e088" taskpriority="0" logused="0" waitresource="KEY: 23:72057594055884800 (ac005e8606d9)" waittime="9973" ownerId="98451745" transactionname="implicit_transaction" lasttranstarted="2013-07-30T08:49:38.163" XDES="0xbb2773c0" lockMode="S" schedulerid="1" kpid="3560" status="suspended" spid="167" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:38.180" lastbatchcompleted="2013-07-30T08:49:38.177" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read committed (2)" xactid="98451745" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="154" sqlhandle="0x020000008804b8319ecf772957bbc0d7c86c4ce1455e93d1"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 nvarchar(4000),@P3 nvarchar(4000))select * from dof.vwAllCurLegMeasures where pos_id in (@P0, @P1, @P2, @P3) order by lmSort                                    </inputbuf></process><process id="processc3783948" taskpriority="0" logused="0" waitresource="KEY: 23:72057594055884800 (ac005e8606d9)" waittime="12363" ownerId="98452054" transactionname="implicit_transaction" lasttranstarted="2013-07-30T08:49:38.460" XDES="0xb57dccc0" lockMode="S" schedulerid="1" kpid="3632" status="suspended" spid="161" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:38.497" lastbatchcompleted="2013-07-30T08:49:38.477" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read committed (2)" xactid="98452054" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="40" sqlhandle="0x02000000dbb3cd2fd23c21f88088d2720b26a13baafb211b"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000))select * from dof.vwAllCurLegMeasures where pos_id = @P0 order by lmSort            </inputbuf></process><process id="process807d4748" taskpriority="0" logused="0" waitresource="KEY: 23:72057594055884800 (ac005e8606d9)" waittime="7209" ownerId="98447738" transactionname="implicit_transaction" lasttranstarted="2013-07-30T08:49:37.380" XDES="0xc1775970" lockMode="S" schedulerid="1" kpid="2508" status="suspended" spid="134" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:43.827" lastbatchcompleted="2013-07-30T08:49:43.813" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read committed (2)" xactid="98447738" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="40" sqlhandle="0x020000000186b23313dc0523ffeeec88adfb1761f9121cf1"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000))select a.dofanalysisid, lmv.legmeasureid, a.analysisname, a.typecd, a.amenddate, (case when a.dofanalysisid = lm2.workingcopyanalysisid then &apos;Y&apos; else &apos;N&apos; end) workingcopy, s.analysisstatusdesc, a.lastupddate from dof.legmeasure2 lm2 inner join legis.legmeasureversion lmv on lmv.legmeasureid = lm2.legmeasureid inner join dof.dofanalysis a on a.legmeasureversionid = lmv.legmeasureversionid inner join reference.AnalysisStatus s on a.analysisstatuscd = s.analysisstatuscd where lmv.legmeasureid = @P0 order by workingcopy desc, dofanalysisid asc            </inputbuf></process><process id="processc3783288" taskpriority="0" logused="20000" waittime="1883" schedulerid="1" kpid="2904" status="suspended" spid="113" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-30T08:49:49.157" lastbatchcompleted="2013-07-30T08:49:49.137" clientapp="Microsoft JDBC Driver for SQL Server" hostname="lis.local" hostpid="0" loginname="LIS_App" isolationlevel="read uncommitted (1)" xactid="98444971" currentdb="23" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058"><executionStack><frame procname="" line="1" stmtstart="116" sqlhandle="0x020000006a6e080479359b2ab636bb4473eb605e6b3c2a80"></frame><frame procname="" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000"></frame></executionStack><inputbuf>
(@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 nvarchar(4000))select top 1 case when u1.ctrl_unit_id = u2.ctrl_unit_id then p1.pos_dof_cd else &apos;&apos; end as PreparerDOFCode from dof.vwfitb_employee e1 inner join dof.vwfitb_position p1 on e1.emp_id = p1.emp_id inner join dof.vwfitb_unit u1 on p1.unit_id = u1.unit_id inner join (select top 1 pos_dof_cd, isnull(pos_vacant_date, &apos;12/31/9999&apos;) proxy_vacant_date from dof.vwfitb_position where pos_inactive_date is null and emp_id = @P0 order by proxy_vacant_date desc) q on q.pos_dof_cd = p1.pos_dof_cd, dof.vwfitb_employee e2 inner join dof.vwfitb_position p2 on e2.emp_id = p2.emp_id inner join dof.vwfitb_unit u2 on p2.unit_id = u2.unit_id where p1.pos_inactive_date is null and e1.emp_id = @P1  and p2.pos_id = @P2                            </inputbuf></process></process-list><resource-list><keylock hobtid="72057594055884800" dbid="23" objectname="" indexname="" id="locke5761c80" mode="X" associatedObjectId="72057594055884800"><owner-list><owner id="processc3783288" mode="X"/></owner-list><waiter-list><waiter id="processb6906748" mode="S" requestType="wait"/></waiter-list></keylock><keylock hobtid="72057594055884800" dbid="23" objectname="" indexname="" id="locke5761c80" mode="X" associatedObjectId="72057594055884800"><owner-list/><waiter-list><waiter id="process86a7e508" mode="S" requestType="wait"/></waiter-list></keylock><keylock hobtid="72057594055884800" dbid="23" objectname="" indexname="" id="locke5761c80" mode="X" associatedObjectId="72057594055884800"><owner-list/><waiter-list><waiter id="process8032bb88" mode="S" requestType="wait"/></waiter-list></keylock><keylock hobtid="72057594055884800" dbid="23" objectname="" indexname="" id="locke5761c80" mode="X" associatedObjectId="72057594055884800"><owner-list/><waiter-list><waiter id="processc3782988" mode="S" requestType="wait"/></waiter-list></keylock><keylock hobtid="72057594055884800" dbid="23" objectname="" indexname="" id="locke5761c80" mode="X" associatedObjectId="72057594055884800"><owner-list/><waiter-list><waiter id="processc3783b88" mode="S" requestType="wait"/></waiter-list></keylock><keylock hobtid="72057594055884800" dbid="23" objectname="" indexname="" id="locke5761c80" mode="X" associatedObjectId="72057594055884800"><owner-list/><waiter-list><waiter id="processc3783dc8" mode="S" requestType="wait"/></waiter-list></keylock><keylock hobtid="72057594055884800" dbid="23" objectname="" indexname="" id="locke5761c80" mode="X" associatedObjectId="72057594055884800"><owner-list/><waiter-list><waiter id="process86a7e088" mode="S" requestType="wait"/></waiter-list></keylock><keylock hobtid="72057594055884800" dbid="23" objectname="" indexname="" id="locke5761c80" mode="X" associatedObjectId="72057594055884800"><owner-list/><waiter-list><waiter id="processc3783948" mode="S" requestType="wait"/></waiter-list></keylock><keylock hobtid="72057594055884800" dbid="23" objectname="" indexname="" id="locke5761c80" mode="X" associatedObjectId="72057594055884800"><owner-list/><waiter-list><waiter id="process807d4748" mode="S" requestType="wait"/></waiter-list></keylock><resourceWait><owner-list><owner id="process8032bb88"/><owner id="processc3782988"/><owner id="processc3783b88"/><owner id="processc3783dc8"/><owner id="processc3783948"/><owner id="process86a7e088"/><owner id="process86a7e508"/><owner id="process807d4748"/></owner-list><waiter-list><waiter id="processc3783288"/></waiter-list></resourceWait></resource-list></deadlock>


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>