Problem statement:

SQL Server crashes when executing a stored procedure, that calls a table value function, that inserts into a memory optimized user defined table with a hash index.

Steps to reproduce:

  1. Have a SQL Server instance to poke around on
    • make a safe, reproducible environment like so:
    • docker run -P -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=Testing123@@' microsoft/mssql-server-linux
    • note the exposed port to connect to later with docker ps
  2. Run the scripts in order
  3. Observe the crash when step 6 executes
    • stack trace shown in logs
    • stack dump on disk