The reason that sybsystemprocs..sp_fgl_toptables was blocked is because it collects the number of rows to show on the top tables view. Since the table was exclusively blocked, this action was blocked.
Here are more details on how this can be reproduced:
run in one session:
LOCK TABLE deadlock1 IN EXCLUSIVE MODE
UPDATE deadlock2 SET val='y'
And in another session just this piece of code from sybsystemprocs..sp_fgl_toptables:
|SELECT TabRowCount = CONVERT (numeric(19,0), row_count (Obj.DBID, Obj.ObjectID)) |
from master..monOpenObjectActivity Obj
where UsedCount > 0 OR LockRequests > 0 OR LogicalReads > 100
order by LogicalReads desc
In order to get row_count the SP try to get to the table – that it locked.
© 2020 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Conditions d’utilisation Confidentialité