Access violations and memory dump files when you use XEvent session with sqlos.wait_info event in SQL Server

Velja za: SQL Server 2012 EnterpriseSQL Server 2012 WebSQL Server 2012 Standard

Symptoms


Consider the following scenario:

  • You create an XEvent session that has a sqlos.wait_info event in Microsoft SQL Server.
  • In this session, you define a filter (predicate) in the following pattern:

    [sqlserver].[like_i_sql_unicode_string]([sqlserver].[sql_text],N'%<Query Text>')

In this scenario, you may experience any of the following problems:

  • SQL Server generates access violations or a stack overflow memory dump file.
  • SQL Server generates a non-yielding scheduler memory dump file.
  • Queries don’t return results, or you can't cancel or kill a query.
  • When SQL Server produces an EXCEPTION_ACCESS_VIOLATION exception and stack overflow memory dump file in the SQL Server Error Log, error messages that resemble either of the following messages are generated:
     
     
 

Workaround


To work around this problem, avoid using complex filter conditions together with the wait_info event. This is because the wait_info event is resource intensive and can slow down a query significantly.

If you want to track <Query Text> in this situation, change the Filter Predicate pattern to the following:

([sqlserver].[equal_i_sql_unicode_string]([sqlserver].[sql_text],N'<Query Text>').