FIX: A deadlock occurs and a query never finishes when you run the query on a computer that is running SQL Server 2005 and has multiple processors

Article translations Article translations
Article ID: 923605 - View products that this article applies to.
Bug #: 1124 (SQL Hotfix)
Notice
Microsoft distributes Microsoft SQL Server 2005 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release.
Expand all | Collapse all

On This Page

This article describes the following about this hotfix release:
  • The issues that are fixed by this hotfix package
  • The prerequisites for installing the hotfix package
  • Information about whether you must restart the computer after you install the hotfix package
  • Information about whether the hotfix package is replaced by any other hotfix package
  • Information about whether you must make any registry changes
  • The files that are contained in the hotfix package

SYMPTOMS

When you run a query on a computer that is running SQL Server 2005 and has multiple processors, a deadlock occurs, and the query never finishes. Additionally, error messages that resemble the following are logged in the SQL Server 2005 Errorlog file:
2006-06-23 18:40:57.24 spid51 Drop Temp Obj: Failed, serializing drops...
2006-06-23 18:41:07.24 spid4s Deadlock encountered .... Printing deadlock information
2006-06-23 18:41:07.24 spid4s Wait-for graph
2006-06-23 18:41:07.24 spid4s
2006-06-23 18:41:07.24 spid4s Node:1
2006-06-23 18:41:07.24 spid4s OBJECT: 2:2103730597:0 CleanCnt:3 Mode:Sch-S Flags: 0x0
2006-06-23 18:41:07.24 spid4s Grant List 0:
2006-06-23 18:41:07.24 spid4s Owner:0x00000000FB68B780 Mode: Sch-S Flg:0x0 Ref:16 Life:00000000 SPID:51 ECID:0 XactLockInfo: 0x00000000D6D1AD78
2006-06-23 18:41:07.24 spid4s SPID: 51 ECID: 0 Statement Type: EXECUTE Line #: 123
2006-06-23 18:41:07.24 spid4s Input Buf: Language Event: <SQL STATEMENT>
2006-06-23 18:41:07.24 spid4s Requested By:
2006-06-23 18:41:07.24 spid4s ResType:LockOwner Stype:'OR'Xdes:0x00000000D6D1B9F0 Mode: Sch-M SPID:51 BatchID:0 ECID:0 TaskProxy:(0x00000000B16BA570) Value:0x801807c0 Cost:(N/A)
2006-06-23 18:41:07.24 spid4s Deadlock monitor failed to resolve this deadlock. Server may require restart to recover from this condition

2006-06-23 18:41:07.24 spid4s Using 'dbghelp.dll' version '4.0.5'
2006-06-23 18:41:07.24 spid18s deadlock-list
2006-06-23 18:41:07.24 spid18s deadlock victim=process0
2006-06-23 18:41:07.24 spid18s process-list
2006-06-23 18:41:07.24 spid18s process id=processea4718 waitresource=OBJECT: 2:2103730597:0 waittime=10000 ownerId=184497 transactionname=droptemp lasttranstarted=2006-06-23T18:40:57.243 XDES=0xd6d1b9f0 lockMode=Sch-M schedulerid=2 kpid=808 status=suspended spid=51 sbid=0 ecid=0 priority=0 transcount=1 lastbatchstarted=2006-06-23T18:38:46.930 lastbatchcompleted=2006-06-23T18:38:46.930 clientapp=SQL Query Analyzer hostname=FOO hostpid=1234 loginname=DOMAIN\USER isolationlevel=read committed (2) xactid=172623 currentdb=11 lockTimeout=4294967295 clientoption1=673187936 clientoption2=128056
2006-06-23 18:41:07.24 spid18s executionStack
2006-06-23 18:41:07.24 spid18s frame procname=database.dbo.storedprocedure line=123 stmtstart=43720 stmtend=43986 sqlhandle=0x03000b003589375d7cb53201e99700000100000000000000
2006-06-23 18:41:07.24 spid18s <SQL STATEMENT>
2006-06-23 18:41:07.24 spid18s frame procname=adhoc line=2 stmtstart=34 stmtend=116 sqlhandle=0x01000b009d96c716f07b76ab000000000000000000000000
2006-06-23 18:41:07.24 spid18s <SQL STATEMENT>
2006-06-23 18:41:07.24 spid18s inputbuf
2006-06-23 18:41:07.24 spid18s <SQL STATEMENT>
2006-06-23 18:41:07.24 spid18s resource-list
2006-06-23 18:41:07.24 spid18s objectlock lockPartition=0 objid=2103730597 subresource=FULL dbid=2 objectname=tempdb.dbo.#7D6461A5 id=lockbb29f600 mode=Sch-S associatedObjectId=2103730597
2006-06-23 18:41:07.24 spid18s owner-list
2006-06-23 18:41:07.24 spid18s owner id=processea4718 mode=Sch-S
2006-06-23 18:41:07.24 spid18s waiter-list
2006-06-23 18:41:07.24 spid18s waiter id=processea4718 mode=Sch-M requestType=wait
2006-06-23 18:41:07.24 spid4s **Dump thread - spid = 4, PSS = 0x000000008011EB40, EC = 0x000000008011EB50
2006-06-23 18:41:07.24 spid4s ***Stack Dump being sent to c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
2006-06-23 18:41:07.24 spid4s *
2006-06-23 18:41:07.24 spid4s * BEGIN STACK DUMP:
2006-06-23 18:41:07.24 spid4s * 08/01/07 15:54:00 spid 4
2006-06-23 18:41:07.24 spid4s *
2006-06-23 18:41:07.24 spid4s * Unresolved deadlock **************************************************
This problem occurs if table variables are used in a transaction.

RESOLUTION

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

You must have SQL Server 2005 Service Pack 1 (SP1) installed to apply this hotfix.

For more information about how to obtain SQL Server 2005 Service Pack 1, click the following article number to view the article in the Microsoft Knowledge Base:
913089 How to obtain the latest service pack for SQL Server 2005

Restart information

You do not have to restart the computer after you apply this hotfix.

Registry information

You do not have to change the registry.

Hotfix file information

This hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain of all the files that you must have to fully update a product to the latest build.

The English version of this hotfix has the file attributes (or later file attributes) 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 item in Control Panel.
SQL Server 2005 hotfix, 32-bit
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Logread.exe2005.90.2181.0398,11215-Aug-200608:28x86
Microsoft.analysisservices.adomdclient.dll9.0.2181.0543,52015-Aug-200608:28x86
Microsoft.analysisservices.deploymentengine.dll9.0.2181.0138,01615-Aug-200608:26x86
Microsoft.analysisservices.dll9.0.2181.01,215,26415-Aug-200608:26x86
Microsoft.sqlserver.mgdsqldumper.dll2005.90.2181.075,55215-Aug-200608:25x86
Microsoft.sqlserver.sqlenum.dll9.0.2181.0908,06415-Aug-200608:26x86
Msgprox.dll2005.90.2181.0197,92015-Aug-200608:28x86
Msmdlocal.dll9.0.2181.015,703,84015-Aug-200608:27x86
Msmdredir.dll9.0.2181.03,968,80015-Aug-200608:27x86
Mssqlsystemresource.ldfNot Applicable524,28814-Aug-200622:49Not Applicable
Mssqlsystemresource.mdfNot Applicable39,911,42414-Aug-200622:49Not Applicable
Replprov.dll2005.90.2181.0547,61615-Aug-200608:29x86
Replrec.dll2005.90.2181.0782,11215-Aug-200608:26x86
Sqlaccess.dll2005.90.2181.0347,93615-Aug-200608:28x86
Sqlagent90.exe2005.90.2181.0319,26415-Aug-200608:27x86
Sqlservr.exe2005.90.2181.028,951,38415-Aug-200608:27x86
Sysdbupg.sqlNot Applicable192,34619-Jul-200617:02Not Applicable
Xpstar90.dll2005.90.2181.0292,64015-Aug-200608:31x86
Xpstar90.rll2005.90.2181.0152,86415-Aug-200608:27x86
SQL Server 2005 hotfix, 64-bit
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Logread.exe2005.90.2181.0522,52815-Aug-200608:20x64
Microsoft.analysisservices.adomdclient.dll9.0.2181.0543,52015-Aug-200608:20x86
Microsoft.analysisservices.adomdclient.dll9.0.2181.0543,52015-Aug-200608:28x86
Microsoft.analysisservices.deploymentengine.dll9.0.2181.0138,01615-Aug-200608:26x86
Microsoft.analysisservices.dll9.0.2181.01,215,26415-Aug-200608:26x86
Microsoft.sqlserver.mgdsqldumper.dll2005.90.2181.091,42415-Aug-200608:19x64
Microsoft.sqlserver.mgdsqldumper.dll2005.90.2181.075,55215-Aug-200608:25x86
Microsoft.sqlserver.sqlenum.dll9.0.2181.0875,29615-Aug-200608:21x86
Msgprox.dll2005.90.2181.0259,36015-Aug-200608:20x64
Msmdlocal.dll9.0.2181.015,703,84015-Aug-200608:27x86
Msmdredir.dll9.0.2181.03,968,80015-Aug-200608:27x86
Mssqlsystemresource.ldfNot Applicable524,28814-Aug-200622:49Not Applicable
Mssqlsystemresource.mdfNot Applicable39,911,42414-Aug-200622:49Not Applicable
Replprov.dll2005.90.2181.0745,24815-Aug-200608:21x64
Replrec.dll2005.90.2181.01,008,41615-Aug-200608:19x64
Sqlaccess.dll2005.90.2181.0355,10415-Aug-200608:20x86
Sqlagent90.exe2005.90.2181.0390,94415-Aug-200608:20x64
Sqlservr.exe2005.90.2181.039,327,52015-Aug-200608:20x64
Sysdbupg.sqlNot Applicable192,34619-Jul-200617:02Not Applicable
Xpstar90.dll2005.90.2181.0540,44815-Aug-200608:20x64
Xpstar90.rll2005.90.2181.0153,37615-Aug-200608:19x64
SQL Server 2005 hotfix, 64-bit for Itanium processors
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Logread.exe2005.90.2181.01,095,45615-Aug-200608:20IA-64
Microsoft.analysisservices.adomdclient.dll9.0.2181.0543,52015-Aug-200608:19x86
Microsoft.analysisservices.adomdclient.dll9.0.2181.0543,52015-Aug-200608:28x86
Microsoft.analysisservices.deploymentengine.dll9.0.2181.0138,01615-Aug-200608:26x86
Microsoft.analysisservices.dll9.0.2181.01,215,26415-Aug-200608:26x86
Microsoft.sqlserver.mgdsqldumper.dll2005.90.2181.0163,10415-Aug-200608:18IA-64
Microsoft.sqlserver.mgdsqldumper.dll2005.90.2181.075,55215-Aug-200608:25x86
Microsoft.sqlserver.sqlenum.dll9.0.2181.0875,29615-Aug-200608:20x86
Msgprox.dll2005.90.2181.0542,49615-Aug-200608:19IA-64
Msmdlocal.dll9.0.2181.048,837,40815-Aug-200608:21IA-64
Msmdredir.dll9.0.2181.06,155,04015-Aug-200608:21IA-64
Mssqlsystemresource.ldfNot Applicable524,28814-Aug-200622:49Not Applicable
Mssqlsystemresource.mdfNot Applicable39,911,42414-Aug-200622:49Not Applicable
Replprov.dll2005.90.2181.01,617,18415-Aug-200608:21IA-64
Replrec.dll2005.90.2181.02,141,47215-Aug-200608:21IA-64
Sqlaccess.dll2005.90.2181.0349,47215-Aug-200608:19x86
Sqlagent90.exe2005.90.2181.01,143,58415-Aug-200608:20IA-64
Sqlservr.exe2005.90.2181.072,196,89615-Aug-200608:21IA-64
Sysdbupg.sqlNot Applicable192,34619-Jul-200617:02Not Applicable
Xpstar90.dll2005.90.2181.0950,56015-Aug-200608:22IA-64
Xpstar90.rll2005.90.2181.0152,35215-Aug-200608:18IA-64

WORKAROUND

To work around this problem, use one of the following methods:
  • Restart the SQL Server service to resolve the deadlock.
  • When this problem occurs, set the max degree of parallelism option to 1.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Call stack information

ChildEBP RetAddr  
05c3e720 7d4d8c46 ntdll!NtWaitForSingleObject+0x15
05c3e790 7d4d8bb5 kernel32!WaitForSingleObjectEx+0xac
05c3e7a4 02441816 kernel32!WaitForSingleObject+0x12
05c3e824 024413f2 sqlservr!CDmpDump::DumpInternal+0x311
05c3e860 02194394 sqlservr!CDmpDump::Dump+0x59
05c3e920 0218b8e2 sqlservr!CImageHelper::DoMiniDump+0x3d2
05c3f6d8 020e7fea sqlservr!stackTrace+0x6c8
05c3f77c 014683c0 sqlservr!DeadlockMonitor::ReportUnresolvable+0x286
05c3f7e0 01098d63 sqlservr!DeadlockMonitor::SearchAndResolve+0x219
05c3f834 01081d87 sqlservr!DeadlockMonitor::SearchTaskAndResolve+0xb3
05c3f8dc 01081dd5 sqlservr!DeadlockMonitor::WorkLoop+0x82a
05c3f960 02132481 sqlservr!lockMonitor+0xbf
05c3fd54 01006a96 sqlservr!lockMonitorThread+0x314
05c3fdc4 01006bbc sqlservr!SOS_Task::Param::Execute+0xe2
05c3fdf8 01006dab sqlservr!SOS_Scheduler::RunTask+0xb9
05c3fe38 01447562 sqlservr!SOS_Scheduler::ProcessTasks+0x141
05c3fea0 0144859b sqlservr!SchedulerManager::WorkerEntryPoint+0x1a8
05c3feb8 0144789a sqlservr!SystemThread::RunWorker+0x7f
05c3ff10 01447720 sqlservr!SystemThreadDispatcher::ProcessWorker+0x225
05c3ff78 781329aa sqlservr!SchedulerManager::ThreadEntryPoint+0x143
05c3ffb0 78132a36 msvcr80!_callthreadstartex+0x1b
05c3ffb8 7d4e0729 msvcr80!_threadstartex+0x66
05c3ffec 00000000 kernel32!BaseThreadStart+0x34

