Microsoft KB Archive/326896

= FIX: Rollback of Bound Transaction May Cause Assertion Errors =

Article ID: 326896

Article Last Modified on 10/11/2005

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q326896



BUG #: 102795 (SQLBUG_70)



SYMPTOMS
Under rare conditions, when a bound transaction is rolled back, you may receive the following assertion failure error messages:

2002-07-18 13:27:01.34 spid9   Process 9 was expected to hold lock on page (1:2591).

2002-07-18 13:27:24.46 kernel  SQL Server Assertion: File: ,  Line=2825 Failed Assertion = 'sid >= m_slotCnt || m_slots[-sid].offset ==0'. 2002-07-18 13:27:24.49 spid9   Error: 3624, Level: 20, State: 1.

2002-07-18 13:27:25.23 spid9   Error: 3314, Level: 21, State: 4 2002-07-18 13:27:25.23 spid9   Error while undoing logged operation in database 'test'. Error at log record ID (193:288:22).

2002-07-18 13:27:25.39 spid9   Error: 9001, Level: 21, State: 1 2002-07-18 13:27:25.39 spid9   The log for database 'test' is not available.

Also, several of the following 3307 error messages may be logged in the SQL Server error log:

Process 9 was expected to hold lock on page (1:2591)



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Microsoft SQL Server 7.0 service pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date       Time     Version    Size       File name           Description ---

7/24/2002 2:13:02  7.00.1034  5,054,736  Sqlservr.exe bytes  SP3-Based Fix 9/6/2002  7:56:26  7.00.1077  5,058,832  Sqlservr.exe bytes  SP4-Based Fix NOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.



WORKAROUND


STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
Generally, this problem occurs when the following is true:
 * Two connections participate in a single bound connection by using the sp_getbindtoken and the sp_bindsession stored procedures, or through Microsoft Distributed Transaction Coordinator (MS DTC).
 * The bound connection sets its own transaction isolation level to SERIALIZABLE or REPEATABLE READ.
 * The bound connection starts a transaction.
 * When one connection in the bound connection runs a SELECT statement on a table, and then the other connection in the bound connection runs a DELETE statement on the same table, the lock escalation threshold is exceeded and escalated in a table lock.
 * If a third connection that does not participate in the bound connection tries to use the same table to insert a row in the page where the deleted rows were, it is blocked by the table lock of the bound transaction.
 * At this point, if the bound transaction is rolled back, the assertion and the error message listed earlier in this article may occur, depending on how much free space is available.

Keywords: kbbug kbfix kbqfe kbsqlserv700presp5fix kbhotfixserver KB326896

-

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

© Microsoft Corporation. All rights reserved.