0

This has been plaguing me for some time now. I run a tiny SQL Server 2019 CU10 Standard instance on Oracle Linux 7 (RHEL 7-compatable) that uses PolyBase to reference tables on an Oracle 19c Instance and include them in mixed queries.

Or at least, that's what I'm trying to do. In reality, including an External Table in a SQL Query is almost guaranteed to crash SQL Server with the following error.

This program has encountered a fatal error and cannot continue running at Fri Jun  4 18:13:32 2021
The following diagnostic information is available:

         Reason: 0x00000006
        Message: Kernel bug check
        Address: 0x3fffad644f10
     Parameters: 0x999284a90
    Stack Trace:
                 file://package5/windows/system32/sqlpal.dll+0x000000000029697A
                 file://package5/windows/system32/sqlpal.dll+0x000000000029493D
                 file://package5/windows/system32/sqlpal.dll+0x0000000000244F69
                 file:///windows/System32/Drivers/Afd.sys+0x00000000000079C7
                 file:///windows/System32/Drivers/Afd.sys+0x0000000000003EE3
                 file:///windows/System32/Drivers/Afd.sys+0x0000000000002041
                 file:///windows/System32/Drivers/Afd.sys+0x0000000000001AA0
                 file://package5/windows/system32/sqlpal.dll+0x00000000002443F1
                 file://package5/windows/system32/sqlpal.dll+0x0000000000242A58
                 file://package5/windows/system32/sqlpal.dll+0x000000000026B9DB
                 file://package5/windows/system32/sqlpal.dll+0x000000000026BD54
                 file://package5/windows/system32/sqlpal.dll+0x000000000026BC8D
                 file://package5/windows/system32/sqlpal.dll+0x000000000023620B
                 file://package5/windows/system32/sqlpal.dll+0x00000000002AA90B
                 file://package5/windows/system32/sqlpal.dll+0x00000000003887F8
                 file:///Windows/SYSTEM32/MSWSOCK.dll+0x000000000000D1BC
                 file:///Windows/SYSTEM32/WS2_32.dll+0x0000000000016800
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x0000000000078155
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x00000000000778FE
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x00000000000B9AA9
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x00000000000B9A5B
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x00000000001025D6
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x0000000000013941
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x0000000000084829
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x00000000000876E8
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x0000000000014364
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x0000000000086CD1
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x00000000000835A1
                 file:///binn/Polybase/ODBC Drivers/PolyBase ODBC Driver for Oracle/8.0.2/msora28.dll+0x000000000002C47B
                 file:///binn/Polybase/ODBC32.dll+0x000000000000764A
                 file:///binn/Polybase/ODBC32.dll+0x0000000000007217
        Process: 3324 - sqlservr
         Thread: 3711 (application thread 0x564)
    Instance Id: 216d3dce-196f-499c-b6f5-20a17810612c
       Crash Id: 1c6c3cf8-5c35-4b35-b322-218cde701c26
    Build stamp: 641a96c2c2f739a117e9623aec3db3478c799b6a9760c02f11cc0441f3919e6e
   Distribution: Oracle Linux Server 7.9
     Processors: 4
   Total Memory: 8339329024 bytes
      Timestamp: Fri Jun  4 18:13:32 2021
     Last errno: 115
Last errno text: Operation now in progress

The Core Dump is generic enough that I have not been able to ascertain why SQL Server is crashing. One moment it's fine, the next it has crashed. The only connection between the crashes I can find is that they occur when running a query involving PolyBase.

To my knowledge, there is no mention of this issue in any current support documents.

So far I've tried the following to resolve it to no avail:

  1. Rewriting my queries to minimize the amount of data pulled from External Tables.
  2. Adjusting whether COLLATION is changed on the local or remote side of the WHERE or ON cluase of a query that includes both local and remote tables (External Tables always use Latin1_General_100_BIN2_UTF8, but the local database uses Latin1_General_100_CI_AS_SC)
  3. Adjusting the amount of RAM SQL Server is permitted to use in the hopes of giving PolyBase more to work with.
  4. Installing tuned and using the mssql profile specified in Microsoft Documentation (this caused SQL Server to crash routinely).
  5. Installing tuned and using the mssql profile from the optional YUM repository (eliminated all crashes except those related to PolyBase queries).

If anyone here has encountered this error before, I'd be interested in hearing how you resolved it. Failing that I'm open to any suggestions.

1
  • 3
    It's unlikely that anyone here can answer your question definitively. You should open a support ticket with Microsoft, as you may be hitting a new bug that they need to address internally. – Erik Darling Jun 7 at 18:13