ChildEBP RetAddr  
0886e3b4 7d4d8c46 ntdll!NtWaitForSingleObject+0x15
0886e424 7d4d8bb5 kernel32!WaitForSingleObjectEx+0xac
0886e438 010032d2 kernel32!WaitForSingleObject+0x12
0886e5b0 010026f2 sqlservr!SOS_Scheduler::SwitchContext+0x232
0886e5c8 01001e93 sqlservr!SOS_Scheduler::SuspendNonPreemptive+0xb9
0886e5e0 01002b95 sqlservr!SOS_Scheduler::Suspend+0x2e
0886e604 01058926 sqlservr!SOS_Event::Wait+0x12a
0886e640 01058a3d sqlservr!LockOwner::Sleep+0x13e
0886e6e4 0100cc9f sqlservr!lck_lockInternal+0x990
0886e790 010209b0 sqlservr!RowsetLockCache::GetTableLock+0x31b
0886e7dc 011acb90 sqlservr!MDL::FLockObjectId+0x6c
0886e820 0124db73 sqlservr!CMEDCatalogObject::GetCachedObjectById+0x9b
0886e858 0197a4e1 sqlservr!CMEDProxyDatabase::GetObjectByObjectId+0x78
0886e90c 01c3a3fd sqlservr!FDropTempWithNolog+0x142
0886e934 019e823f sqlservr!TmpObject::Release+0x67
0886e950 019e842a sqlservr!CTableVariableManager::DropNormalTablesInCurScope+0x5c
0886e954 014ac4d3 sqlservr!CTableVariableManager::PopSqlScope+0x7
0886e960 0137c579 sqlservr!CExecLevel::PopSqlScopeInternal+0x69
0886e970 013676d1 sqlservr!CSQLSource::PopSqlScope+0x28
0886e9a0 013674c1 sqlservr!CStmtExecProc::XretLocalExec+0x2d6
0886efa4 01367356 sqlservr!CStmtExecProc::XretExecExecute+0x552
0886efc4 010251bc sqlservr!CXStmtExec::XretExecute+0x23
0886f058 01025741 sqlservr!CMsqlExecContext::ExecuteStmts<1,1>+0x360
0886f104 01023e34 sqlservr!CMsqlExecContext::FExecute+0x55b
0886f1c4 0136764a sqlservr!CSQLSource::Execute+0x73b
0886f200 013674c1 sqlservr!CStmtExecProc::XretLocalExec+0x1f6
0886f804 01367356 sqlservr!CStmtExecProc::XretExecExecute+0x552
0886f824 010251bc sqlservr!CXStmtExec::XretExecute+0x23
0886f8b8 01025741 sqlservr!CMsqlExecContext::ExecuteStmts<1,1>+0x360
0886f964 01023e34 sqlservr!CMsqlExecContext::FExecute+0x55b
0886fa24 01041dd5 sqlservr!CSQLSource::Execute+0x73b
0886fb9c 0103dfd4 sqlservr!process_request+0x2e3
0886fd54 01006a96 sqlservr!process_commands+0x2e0
0886fdc4 01006bbc sqlservr!SOS_Task::Param::Execute+0xe2
0886fdf8 01006dab sqlservr!SOS_Scheduler::RunTask+0xb9
0886fe38 01447562 sqlservr!SOS_Scheduler::ProcessTasks+0x141
0886fea0 0144859b sqlservr!SchedulerManager::WorkerEntryPoint+0x1a8
0886feb8 0144789a sqlservr!SystemThread::RunWorker+0x7f
0886ff10 01447720 sqlservr!SystemThreadDispatcher::ProcessWorker+0x225
0886ff78 781329aa sqlservr!SchedulerManager::ThreadEntryPoint+0x143
0886ffb0 78132a36 msvcr80!_callthreadstartex+0x1b
0886ffb8 7d4e0729 msvcr80!_threadstartex+0x66
0886ffec 00000000 kernel32!BaseThreadStart+0x34
s
For more information about the naming schema for Microsoft SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499 New naming schema for Microsoft SQL Server software update packages
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 923605 - Last Review: October 9, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
Keywords: 
kbautohotfix kbexpertiseadvanced kbtshoot kbfix kbsql2005engine kbHotfixServer kbqfe KB923605

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com