IBM Support

IC65471: db2look receives segmentation fault if COMMENT statement is created on a stored procedure having more than 70 parameters.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • db2look receives segmentation if it tries to generate a DDL for
    stored procedure with more than 70 parameters and comment.
    The following steps illustrate one of the scenario.
    
    1. Create a procesure with 80 parameters, then add a comment on
    the procedure.
    $ db2 connect to sample
    $ db2 "create procesure P80 (in p1 smallint, ...<params>..., in
    p80 smallint) language sql begin end"
    $ db2 "comment on P80 is 'aaaa'"
    
    2. Run db2look with -e option.
    $ db2look -d sample -e -o db2look.out
    -- No userid was specified, db2look tries to use Environment
    variable USER
    -- USER is: DB2INST1
    -- Creating DDL for table(s)
    -- Output is sent to file: db2look.out
    Segmentation fault(coredump)
    
    The stack trace shows strcmp() refers invalid address passed by
    create_comment_ddl().
    (dbx) where
    strcmp.strcmp() at 0x100069c88
    create_comment_ddl(char*,char*,char*,char*,char,int,FILE*,int,sq
    lca*)(??,
    ??, ??, ??, ??, ??, ??, ??) at 0x100022410
    create_stored_procedure_ddl(int,char*,int,char*,int,int,char,int
    ,FILE*,int,sqlca*)(??,
    ??, ??, ??, ??, ??, ??, ??) at 0x100044668
    create_ddl(int*,int*,int,int)(??, ??, ??, ??) at 0x100007f94
    main(??, ??) at 0x100001f74
    

Local fix

  • Please remove comment on the stored procesure(s).
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users who use db2look tool.                                  *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * db2look receives segmentation if it tries to generate a      *
    * DDLfor stored procedure with more than 70 parameters         *
    * andcomment.The following steps illustrate one of the         *
    * scenario.1. Create a procesure with 80 parameters, then add  *
    * a commenton the procedure.$ db2 connect to sample$ db2       *
    * "create procesure P80 (in p1 smallint, ...<params>...,in p80 *
    * smallint) language sql begin end"$ db2 "comment on P80 is    *
    * 'aaaa'"2. Run db2look with -e option.$ db2look -d sample -e  *
    * -o db2look.out-- No userid was specified, db2look tries to   *
    * use Environmentvariable USER-- USER is: DB2INST1-- Creating  *
    * DDL for table(s)-- Output is sent to file:                   *
    * db2look.outSegmentation fault(coredump)The stack trace shows *
    * strcmp() refers invalid address passedby                     *
    * create_comment_ddl().(dbx)                                   *
    * wherestrcmp.strcmpcreate_comment_ddlcreate_stored_procedure_dd
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Please upgrade to version 9.5 fixpack 6 or later.            *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in Version 9.5 Fix Pack 6.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC65471

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-01-08

  • Closed date

    2010-09-09

  • Last modified date

    2010-09-09

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

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

    IC66766

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R950 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":"9.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
09 September 2010