DB2 - Problem description
Problem IC69313 | Status: Closed |
DB2 instance may abend due to stack overflow (instead of dumping SQL0973N) while processing a very large predicate | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem description: | |
During SQL/XQuery compilation, a very large and complex predicate in the query being compiled may cause the DB2 instance to abend due to a stack overflow exception. Although new behaviour in DB2 Version 9.5 should ideally cause the DB2 agent to dump an sqlcode SQL0973N upon detecting such a scenario, this may not happen when a very large predicate, e.g., deeply nested series of ORs, etc., is present in the query. The stack trace from such an abend will look something like: sqlnr_in2or_cond_traverse <repeated 60,000 or more times> sqlnr_sinlist2or sqlnr_optprep sqlnr_optprep_action sqlnr_comp Note that the number 60,000 mentioned above is from scenarios observed with default database configuration values. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All Platforms * **************************************************************** * PROBLEM DESCRIPTION: * * During SQL/XQuery compilation, a very large and * * complexpredicate in the query being compiled may cause the * * DB2instance to abend due to a stack overflow * * exception.Althoughnew behaviour in DB2 Version 9.5 should * * ideally causethe DB2 agent to dump an sqlcode SQL0973N upon * * detectingsuch ascenario, this may not happen when a very * * large predicate,e.g., deeply nested series of ORs, etc., is * * present in thequery.The stack trace from such an abend will * * look something like:sqlnr_in2or_cond_traverse <repeated * * 60,000 or more * * times>sqlnr_sinlist2orsqlnr_optprepsqlnr_optprep_actionsqlnr_c * that the number 60,000 mentioned aboveis from scenarios * * observed with default databaseconfiguration values. * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 v9.5 Fixpak 7 or higher * **************************************************************** | |
Local Fix: | |
In DB2 Version 9.5, users have the ability to control the size of the runtime stack used by a DB2 agent. Consequently, increasing the value for the "agent_stack_sz" database configuration parameter will help workaround the issue. | |
available fix packs: | |
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows | |
Solution | |
First Fixed in DB2 v9.5 Fixpak 7 | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC69330 IC69331 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 17.06.2010 15.11.2010 15.11.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.5. | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.1.0.7 | |
9.5.0.7 |