Duplicate resource on deadlock xml



  • As I was debugging a deadlock, I noticed that in the xml's resource-list, the first and third object locks are the same. Is there some reason for this?

    The verbatim:

     
      
       
        
       
       
        
       
      
      
       
        
       
       
        
       
      
      
       
        
       
       
        
       
      
     
    


  • It is not the same. If you look at it more closely the "owner id" is different. This is 'Schema Modification' lock. SQL Server only allows one schema modification lock.

    On the first one it is owned by process194df0e5468 and it is granted. On the third one, it is requested by process1947a066ca8 and waiting, since the first one already has the lock.

    This is https://michaeljswart.com/2013/04/the-sch-m-lock-is-evil/ about this lock by Michael J.Swart.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2