Deadlock Report

Vijay Kumar 2,016 Reputation points
2021-03-29T18:47:18.277+00:00

2021-03-29 14:18:06.61 spid45s deadlock-list
2021-03-29 14:18:06.61 spid45s deadlock victim=process1022605f848 ---->
2021-03-29 14:18:06.61 spid45s process-list
2021-03-29 14:18:06.61 spid45s process id=process1022605f848 ---> taskpriority=0 logused=0 waitresource=KEY: 8:72058571181719552 (8f457811b5c3) waittime=1547 ownerId=4815203484 transactionname=user_transaction lasttranstarted=2021-03-29T14:17:39.277 XDES=0xbd7ae7f210 lockMode=U schedulerid=9 kpid=32168 status=suspended spid=80 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2021-03-29T14:18:05.067 lastbatchcompleted=2021-03-29T14:18:05.070 lastattention=1900-01-01T00:00:00.070 clientapp=.Net SqlClient Data Provider hostname=AKKUPWVISS012 hostpid=331024 loginname=US\SRCCAEIIS isolationlevel=serializable (4) xactid=4815203484 currentdb=8 currentdbname=TESTDB1 lockTimeout=4294967295 clientoption1=538968096 clientoption2=128056
2021-03-29 14:18:06.61 spid45s executionStack
2021-03-29 14:18:06.61 spid45s frame procname=TESTDB1.dbo.OrgMilestoneUpdate line=93 stmtstart=4738 stmtend=6694 sqlhandle=0x03000800ca3c6b6af6886701cdac000001000000000000000000000000000000000000000000000000000000
2021-03-29 14:18:06.61 spid45s UPDATE ORG_MILESTONE SET
2021-03-29 14:18:06.61 spid45s name = @DeezNutz ,
2021-03-29 14:18:06.61 spid45s role_mask = @Role,
2021-03-29 14:18:06.61 spid45s update_date = GetDate(),
2021-03-29 14:18:06.61 spid45s meta_data = @Metadata,
2021-03-29 14:18:06.61 spid45s consent = @Consent,
2021-03-29 14:18:06.61 spid45s pre_offset = @PreOffset,
2021-03-29 14:18:06.61 spid45s post_offset = @PostOffset,
2021-03-29 14:18:06.61 spid45s reminder_recurrence = @Recurrence,
2021-03-29 14:18:06.61 spid45s reminder_duration = @Duration,
2021-03-29 14:18:06.61 spid45s is_org_task = @IsTtask,
2021-03-29 14:18:06.61 spid45s notification_mask = @NotifMask,
2021-03-29 14:18:06.61 spid45s execution_meta_data = @ExecutionData,
2021-03-29 14:18:06.61 spid45s early_cost_id = @EarlyCostId,
2021-03-29 14:18:06.61 spid45s late_cost_id = @LateCostId,
2021-03-29 14:18:06.61 spid45s duration_type = (CASE WHEN @DurationType IS NULL THEN duration_type ELSE @DurationType END),
2021-03-29 14:18:06.61 spid45s text_id = NULL,
2021-03-29 14:18:06.61 spid45s user_id = @AssignedTo,
2021-03-29 14:18:06.61 spid45s VF_01 = @VF_01,
2021-03-29 14:18:06.61 spid45s VF_02 = @VF_02,
2021-03-29 14:18:06.61 spid45s VF_03 = @VF_03,
2021-03-29 14:18:06.61 spid45s VF_04 = @VF_04,
2021-03-29 14:18:06.61 spid45s VF_05 = @VF_05,
2021-03-29 14:18:06.61 spid45s VF_06 = @VF_06,
2021-03-29 14:18:06.61 spid45s VF_07 = @VF_07,
2021-03-29 14:18:06.61 spid45s VF_08 = @VF_08,
2021-03-29 14:18:06.61 spid45s VF_09 = @VF_09,
2021-03-29 14:18:06.61 spid45s VF_10 = @VF_10,
2021-03-29 14:18:06.61 spid45s member_goal_priority_id = @MemberGoalPriorityId,
2021-03-29 14:18:06.61 spid45s category_id = CASE @category_id WHEN 0 THEN NULL ELSE @category_id END
2021-03-29 14:18:06.61 spid45s WHERE
2021-03-29 14:18:06.61 spid45s id = @MilestoneI
2021-03-29 14:18:06.61 spid45s inputbuf
2021-03-29 14:18:06.61 spid45s Proc [Database Id = 8 Object Id = 1785412810]
2021-03-29 14:18:06.61 spid45s process id=process1022602fc28 taskpriority=0 logused=0 waitresource=KEY: 8:72058571181719552 (8f457811b5c3) waittime=1623 ownerId=4815389623 transactionname=user_transaction lasttranstarted=2021-03-29T14:17:59.483 XDES=0xa8bafcc590 lockMode=X schedulerid=3 kpid=32064 status=suspended spid=182 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2021-03-29T14:18:04.990 lastbatchcompleted=2021-03-29T14:18:04.993 lastattention=1900-01-01T00:00:00.993 clientapp=.Net SqlClient Data Provider hostname=AKKUPWVISS012 hostpid=331024 loginname=US\SRCCAEIIS isolationlevel=serializable (4) xactid=4815389623 currentdb=8 currentdbname=TESTDB1 lockTimeout=4294967295 clientoption1=538968096 clientoption2=128056
2021-03-29 14:18:06.61 spid45s executionStack
2021-03-29 14:18:06.61 spid45s frame procname=TESTDB1.dbo.OrgMilestoneUpdate line=93 stmtstart=4738 stmtend=6694 sqlhandle=0x03000800ca3c6b6af6886701cdac000001000000000000000000000000000000000000000000000000000000
2021-03-29 14:18:06.61 spid45s UPDATE ORG_MILESTONE SET
2021-03-29 14:18:06.61 spid45s name = @DeezNutz ,
2021-03-29 14:18:06.61 spid45s role_mask = @Role,
2021-03-29 14:18:06.61 spid45s update_date = GetDate(),
2021-03-29 14:18:06.61 spid45s meta_data = @Metadata,
2021-03-29 14:18:06.61 spid45s consent = @Consent,
2021-03-29 14:18:06.61 spid45s pre_offset = @PreOffset,
2021-03-29 14:18:06.61 spid45s post_offset = @PostOffset,
2021-03-29 14:18:06.61 spid45s reminder_recurrence = @Recurrence,
2021-03-29 14:18:06.61 spid45s reminder_duration = @Duration,
2021-03-29 14:18:06.61 spid45s is_org_task = @IsTtask,
2021-03-29 14:18:06.61 spid45s notification_mask = @NotifMask,
2021-03-29 14:18:06.61 spid45s execution_meta_data = @ExecutionData,
2021-03-29 14:18:06.61 spid45s early_cost_id = @EarlyCostId,
2021-03-29 14:18:06.61 spid45s late_cost_id = @LateCostId,
2021-03-29 14:18:06.61 spid45s duration_type = (CASE WHEN @DurationType IS NULL THEN duration_type ELSE @DurationType END),
2021-03-29 14:18:06.61 spid45s text_id = NULL,
2021-03-29 14:18:06.61 spid45s user_id = @AssignedTo,
2021-03-29 14:18:06.61 spid45s VF_01 = @VF_01,
2021-03-29 14:18:06.61 spid45s VF_02 = @VF_02,
2021-03-29 14:18:06.61 spid45s VF_03 = @VF_03,
2021-03-29 14:18:06.61 spid45s VF_04 = @VF_04,
2021-03-29 14:18:06.61 spid45s VF_05 = @VF_05,
2021-03-29 14:18:06.61 spid45s VF_06 = @VF_06,
2021-03-29 14:18:06.61 spid45s VF_07 = @VF_07,
2021-03-29 14:18:06.61 spid45s VF_08 = @VF_08,
2021-03-29 14:18:06.61 spid45s VF_09 = @VF_09,
2021-03-29 14:18:06.61 spid45s VF_10 = @VF_10,
2021-03-29 14:18:06.61 spid45s member_goal_priority_id = @MemberGoalPriorityId,
2021-03-29 14:18:06.61 spid45s category_id = CASE @category_id WHEN 0 THEN NULL ELSE @category_id END
2021-03-29 14:18:06.61 spid45s WHERE
2021-03-29 14:18:06.61 spid45s id = @MilestoneI
2021-03-29 14:18:06.61 spid45s inputbuf
2021-03-29 14:18:06.61 spid45s Proc [Database Id = 8 Object Id = 1785412810]
2021-03-29 14:18:06.61 spid45s resource-list
2021-03-29 14:18:06.62 spid45s keylock hobtid=72058571181719552 dbid=8 objectname=TESTDB1.dbo.ORG_MILESTONE indexname=PK_ORG_MILESTONE id=lockd7ed3bd000 mode=U associatedObjectId=72058571181719552
2021-03-29 14:18:06.62 spid45s owner-list
2021-03-29 14:18:06.62 spid45s owner id=process1022602fc28 mode=U
2021-03-29 14:18:06.62 spid45s owner id=process1022602fc28 mode=X requestType=convert
2021-03-29 14:18:06.62 spid45s waiter-list
2021-03-29 14:18:06.62 spid45s waiter id=process1022605f848 mode=U requestType=convert
2021-03-29 14:18:06.62 spid45s keylock hobtid=72058571181719552 dbid=8 objectname=TESTDB1.dbo.ORG_MILESTONE indexname=PK_ORG_MILESTONE id=lockd7ed3bd000 mode=U associatedObjectId=72058571181719552
2021-03-29 14:18:06.62 spid45s owner-list
2021-03-29 14:18:06.62 spid45s owner id=process1022605f848 mode=S
2021-03-29 14:18:06.62 spid45s owner id=process1022605f848 mode=U requestType=convert
2021-03-29 14:18:06.62 spid45s waiter-list
2021-03-29 14:18:06.62 spid45s waiter id=process1022602fc28 mode=X requestType=convert

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,654 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,551 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor
    2021-03-30T07:10:00.693+00:00

    Hi VijayKumar768,
    Please check this which might help:
    82650-01.jpg

    82632-02.jpg
    Best Regards,
    Amelia


1 additional answer

Sort by: Most helpful
  1. Erland Sommarskog 100.8K Reputation points MVP
    2021-03-29T21:56:45.6+00:00

    Both processes are running a multi-batch transaction.

    Furthermore, both processes are running with isolation level SERIALIZABLE, which means that when they read rows, they will hold sharead locks on them to the end protection. They also take range locks to prevent new rows to be inserted.

    My interpretation of the deadlock is that one of the processes has read a row X and is now trying to update row Y. However, the other processes has already updated that row, so it is blocking the first process. That other process is now trying to update row Y.

    I can't say how this situation should be resolved, as this requires knowledge about the application.

    0 comments No comments