IBM Support

IT23577: INSTANCE CRASH WHEN CAPTURING SECTION EXPLAIN INFORMATION FOR SQL STATEMENT THAT CAN PRODUCE A VERY LARGE OPTIMIZED STATEMENT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When capturing explain information for a SQL statement, using
    any of the four section explain interfaces, the Db2 instance can
    crash.
    
    This can occur when the compilation of the statement can produce
    a very large optimized statement that exceeds the maximum length
    of the STATEMENT_TEXT field of the EXPLAIN_STATEMENT table.
    
    The four section explain interfaces include:
    EXPLAIN_FROM_ACTIVITY, EXPLAIN_FROM_CATALOG, EXPLAIN_FROM_DATA,
    and EXPLAIN_FROM_SECTION
    
    If you hit this issue, you will see the following in the
    db2diag.log:
    
    2017-12-26-03.56.34.380081-300 I2511445E624          LEVEL:
    Severe
    PID     : 2768988              TID : 140736909534976 PROC :
    db2sysc
    INSTANCE: akikoba              NODE : 000            DB   :
    SAMPLE
    APPHDL  : 0-54                 APPID:
    *LOCAL.akikoba.171226082343
    AUTHID  : AKIKOBA              HOSTNAME: hotellnx107
    EDUID   : 69                   EDUNAME: db2agent (SAMPLE)
    FUNCTION: DB2 UDB, trace services, sqlt_logerr_string (secondary
    logging function), probe:30
    MESSAGE : **SQLNX_FORMAT_STATEMENT**
    DATA #1 : String, 87 bytes
    Column AKIKOBA .EXPLAIN_STATEMENT.STATEMENT_TEXT is too small,
    required size: 6420170
    
    2017-12-26-03.59.03.317075-300 E2512070E811          LEVEL:
    Error
    PID     : 2768988              TID : 140736909534976 PROC :
    db2sysc
    INSTANCE: akikoba              NODE : 000            DB   :
    SAMPLE
    APPHDL  : 0-54                 APPID:
    *LOCAL.akikoba.171226082343
    AUTHID  : AKIKOBA              HOSTNAME: hotellnx107
    EDUID   : 69                   EDUNAME: db2agent (SAMPLE)
    FUNCTION: DB2 UDB, oper system services, sqloEDUCodeTrapHandler,
    probe:30
    MESSAGE : ADM14005E  The following error occurred: "AppErr".
    First Occurrence
              Data Capture (FODC) has been invoked in the following
    mode:
              "Automatic".  Diagnostic information has been recorded
    in the
              directory named
    
    "/home/akikoba/sqllib/db2dump/FODC_AppErr_2017-12-26-03.59.03.31
    6981_
              2768988_69_000/".
    ...
    
    2017-12-26-03.59.03.924664-300 I2577982E2951         LEVEL:
    Event
    PID     : 2768988              TID : 140736909534976 PROC :
    db2sysc
    INSTANCE: akikoba              NODE : 000            DB   :
    SAMPLE
    APPHDL  : 0-54                 APPID:
    *LOCAL.akikoba.171226082343
    AUTHID  : AKIKOBA              HOSTNAME: hotellnx107
    EDUID   : 69                   EDUNAME: db2agent (SAMPLE)
    FUNCTION: DB2 UDB, oper system services,
    sqloPGRPRegisterOneCrash, probe:2161
    MESSAGE : lastCrashCount
    DATA #1 : unsigned integer, 8 bytes
    0
    DATA #2 : String, 10 bytes
    inRecovery
    DATA #3 : Boolean, 1 bytes
    false
    CALLSTCK: (Static functions may not be resolved correctly, as
    they are resolved to the nearest symbol)
      [0] 0x00007FFFF093485C sqloPGRPRegisterOneCrash + 0x20C
      [1] 0x00007FFFF0A86588 sqloEDUCodeTrapHandler + 0xB18
      [2] 0x00007FFFF7BCF850 /lib64/libpthread.so.0 + 0xF850
      [3] 0x00007FFFE881C632 /lib64/libc.so.6 + 0x83632
      [4] 0x00007FFFE87E11EF _IO_vfprintf + 0x40BF
      [5] 0x00007FFFE880B8EB vsnprintf + 0x9B
      [6] 0x00007FFFE978B9C4 ossSnprintf + 0xA4
      [7] 0x00007FFFF08C8CFD
    _Z20sqlnxFormatSTATEMENTP13sqlnxPlanInfodiPh + 0x32D
      [8] 0x00007FFFF08BDF3E
    _Z18sqlnxFormatExplainP13sqlnxPlanInfoPvP12sqzDataChainI22sqlnxM
    emberActualsData16sqzChainNodeBaseIS3_EEbP19sqlra_executable_id
    + 0x7BE
      [9] 0x00007FFFF08DB546
    _Z32sqlnxCallbackExplainFromPlanInfojPPv + 0x136
      [10] 0x00007FFFEF02723D _Z29sqlerTrustedRtnCallbackRouterjPPv
    + 0xB0D
      [11] 0x00007FFFBD7BEAED
    _Z19explainFromPlanInfoP9sqlri_shdjPcjS1_jS1_S1_S1_S1_S1_S1_P19s
    qlra_executable_idS1_P12sqzDataChainI22sqlnxMemberActualsData16
    + 0x30D
      [12] 0x00007FFFBD7C2B3B explainFromSection + 0x5FB
      [13] 0x00007FFFF0979DA7 sqloInvokeFnArgs + 0x6F67
      [14] 0x00007FFFF1828DC9
    _Z19sqlriInvokerTrustedP10sqlri_ufobP21sqlriRoutineErrorIntfb +
    0x769
      [15] 0x00007FFFF181D04E _Z18sqlriInvokeInvokerP10sqlri_ufobb +
    0x1B2E
      [16] 0x00007FFFF181AB80 _Z9sqlricallP8sqlrr_cb + 0x1D0
      [17] 0x00007FFFF169FE28
    _Z15sqlriSectInvokeP8sqlrr_cbP12sqlri_opparm + 0x4F8
          ...
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users capturing explain information by EXPLAIN_FROM_*        *
    * function.                                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 Version 11.1 fixpack 4 or later.              *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 Version 11.1 fixpack 4
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT23577

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-12-26

  • Closed date

    2018-12-23

  • Last modified date

    2018-12-23

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
23 December 2018