CSS SQL Server Engineers

This is the official team Web Log for Microsoft Customer Service and Support (CSS) SQL Support. Posts are provided by the CSS SQL Escalation Services

SQLCLR and sp_OA* procedures are not compatible

SQLCLR and sp_OA* procedures are not compatible

Rate This
  • Comments 1

We ran into an issue today that is a bug you may need to be aware of because of its behavior.  

When a SQLCLR procedure calls back into the SQL Server (in proc provider) and executes sp_OA*, during the callback activity, it triggers a bug (currently filed and being evaluated) that results in heap corruption and the termination of the SQL Server process.  (The Microsoft security policy is clear that any detected heap corruption must result in process termination to reduce a possible injection attack vector(s).)

SQLCLR and sp_OA* can be used separately it is the callback from SQLCLR that triggers the bug behavior.   When the loopback occurs the activity can be assigned to a second worker thread.  The second worker and the parent worker are not handling the memory allocation properly, leading to the heap corruption.

SQL Server will NOT capture a mini-dump because of the process termination activity.  In order to capture detailed stack information you would need to use gflags or an external debugger.

Bob Dorr - Principal SQL Server Escalation Engineer

Leave a Comment
  • Please add 2 and 5 and type the answer here:
  • Post
Page 1 of 1 (1 items)