FIX: QRY_PROFILE_LIST_MUTEX is blocked when TF 7412 is enabled in SQL Server 2016 and 2017

Applies to: SQL Server 2016 DeveloperSQL Server 2016 EnterpriseSQL Server 2016 Enterprise Core

Symptoms


Consider the following scenario:

  • You enable the Trace Flag (TF) 7412 in Microsoft SQL Server 2016 or 2017.
  • You have a session N where you run a command that updates an underlying index and also generates a missing index warning.
  • From session M, you run the Dynamic Management Functions (DMF) sys.dm_exec_query_statistics_xml(N) pointing to session N.

In this situation, you may notice that the command is blocked with wait type QRY_PROFILE_LIST_MUTEX, the DMF is unable to complete the execution and both the sessions seem to be hung.

Resolution


Service pack information for SQL Server 2016

This issue is fixed in the following service pack for SQL Server: 

       Service Pack 2 for SQL Server 2016

This issue is fixed in the following cumulative update for SQL Server:

Cumulative Update 13 for SQL Server 2017

Status


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

References


Learn about the terminology that Microsoft uses to describe software updates.