DB2 - Problem description
Problem IT29948 | Status: Closed |
TRAP / SIGSEGV OCCURS WHEN DROPPING A TABLE (OR INDEX OF A TABLE) AND A LARGE STATISTICS PROFILE EXISTS | |
product: | |
DB2 FOR LUW / DB2FORLUW / B10 - DB2 | |
Problem 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 -n -s , 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. | |
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 * **************************************************************** | |
Local Fix: | |
db2 runstats on table unset profile more permanently, set AUTO_CG_STATS to OFF until a fix for the APAR is applied | |
Solution | |
Workaround | |
see Local Fix | |
BUG-Tracking | |
forerunner : follow-up : IT29961 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 08.08.2019 20.01.2020 20.01.2020 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |