SYMPTOMS
If a process is killed while running a SELECT statement in which an
aggregate function is used with a DISTINCT keyword, the following error
message is displayed in the errorlog:
spid10 ex_testhandle: stack overflow, top=0x10a0ac8, end=0x10a0ac8
In addition, if the table from which the SELECT is run is a temporary
table, the following messages are displayed when the process is killed:
kernel udread: Operating system error 6(The handle is invalid.) on
device 'D:\MSSQL\DATA\MASTER.DAT' (virtpage 0x00000394).
kernel udwritem: Operating system error 6(The handle is invalid.) on
device 'D:\MSSQL\DATA\MASTER.DAT' (virtpage 0x00000b80).
If the SELECT is placed in a temporary stored procedure and it is selecting
from a temp table, then the following error is added to the errors above:
spid10 bufwait: timeout, BUF_IO, bp 0xca1420, pg 0x110, stat
0x1004/0x6, obj 0, bpss 0x109f598
This error message will continue to be entered in the errorlog until either
Windows NT or SQL Server is shut down. You will not be able to shut down
SQL Server using SQL Service Manager or by performing a "net stop
mssqlserver". At this point, the behavior of the server is somewhat
unpredictable. You may or may not be able to make new connections to the
server, but the existing connections appear to be stable.
However, if tempdb only has its original size of 2 MB on the master device,
when the process is killed, you will receive the following error instead:
Error: 1117, Severity: 21, State: 10
Extent chain for object -321 is not correctly linked.