FIX: Rollback in Single User Database Causes Msg 3307 and AV (160584)



The information in this article applies to:

  • Microsoft SQL Server 6.0
  • Microsoft SQL Server 6.5

This article was previously published under Q160584
BUG #: 15657 (Windows NT: 6.0)
       16163 (6.5)
		

SYMPTOMS

If a transaction is rolled back in a 'single user' database, a Msg 3307 error will occur, followed by a handled access violation. The server will stop responding, and no connections or queries will be allowed into the server at this point.

WORKAROUND

To work around this problem, avoid rolling back transactions in a 'single user' database.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server versions 6.0 and 6.5. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.

MORE INFORMATION

When this problem occurs, the following type of error information is returned to the client application (specific process and page information will likely be different for each scenario):
Msg 3307, Level 21, State 1
Process 13 was expected to hold logical lock on page 544.
Error while undoing log row in database 'pubs'. Rid pageid is 0x315 and
row num is 0x8.
The SQL Server is terminating this process.

The following error information is written to the SQL Server errorlog:
spid13 Error : 3307, Severity: 21, State: 1
spid13 Process 13 was expected to hold logical lock on page 544.
spid13 Error : 3307, Severity: 21, State: 1
spid13 Process 13 was expected to hold logical lock on page 544.
kernel WARNING: Process being freed while holding Dataserver semaphore
spid-1 Error : 3307, Severity: 21, State: 1
spid-1 Process -1 was expected to hold logical lock on page 544.
[handled access violation information follows these messages]



This problem may occur if the transaction is rolled back explicitly using the ROLLBACK command, or if the client connection is terminated before the transaction can be committed. SQL Server may stop responding under this scenario, and cannot be shut down normally as a service. If the server was started from the command line, it may be possible to shut it down by using a CTRL+C key sequence. In either case, when the server is restarted, this transaction should be properly rolled back by recovery.

Modification Type:MajorLast Reviewed:10/16/2003
Keywords:kbBug kbfix kbusage KB160584