Microsoft KB Archive/153802

= FIX: Deadlock During Cursor Update Causes CPU Spin and Spinloop =

Article ID: 153802

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q153802





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: kbfix kbnetwork KB153802

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.