FIX: Access violation in SQL Server internal deadlock monitor when you run multiple applications together with Multiple Active Result Sets enabled in SQL Server

Article translations Article translations
Article ID: 2723979 - View products that this article applies to.
Expand all | Collapse all

On This Page

Symptoms

Scenario 1:

Assume that you have multiple client applications that connect to an instance of Microsoft SQL Server 2008 R2, SQL Server 2012, or SQL Server 2014. Additionally, the Multiple Active Result Sets (MARS) feature is enabled in the connection strings. When multiple requests are being sent from these applications at the same time, deadlocks may occur when data is manipulated. In this situation, an access violation may occur in the SQL Server internal deadlock monitor.

Scenario 2:

Consider the following scenario:
  • You have applied cumulative update package 7 for Microsoft SQL Server 2012 SP1 on your computer.
  • You have multiple client applications that connect to an instance of SQL Server 2012.
  • The applications have a Distributed Transaction Coordinator (DTC) or Multiple Active Result Sets (MARS) transaction configured.
  • Multiple requests are sent from these applications at the same time, and deadlocks may occur when data is manipulated.
In this scenario, an access violation may occur in the SQL Server internal deadlock monitor.

Cause

This issue occurs because the transaction mutex is not updated with the new workspace. The deadlock monitor thread accesses this old workspace during lock enumeration, and the access violation occurs if the old workspace has been released or if it was not cleaned up properly.

Resolution

Cumulative update information

The issue was first fixed in the following cumulative update of SQL Server.

Cumulative Update 1 for SQL Server 2014

Cumulative Update 9 for SQL Server 2012 SP1

Cumulative Update 1 for SQL Server 2012 SP1

Cumulative Update 3 for SQL Server 2008 R2 SP2

Cumulative Update 4 for SQL Server 2012

Cumulative Update 8 for SQL Server 2008 R2 SP1

About cumulative updates for SQL Server

Collapse this imageExpand this image
assets folding start collapsed
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:
Collapse this imageExpand this image
assets folding end collapsed

Hotfix information

The hotfix updates the transaction mutex to use the new workspaces when workspaces are changed.

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.

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, submit a request to 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 website:
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.

Status

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

More information

For more information about how to enable the Multiple Active Result Sets (MARS) feature, go to the following MSDN website:
How to enable MARS

Properties

Article ID: 2723979 - Last Review: April 21, 2014 - Revision: 7.0
Applies to
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2008 R2 Web
  • Microsoft SQL Server 2008 R2 Workgroup
  • Microsoft SQL Server 2012 Developer
  • Microsoft SQL Server 2012 Enterprise
  • Microsoft SQL Server 2012 Standard
  • Microsoft SQL Server 2012 Web
  • Microsoft SQL Server 2012 Service Pack 1, when used with:
    • Microsoft SQL Server 2012 Developer
    • Microsoft SQL Server 2012 Enterprise
    • Microsoft SQL Server 2012 Standard
  • Microsoft SQL Server 2014 Developer
  • Microsoft SQL Server 2014 Enterprise
  • Microsoft SQL Server 2014 Standard
Keywords: 
kbtshoot kbqfe kbfix kbsurveynew kbexpertiseadvanced kbautohotfix KB2723979

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