Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

During Microsoft SQL Server startup, you notice one or more of the following symptoms immediately after database recovery is complete and client connections are enabled.

Symptom 1

You receive error messages and assertions that resemble the following in your SQL Server error log:

2014-12-13 08:03:34.85 spid24s Using 'dbghelp.dll' version '4.0.5'
2014-12-13 08:03:34.85 spid24s **Dump thread - spid = 0, EC = 0x0000000082274B20
2014-12-13 08:03:34.85 spid24s ***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008R2\MSSQL\LOG\SQLDump0001.txt
2014-12-13 08:03:34.85 spid24s * *******************************************************************************
2014-12-13 08:03:34.85 spid24s *
2014-12-13 08:03:34.85 spid24s * BEGIN STACK DUMP:
2014-12-13 08:03:34.85 spid24s * 12/13/14 08:03:34 spid 24
2014-12-13 08:03:34.85 spid24s *
2014-12-13 08:03:34.85 spid24s * Location: ghost.cpp:1742
2014-12-13 08:03:34.85 spid24s * Expression: tcln1 != NULL
2014-12-13 08:03:34.85 spid24s * SPID: 24
2014-12-13 08:03:34.85 spid24s * Process ID: 35444
2014-12-13 08:03:34.85 spid24s *

2014-12-13 08:03:35.47 spid24s Error: 17066, Severity: 16, State: 1.
2014-12-13 08:03:35.47 spid24s SQL Server Assertion: File: <ghost.cpp>, line=1742 Failed Assertion = 'tcln1 != NULL'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.

Symptom 2

You receive error messages and exceptions that resemble the following in your SQL Server error log:

2014-12-13 12:38:30.25 spid51 Using 'dbghelp.dll' version '4.0.5'
2014-12-13 12:38:30.25 spid51 ***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008R2\MSSQL\LOG\SQLDump0003.txt
2014-12-13 12:38:30.25 spid51 SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2014-12-13 12:38:30.25 spid51 * *******************************************************************************
2014-12-13 12:38:30.25 spid51 *
2014-12-13 12:38:30.25 spid51 * BEGIN STACK DUMP:
2014-12-13 12:38:30.25 spid51 * 12/13/14 12:38:30 spid 51
2014-12-13 12:38:30.25 spid51 *
2014-12-13 12:38:30.25 spid51 *
2014-12-13 12:38:30.25 spid51 * Exception Address = 000000000030D47C Module(sqlservr+00000000000FD47C)
2014-12-13 12:38:30.25 spid51 * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
2014-12-13 12:38:30.25 spid51 * Access Violation occurred reading address FFFFFFFFFFFFFFFF
2014-12-13 12:38:30.25 spid51 * Input Buffer 54 bytes -
2014-12-13 12:38:30.25 spid51 * exec usp_select1

2014-12-13 12:38:30.77 Server Error: 17310, Severity: 20, State: 1.
2014-12-13 12:38:30.77 Server A user request from the session with SPID 51 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.

The Access Violation will have the following call stack:

sqlservr!TaskGhostCleanup::IsHashed+0x8d
sqlservr!TaskGhostCleanup::Enqueue+0x32
sqlservr!IndexRowScanner::MoveToRowOnNextPage+0x9c
sqlservr!IndexDataSetSession::GetNextRowValuesInternal+0x11cb

Symptom 3

After you receive the messages that are mentioned in the previous symptom sections, you receive the following messages in the SQL Server error log:

2014-12-13 08:04:53.37 Server Process 0:0:0 (0x23c8) Worker 0x000000002880C1A0 appears to be non-yielding on Scheduler 23. Thread creation time: 13062953007877. Approx Thread CPU Used: kernel 0 ms, user 0 ms. Process Utilization 0%. System Idle 88%. Interval: 70013 ms.
2014-12-13 08:04:53.37 Server Process 0:0:0 (0x71d8) Worker 0x000000002A8D21A0 appears to be non-yielding on Scheduler 30. Thread creation time: 13062953007891. Approx Thread CPU Used: kernel 0 ms, user 0 ms. Process Utilization 0%. System Idle 88%. Interval: 70013 ms.
2014-12-13 08:04:53.38 Server ***Unable to get thread context for spid 0
2014-12-13 08:04:53.38 Server * *******************************************************************************
2014-12-13 08:04:53.38 Server *
2014-12-13 08:04:53.38 Server * BEGIN STACK DUMP:
2014-12-13 08:04:53.38 Server * 12/13/14 08:04:53 spid 29488
2014-12-13 08:04:53.38 Server *
2014-12-13 08:04:53.38 Server * Non-yielding Scheduler
2014-12-13 08:04:53.38 Server *
2014-12-13 08:04:53.38 Server * *******************************************************************************
2014-12-13 08:04:53.38 Server Stack Signature for the dump is 0x0000000000000341
2014-12-13 08:04:55.43 Server External dump process return code 0x20000001. External dump process returned no errors.
2014-12-13 08:04:55.43 Server Process 0:0:0 (0x9358) Worker 0x0000000081CE41A0 appears to be non-yielding on Scheduler 4. Thread creation time: 13062953009701. Approx Thread CPU Used: kernel 0 ms, user 15 ms. Process Utilization 0%. System Idle 88%. Interval: 70011 ms.


SQL Server may be unresponsive to user requests at this point. If this is the case, you must restart the service to correct the situation.

Cause

This problem occurs because user queries try to use the ghost cleanup queues before this process is fully initialized.

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:


Workaround

To work around this problem, follow these steps:

  1. Configure -T669 as startup parameter. This trace flags prevents user queries from queuing requests to the ghost cleanup process.

  2. Set up a SQL Server Agent alert to trigger a job on SQL Msg 3408. For example, set up the following alert:

    Recovery is complete. This is an informational message only. No user action is required.

  3. Inside this job, run a TSQL script to wait for 5 to 10 minutes, and then run the DBCC TRACEOFF (669,-1) command.

This procedure makes sure that this trace flag is active only during SQL Server startup. The use of this trace flag does not affect the usual functioning of the background ghost cleanup process.

Status

Microsoft has confirmed that this is a problem with SQL Server and is currently investigating a fix for this issue. This Knowledge Base article will be updated with additional information as it becomes available.

References

Inside the Storage Engine: Ghost cleanup in depth

Alerts

sp_add_alert (Transact-SQL)

DBCC TRACEOFF (Transact-SQL)

Trace Flags

Database Engine Startup Options

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×