DB2 - Problem description
Problem IC67775 | Status: Closed |
FEDERATED ONLY: TOO MANY OR PREDICATES MAY LEAD TO STACK EXHAUST ION AND CRASHWHEN COMPILING THE QUERY | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
Too many OR predicates may lead to stack exhaustion and crash when compiling the query. db2diag.log may contain the entries like this. 2010-02-02-09.53.08.422165+540 E21124851A621 LEVEL: Severe PID : 29538 TID : 100 PROC : db2sysc 0 INSTANCE: db2inst1 NODE : 000 DB : PRODDB APPHDL : 0-16 APPID: *LOCAL.db2inst1.100202005306 AUTHID : DB2INST1 EDUID : 100 EDUNAME: db2agent (PRODDB) 0 FUNCTION: DB2 UDB, oper system services, sqloEDUCodeTrapHandler, probe:30 MESSAGE : ADM0502C The DB2 instance has terminated abnormally. To remedy this problem, increase the AGENT_STACK_SZ DBM configuration parameter. Contact IBM Support for further assistance. 2010-02-02-09.53.08.422799+540 E21125473A462 LEVEL: Severe PID : 29538 TID : 100 PROC : db2sysc 0 INSTANCE: db2inst1 NODE : 000 DB : PRODDB APPHDL : 0-16 APPID: *LOCAL.db2inst1.100202005306 AUTHID : DB2INST1 EDUID : 100 EDUNAME: db2agent (PRODDB) 0 FUNCTION: DB2 UDB, oper system services, sqloEDUCodeTrapHandler, probe:40 DATA #1 : <preformatted> Current stack size = 8388608 2010-02-02-09.53.08.958226+540 E21125936A549 LEVEL: Severe PID : 29537 TID : 2 PROC : db2wdog 0 INSTANCE: db2inst1 NODE : 000 EDUID : 2 EDUNAME: db2wdog 0 FUNCTION: DB2 UDB, base sys utilities, sqleWatchDog, probe:20 MESSAGE : ADM0503C An unexpected internal processing error has occurred. ALL DB2 PROCESSES ASSOCIATED WITH THIS INSTANCE HAVE BEEN SHUTDOWN. Diagnostic information has been recorded. Contact IBM Support for further assistance. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Agent stack is set to a rather small size * **************************************************************** * PROBLEM DESCRIPTION: * * Too many OR predicates may lead to stack exhaustion and * * crash * * when compiling the query. * * * * * * * * db2diag.log may contain the entries like this. * * * * * * * * 2010-02-02-09.53.08.422165+540 E21124851A621 LEVEL: * * Severe * * PID : 29538 TID : 100 PROC : * * db2sysc * * 0 * * * * INSTANCE: db2inst1 NODE : 000 DB : PRODDB * * APPHDL : 0-16 APPID: * * * * *LOCAL.db2inst1.100202005306 * * * * AUTHID : DB2INST1 * * * * EDUID : 100 EDUNAME: db2agent (PRODDB) 0 * * * * FUNCTION: DB2 UDB, oper system services, * * sqloEDUCodeTrapHandler, * * probe:30 * * * * MESSAGE : ADM0502C The DB2 instance has terminated * * abnormally. * * To remedy this * * * * problem, increase the AGENT_STACK_SZ DBM * * configuration * * parameter. * * * * Contact IBM Support for further assistance. * * * * * * * * 2010-02-02-09.53.08.422799+540 E21125473A462 LEVEL: * * Severe * * PID : 29538 TID : 100 PROC : * * db2sysc * * 0 * * * * INSTANCE: db2inst1 NODE : 000 DB : PRODDB * * APPHDL : 0-16 APPID: * * * * *LOCAL.db2inst1.100202005306 * * * * AUTHID : DB2INST1 * * * * EDUID : 100 EDUNAME: db2agent (PRODDB) 0 * * * * FUNCTION: DB2 UDB, oper system services, * * sqloEDUCodeTrapHandler, * * probe:40 * * * * DATA #1 : <preformatted> * * * * Current stack size = 8388608 * * * * * * * * 2010-02-02-09.53.08.958226+540 E21125936A549 LEVEL: * * Severe * * PID : 29537 TID : 2 PROC : * * db2wdog * * 0 * * * * INSTANCE: db2inst1 NODE : 000 * * * * EDUID : 2 EDUNAME: db2wdog 0 * * * * FUNCTION: DB2 UDB, base sys utilities, sqleWatchDog, * * probe:20 * * MESSAGE : ADM0503C An unexpected internal processing error * * has * * occurred. ALL * * * * DB2 PROCESSES ASSOCIATED WITH THIS INSTANCE HAVE * * BEEN * * SHUTDOWN. * * * * Diagnostic information has been recorded. Contact * * IBM * * Support for * * * * further assistance. * **************************************************************** * RECOMMENDATION: * * upgrade to V97 FP3 * **************************************************************** | |
Local Fix: | |
Rewriting the query. The query can be rewritten by changing the long OR into a "IN (..,...,...)" predicate. E.g. change: select * from N where c1 = 1 OR c1 = 2 OR c2 = 3... to: select * from N where c1 IN (1,2,3...) | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows | |
Solution | |
V97 FP3 included the fix. No behavior changes. | |
Workaround | |
set the agent size to a larger size | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 11.04.2010 16.09.2010 29.01.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP3 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.3 | |
9.7.0.3 |