IBM Support

IC82535: DB2TOP DUMPS CORE ON AIX WHEN SHOWING SQL TEXT LOGNER THAN 8028 BYTES

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • db2top dumps core when showing SQL text longer than 8208 bytes.
    
    Repro Steps:
    From Terminal 1:
    
    $ cat ddl1.txt
    create table db2inst1.tab1(
    col_0000000000 int,
    col_0000000001 int,
        ..(snip)..
    col_0000000407 int,
    col_0000000408 int
    );
    
    $ cat ddl2.txt
    create table db2inst1.tab10(
    col_0000000000 int,
    col_0000000001 int,
        ..(snip)..
    col_0000000407 int,
    col_0000000408 int
    );
    
    $ ls -lF ddl?.txt
    -rw-r-----    1 db2inst1  dbadm    8210 Apr 04 06:55 ddl1.txt
    << 8208 bytes except for the last LF character and ';'
    -rw-r-----    1 db2inst1  dbadm    8211 Apr 04 06:14 ddl2.txt
    << 8209 bytes except for the last LF character and ';'
    
    From Terminal 2, run db2top:
    
    $ db2top -d sample -i 10
    Then type "D" to show dynamic SQL statements.
    
    From Terminal 1, connect to sample and run above 2 statements:
    $ db2 -tf ddl1.txt
    
    In Terminal 2, "create table db2inst1.t1 ..." will be shown.
    Type "L" and enter HashValue(in this case, input
    00000008374788304357592542) to show the statement:
    
    [-]06:38:57,refresh=10secs(0.001)                          SQL
    AIX,part=[1/1],AKIKOBA:P35802
    [d=Y,a=N,e=N,p=ALL]
    [qp=off]
    
        SQL_Statement              Sql
    Num       Exec        Avg        Cpu        Avg
        HashValue                  Statement (30 first char.)
    Execution       Time   ExecTime       Time    CpuTime
        -------------------------- ------------------------------
    --------- ---------- ---------- ---------- ----------
        00000008374788304357592542 create table db2inst1.tab1( co
    1   0.000000   0.000000   0.000000   0.000000
        00000000006101575056951548 select current CLIENT_APPLNAME
    1   0.005753   0.005753   0.002777   0.002777
           ....
    
    In this case the statement will be displayed.
    
    However, run ddl2.txt in Terminal 1 and input HashValue for
    it(in this case, 00000009666737530748824015) in Terminal 2, it
    got sigsegv:
    
        SQL_Statement              Sql
    Num       Exec        Avg        Cpu        Avg
        HashValue                  Statement (30 first char.)
    Execution       Time   ExecTime       Time    CpuTime
        -------------------------- ------------------------------
    --------- ---------- ---------- ---------- ----------
        00000008374788304357592542 create table db2inst1.tab1( co
    1   0.000000   0.000000   0.000000   0.000000
        00000009666737530748824015 create table db2inst1.tab10( c
    1   0.000000   0.000000   0.000000   0.000000
        00000005429283171301468277 CALL SYSPROC.SYSINSTALLOBJECTS
    1   0.078907   0.078907   0.002037   0.002037
    
    Segmentation fault (core dumped)
    

Local fix

  • Don't show SQL text longer than 8208 bytes.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.7 Fix Pack 7.                       *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 Version 9.7 Fix Pack 7.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC82535

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-04-05

  • Closed date

    2012-11-13

  • Last modified date

    2012-11-13

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

    IC82516

  • 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

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC82535

Modified date: 13 November 2012