IBM Support

IT26936: [COE_TIM]DB2 MIGHT ABEND WHEN RUNNING QUERIES CONTAINING AGGREGATE DISTINCT ON COLUMNIZED TABLES

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Db2 might abend when running a query with the following
    characteristics:  
    1. the query references column organized tables; 
    2. the query has at least one of these 5 aggregations: MAX, MIN,
    COUNT, COUNT_BIG, SUM; 
    3. the aggregation(s) contain a aggregate distinct on a simple
    column, such as COUNT(distinct col) 
    4. the distinct operation can potentially cause sort heap
    spilling 
    <StackTrace>&#160;
    -----Frame------ ------Address----- ------Function +
    Offset------&#160;
    0x0000101DC13E4890 0x000010000CD664D8
    _Z20sqlnd_inlineview_pdaR17sqlnq_qunElemListS0_P19sqlnd_Context_
    StackiRi + 0x3d78 ( = offset 0xCA364D8 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)&#160;
    0x0000101DC13E5540 0x000010000CD662D0
    _Z20sqlnd_inlineview_pdaR17sqlnq_qunElemListS0_P19sqlnd_Context_
    StackiRi + 0x3b70 ( = offset 0xCA362D0 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)&#160;
    0x0000101DC13E61F0 0x000010000CD662D0
    _Z20sqlnd_inlineview_pdaR17sqlnq_qunElemListS0_P19sqlnd_Context_
    StackiRi + 0x3b70 ( = offset 0xCA362D0 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)&#160;
    0x0000101DC13E6EA0 0x000010000CD662D0
    _Z20sqlnd_inlineview_pdaR17sqlnq_qunElemListS0_P19sqlnd_Context_
    StackiRi + 0x3b70 ( = offset 0xCA362D0 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)&#160;
    0x0000101DC13E7B50 0x000010000CD53C64
    _Z16sqlnd_qunset_pdaR17sqlnq_qunElemListRiRP9sqlnq_sati + 0x08f4
    ( = offset 0xCA23C64 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)&#160;
    0x0000101DC13E7D40 0x000010000CD52148
    _Z13sqlnd_opr_pdaRP9sqlnq_oprRiRP9sqlnq_sati + 0x00f8 ( = offset
    0xCA22148 in /home/db2inst1/sqllib/lib64/libdb2e.so.1)&#160;
    0x0000101DC13E7ED0 0x000010000CDD4CC0
    _Z22sqlnd_insert_sel_aboveP9sqlnq_qtbRS0_P9sqlnq_qun + 0x0230 (
    = offset 0xCAA4CC0 in /home/db2inst1/sqllib/lib64/libdb2e.so.1)&#160;
    0x0000101DC13E7FD0 0x000010000E0EC99C
    _Z17sqlnr_egad_actionP10sqlnr_qrwaPiP14sqlnr_progress + 0x008c
    <----- ( = offset 0xDDBC99C in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)&#160;
    0x0000101DC13E8090 0x000010000E29FF70
    _Z10sqlnr_compPiiP16sqlnr_rule_stateP10sqlnr_qrwaP14sqlnr_progre
    ss + 0x02a0&#160;
    

Local fix

  • db2set DB2_REDUCED_OPTIMIZATION=NO_EGAD, then restart Db2
    

Problem summary

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

Problem conclusion

  • First fixed in Db2 11.1 Mod 4 Fixpack 5
    

Temporary fix

  • &#160;/* <OPTGUIDELINES>
    &#160; &#160; &#160;<REGISTRY>
    &#160; &#160; &#160; &#160; <OPTION NAME='DB2_REDUCED_OPTIMIZATION'
    VALUE='NO_EGAD'/>
    &#160; &#160; &#160;</REGISTRY>
    &#160; &#160; &#160;</OPTGUIDELINES> */
    
    
    
    
    db2set -im DB2_REDUCED_OPTIMIZATION=NO_EGAD
    

Comments

APAR Information

  • APAR number

    IT26936

  • 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-11-12

  • Closed date

    2020-01-16

  • Last modified date

    2020-01-16

  • 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":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
04 May 2022