FIX: Deadlock During Cursor Update Causes CPU Spin and Spinloop

ID: Q153802


The information in this article applies to:
  • Microsoft SQL Server version 6.5


SYMPTOMS

A group of updates through cursors that result in the cursor being a deadlock victim can cause the following error to appear in the error log:

closetable:table already closed for sdes %d

After this error occurs, the process can become unkillable, and its status in sysprocesses is marked as "spinloop." At this point SQL Server becomes very unresponsive and will often stop responding entirely, allowing no one to log on or shut it down. Processes that were accessing the tables become blocked.


CAUSE

When SQL Server is the victim of a deadlock during a cursor update, it incorrectly releases a processes structure. This can create a situation where the process cannot properly release its spin lock and will then block all other processes.


WORKAROUND

When using cursors for updates make sure they will not get into a deadlock situation


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. This problem was corrected in the latest Microsoft SQL Server U.S. Service Pack. For information on obtaining the Service Pack, query on the following word in the Microsoft Knowledge Base (without the spaces):


   S E R V P A C K 

Additional query words: lock

Keywords : kbnetwork SSrvErr_Log
Version : 6.5
Platform : WINDOWS
Issue type :


Last Reviewed: March 30, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.