IBM Support

IT29948: TRAP / SIGSEGV OCCURS WHEN DROPPING A TABLE (OR INDEX OF A TABLE) AND A LARGE STATISTICS PROFILE EXISTS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • The dropping of a table with a large statistics profile (or
    dropping of an index on such a table) may result in a large
    memory overwrite, causing DB2 to trap/crash with a wide variety
    of symptoms.  Those symptoms may not include a trap/stack of the
    drop table/index activity.
    
    A large statistics profile is most likely to exist on a wide
    table (> 500 columns) with AUTO_CG_STATS set to ON.  This
    setting is only available in version 11.5 and is OFF by default.
    The "ON" setting may result in collecting statistics on a large
    number of column groups.
    
    The problem stack (not necessarily seen without analyzing a
    coredump) shows a stack similar to the following (it is the same
    for drop table or drop index)
    memmove
    sqlrlDropIndex
    ...
    
    Vulnerable tables have a statistics profile >= 65536 bytes.
    This can be checked by
    1. finding tables > 500 columns :
    select tabname, tabschema from syscat.tables where TYPE='T' and
    colcount>500
    
    2. running db2cat on those tables :
    db2cat -d <database> -n <tabname> -s <tabschema> , check if the
    pd length - stats profile offset is >= 65536
    for example :
           PACKED DESCRIPTOR HEADER
    ..
    Length                    : 357256
    Stats Profile Offset      : 260696
    is clearly vulnerable as the difference is 97256 bytes.  Note if
    the statistics profile is "0", no profile exists and the table
    is not vulnerable to the problem.
    
    We can also retrieve and modify the profile :
    SELECT STATISTICS_PROFILE FROM SYSCAT.TABLES WHERE TABNAME='..'
    AND TABSCHEMA='..'
    Alter the RUNSTATS statement to remove most or all of the column
    group statistics, then run the statement adding "SET PROFILE
    ONLY" at the end.  After this, Auto CGS will no longer perform
    discovery i.e. it won't lengthen the stats profile.
    

Local fix

  • db2 runstats on table <table> unset profile
    more permanently, set AUTO_CG_STATS to OFF until a fix for the
    APAR is applied
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * database with wide tables, especially those using automatic  *
    * column group stats (AUTO_CG_STATS = ON, v11.5 only)          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * TBD                                                          *
    ****************************************************************
    

Problem conclusion

  • TBD
    

Temporary fix

  • see Local Fix
    

Comments

APAR Information

  • APAR number

    IT29948

  • 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

    2019-08-08

  • Closed date

    2020-01-20

  • Last modified date

    2020-01-20

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

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

    IT29961

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:
20 January 2020