IBM Support

IT23647: DB2 MAY TRAP WITH EXECUTING A QUERY WITH NODENUM OR DBPARTITIONNUM FUNCTION IN DPF ENVIRONMENT.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The problem can occur in  DPF during compilation of a SQL
    statement containing the following
    - a subselect with nodenumber or dbpartitionnum function in the
    select list and a group by clause
    - the nodenumber/dbpartitionnum output from the subselect is
    joined to another table
    
    Repro the problem:
    
    create table t1 (id int);
    
    WITH temp AS(
                              SELECT DBPARTITIONNUM(id) as
    partition,
                                     count_big(1) as count
                              FROM t1 TABLESAMPLE SYSTEM(100)
                              GROUP BY DBPARTITIONNUM(id)
                            )
    SELECT nodenum,
           COALESCE(count,0)
    FROM syscat.datapartitions b,
         syscat.tablespaces c,
             syscat.nodegroupdef a
             LEFT OUTER JOIN temp
             ON nodenum=partition
    WHERE b.tbspaceid=c.tbspaceid
      AND b.seqno = 0
      AND c.ngname=a.ngname
      AND b.tabname='T1'    ;
    
    If you hit this failure, you will  see the following stack:
    
    0x00007EFE26095716
    _Z25ossDumpStackTraceInternalmR11OSSTrapFileiP7siginfoPvmm +
    0x0356
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2osse.so.1)
    0x00007EFE2609535B ossDumpStackTraceV98 + 0x002b
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2osse.so.1)
    0x00007EFE26091507 _ZN11OSSTrapFile6dumpExEmiP7siginfoPvm +
    0x00d7
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2osse.so.1)
    0x00007EFE2D267357 sqlo_trce + 0x03c7
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2D3CE411 sqloEDUCodeTrapHandler + 0x03b1
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x0000003C6D20F7E0 address: 0x0000003C6D20F7E0 ; dladdress:
    0x0000003C6D200000 ; offset in lib: 0x000000000000F7E0 ;
            (/lib64/libpthread.so.0)
    0x00007EFE2C5A1E9A
    _Z25sqlno_dpf_order_normalizeP13sqlno_globalsP17sqlno_order_clas
    sP21sqlno_plan_propertiesP10sqlno_apcbPS2_ + 0x017a
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C540608
    _Z16sqlno_test_orderP13sqlno_globalsP19sqlno_plan_operatorP17sql
    no_order_classP13SQLNN_BOOLEANS5_P9sqlno_set + 0x0258
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C53F5D1
    _Z21sqlno_test_propertiesP13sqlno_globalsP9sqlno_qtbP20sqlno_req
    _propertiesP19sqlno_plan_operatorP13SQLNN_BOOLEANS8_PjS9_ +
    0x04b1
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C53ED13
    _Z15sqlno_need_glueP13sqlno_globalsP9sqlno_qtbP20sqlno_req_prope
    rtiesP19sqlno_plan_operatorP13SQLNN_BOOLEANS8_ + 0x0143
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C53BA3E
    _Z19sqlno_get_best_planP13sqlno_globalsP9sqlno_qtbP18sqlno_join_
    contextP20sqlno_req_properties9sqlno_setP13SQLNN_BOOLEANPP19sqln
    o_plan_operatorPS7_ + 0x027e
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C4CDC64
    _Z16sqlno_crule_mgjnP13sqlno_globalsP13sqlno_contextP9sqlnq_sat9
    sqlno_setS5_S5_S5_S5_S5_PjS6_P10sqlno_hintS6_bP11sqlno_qpcsbP14s
    qlno_planlist + 0x0524
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C4C7504
    _Z24sqlno_crule_join_choicesP13sqlno_globalsP13sqlno_contextP9sq
    lnq_sat9sqlno_setS5_S5_S5_S5_S5_17sqlno_join_choiceS5_jj13SQLNN_
    BOOLEANS7_P10sqlno_qpteP10sqlno_hintbPjP11sqlno_qpcsbP14sqlno_pl
    anlistSG_SG_SG_ + 0x0714
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C4C6C28
    _Z22sqlno_crule_join_orderP13sqlno_globalsP13sqlno_contextP9sqln
    q_sat9sqlno_setS5_S5_S5_S5_S5_17sqlno_join_choiceP11sqlno_qpcsbj
    j13SQLNN_BOOLEANS9_P10sqlno_hintbPjP14sqlno_planlist + 0x04e8
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C4C630D
    _Z21sqlno_crule_join_rootP13sqlno_globalsP13sqlno_context9sqlno_
    setS3_S3_S3_S3_S3_17sqlno_join_choiceP11sqlno_qpcsbjjP10sqlno_hi
    ntPjP14sqlno_planlist + 0x019d
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C4EB0EE
    _Z16sqlno_crule_joinP13sqlno_globalsP9sqlno_qtbP11sqlno_qpcsb +
    0x066e
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C6680B0
    _Z28sqlno_gen_partitions_for_QTBP13sqlno_globalsP9sqlno_sfbP15sq
    lno_sfws_plan + 0x03f0
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C666FD7
    _Z18sqlno_plan_end_oprP13sqlno_globalsP9sqlno_sfbP9sqlnq_opr +
    0x03e7
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C6745AE
    _Z14sqlno_each_oprP13sqlno_globalsP9sqlno_sfbP9sqlnq_qunP9sqlnq_
    opr + 0x0ace
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C673912
    _Z14sqlno_walk_qunP13sqlno_globalsP9sqlno_sfbP9sqlnq_oprP9sqlnq_
    qun + 0x00e2
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C679B08
    _Z13sqlno_call_sfP13sqlno_globalsP8sqlno_sfP9sqlno_sfbPvS5_i13SQ
    LNN_BOOLEAN + 0x00b8
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C673BC3
    _Z14sqlno_each_oprP13sqlno_globalsP9sqlno_sfbP9sqlnq_qunP9sqlnq_
    opr + 0x00e3
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C673912
    _Z14sqlno_walk_qunP13sqlno_globalsP9sqlno_sfbP9sqlnq_oprP9sqlnq_
    qun + 0x00e2
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C679B08
    _Z13sqlno_call_sfP13sqlno_globalsP8sqlno_sfP9sqlno_sfbPvS5_i13SQ
    LNN_BOOLEAN + 0x00b8
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C673BC3
    _Z14sqlno_each_oprP13sqlno_globalsP9sqlno_sfbP9sqlnq_qunP9sqlnq_
    opr + 0x00e3
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C673912
    _Z14sqlno_walk_qunP13sqlno_globalsP9sqlno_sfbP9sqlnq_oprP9sqlnq_
    qun + 0x00e2
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C679B08
    _Z13sqlno_call_sfP13sqlno_globalsP8sqlno_sfP9sqlno_sfbPvS5_i13SQ
    LNN_BOOLEAN + 0x00b8
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C673BC3
    _Z14sqlno_each_oprP13sqlno_globalsP9sqlno_sfbP9sqlnq_qunP9sqlnq_
    opr + 0x00e3
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C673667
    _Z13sqlno_top_qtbP13sqlno_globalsP9sqlno_sfbP9sqlnq_qurP9sqlnq_q
    tb + 0x00d7
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C672F59
    _Z14sqlno_each_qurP13sqlno_globalsP9sqlno_sfbP9sqlnq_qurS4_ +
    0x04b9
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C678526
    _Z14sqlno_scan_qgmP13sqlno_globalsP9sqlno_sfbP9sqlnq_qur +
    0x0206
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C599947
    _Z19sqlno_planning_scanP13sqlno_globalsP9sqlnq_quri + 0x03c7
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C598A28
    _Z20sqlno_planning_phaseP13sqlno_globalsP9sqlnq_qurii + 0x04c8
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C59532B _Z9sqlno_exeP9sqlnq_qur + 0x0fab
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C29D1DC
    _Z10sqlnn_cmplP8sqeAgentP11sqlrrstrings17sqlnn_compileModesP14sq
    lrr_cmpl_enviiPP9sqlnq_qur + 0x4d4c
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2C298481
    _Z10sqlnn_cmplP8sqeAgentP11sqlrrstrings17sqlnn_compileModesP14sq
    lrr_cmpl_env + 0x0021
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2DCB091B
    _Z17sqlra_compile_varP8sqlrr_cbP14sqlra_cmpl_envPhitiiiiiP14SQLP
    _LOCK_INFOP16sqlra_cached_varPiS5_Pb + 0x10eb
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2DCCD696
    _Z14sqlra_find_varP8sqlrr_cbP17sqlra_cached_stmt13sqlra_stmt_idj
    jPhjthP14sqlra_cmpl_env15sqlra_fill_modePiiS8_iiiS8_P14SQLP_LOCK
    _INFOPP16sqlra_cached_varS8_bSA_Pb + 0x0966
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2DD6D2A8 _Z13sqlra_get_varP8sqlrr_cbiibPbS1_ + 0x0f18
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2DA25706 _Z23sqlrr_execute_immediateP8sqlrr_cbi +
    0x15c6
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2DA05C6E
    _Z14sqlrr_execimmdP14db2UCinterfaceP16db2UCprepareInfo + 0x083e
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE281964A3 _ZN10pvmPackage14executeSectionEP5sqlcajb +
    0x0c43
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE281957C1 _ZN3PVM12executeQueryEjb + 0x0101
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2819AF35 _ZN3PVM3runEv + 0x0cb5
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE281B3C7E pvm_entry + 0x01ae
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2D2C03C4 sqloInvokeFnArgs + 0x71d4
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2E17D554
    _Z19sqlriInvokerTrustedP10sqlri_ufobP21sqlriRoutineErrorIntfb +
    0x2594
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2E16F8F5 _Z18sqlriInvokeInvokerP10sqlri_ufobb + 0x1bb5
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2E16D3A0 _Z9sqlricallP8sqlrr_cb + 0x01d0
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2DFF4CF7 _Z15sqlriSectInvokeP8sqlrr_cbP12sqlri_opparm
    + 0x04b7
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2DA22092 _Z29sqlrr_process_execute_requestP8sqlrr_cbib
    + 0x0f32
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2D9F7203 _Z13sqlrr_executeP14db2UCinterfaceP9UCstpInfo
    + 0x02a3
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2BBF90A4
    _Z19sqljs_ddm_excsqlsttP14db2UCinterfaceP13sqljDDMObject +
    0x06c4
            (/etrade/home/pp1edwi1/sqllib/lib64/libdb2e.so.1)
    0x00007EFE2BBC403B
    _Z21sqljsParseRdbAccessedP13sqljsDrdaAsCbP13sqljDDMObjectP14db2U
    Cinterface + 0x010b
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.1 Mod 4 Fixpack 4 or higher                *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 11.1 Mod 4 Fixpack 4
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT23647

  • 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

    2018-01-08

  • Closed date

    2018-11-27

  • Last modified date

    2018-11-27

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

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

    IT23650

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"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:
27 November 2018