IBM Support

IC79523: USING SOURCEUSEREXIT WHEN LOADING WILL LEAK FILE DESCRIPTOR

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • When using a load with 'sourceuserexit', DB2 might end up
    leaking file descriptors because
    it 'unlink' the named pipe used to read data from the
    'sourceuserexit' program without
    closing it first.
    Finally it reaches the limit for opened file descriptors and
    start putting follwing
    OS error messages in the db2diag.log.
    
    db2diag.log :
    ----------------------------------------------------------------
    -------------------------------------
    
    2011-02-06-11.28.37.848709-300 I4048694A573       LEVEL: Error
    PID     : 201224               TID  : 32003       PROC : db2sysc
    1
    INSTANCE: xxxxxxxx             NODE : 001         DB   :
    xxxxxxxx
    APPHDL  : 1-45212              APPID: *N1.xxxxxxxx.110206162803
    AUTHID  : LOADPROD
    EDUID   : 32003                EDUNAME: db2agntp (xxxxxxxx) 1
    FUNCTION: DB2 UDB, database utilities, DIAG_ERROR, probe:0
    DATA #1 : String, 144 bytes
    LOADID: 4208.2011-02-06-11.28.06.289044.1 (70;1578)
    Reading db2nodes because of error  , -2062614522, 0, Detected in
    file:sqluSocket.C, Line:615
    
    2011-02-06-11.28.37.854981-300 E4049268A987       LEVEL: Error
    (OS)
    PID     : 201224               TID  : 32003       PROC : db2sysc
    1
    INSTANCE: xxxxxxxx             NODE : 001         DB   :
    xxxxxxxx
    APPHDL  : 1-45212              APPID: *N1.xxxxxxxx.110206162803
    AUTHID  : LOADPROD
    EDUID   : 32003                EDUNAME: db2agntp (xxxxxxxx) 1
    FUNCTION: DB2 UDB, oper system services, sqloopenp, probe:80
    MESSAGE : ZRC=0x850F0006=-2062614522=SQLO_FHNL "TOO MANY OPEN
    FILES"
              DIA8306C Too many files were opened.
    CALLED  : OS, -, open
    OSERR   : EMFILE (24) "Too many open files"
    DATA #1 : Codepath, 8 bytes
    4:12:18:20:23:24:37
    DATA #2 : File name, 33 bytes
    /db2home/xxxxxxxx/sqllib/db2systm
    DATA #3 : Bitmask, 4 bytes
    0x00000354
    DATA #4 : Hex integer, 4 bytes
    0x000001A0
    DATA #5 : signed integer, 4 bytes
    0
    DATA #6 : signed integer, 4 bytes
    0
    DATA #7 : String, 105 bytes
    Search for ossError*Analysis probe point after this log entry
    for further
    self-diagnosis of this problem.
    
    2011-02-06-11.28.37.861916-300 I4050256A2203      LEVEL: Error
    (OS)
    PID     : 201224               TID  : 32003       PROC : db2sysc
    1
    INSTANCE: xxxxxxxx             NODE : 001         DB   :
    xxxxxxxx
    APPHDL  : 1-45212              APPID: *N1.xxxxxxxx.110206162803
    AUTHID  : LOADPROD
    EDUID   : 32003                EDUNAME: db2agntp (xxxxxxxx) 1
    FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
    CALLED  : OS, -, open
    OSERR   : EMFILE (24) "Too many open files"
    DATA #1 : String, 140 bytes
    A total of 3 analysis will be performed :
     - User info
     - ulimit info
     - Target file info
    
     Target file = /db2home/xxxxxxxx/sqllib/db2systm
    DATA #2 : String, 190 bytes
      Real user ID of current process       = 46602
      Effective user ID of current process  = 46602
      Real group ID of current process      = 6548
    APPHDL  : 1-45212              APPID: *N1.xxxxxxxx.110206162803
    AUTHID  : LOADPROD
    EDUID   : 32003                EDUNAME: db2agntp (xxxxxxxx) 1
    FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
    CALLED  : OS, -, open
    OSERR   : EMFILE (24) "Too many open files"
    DATA #1 : String, 140 bytes
    A total of 3 analysis will be performed :
     - User info
     - ulimit info
     - Target file info
    
     Target file = /db2home/xxxxxxxx/sqllib/db2systm
    DATA #2 : String, 190 bytes
      Real user ID of current process       = 46602
      Effective user ID of current process  = 46602
      Real group ID of current process      = 6548
      Effective group ID of current process = 6548
    DATA #3 : String, 381 bytes
    Current process limits (unit in bytes except for nofiles) :
      mem     (S/H) = unlimited / unlimited
      core    (S/H) = 8589934590 / 8589934590
      cpu     (S/H) = unlimited / unlimited
      data    (S/H) = unlimited / unlimited
      fsize   (S/H) = unlimited / unlimited
      nofiles (S/H) = unlimited / unlimited
      stack   (S/H) = unlimited / unlimited
      rss     (S/H) = unlimited / unlimited
    DATA #4 : String, 260 bytes
    Target File Information :
      Size               = 4096
      Link               = No
      Reference path     = N/A
      Type               = 0x8000
    

Local fix

  • avoid using sourceuserexit to load the data.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * When using a load with 'sourceuserexit', DB2 might end up    *
    * leaking file descriptors because                             *
    * it 'unlink' the named pipe used to read data from the        *
    * 'sourceuserexit' program without                             *
    * closing it first.                                            *
    * Finally it reaches the limit for opened file descriptors and *
    * start putting follwing                                       *
    * OS error messages in the db2diag.log.                        *
    *                                                              *
    * db2diag.log :                                                *
    * ------------------------------------------------------------ *
    * ----                                                         *
    * -------------------------------------                        *
    *                                                              *
    * 2011-02-06-11.28.37.848709-300 I4048694A573      LEVEL:      *
    * Error                                                        *
    * PID    : 201224              TID  : 32003      PROC :        *
    * db2sysc                                                      *
    * 1                                                            *
    * INSTANCE: xxxxxxxx            NODE : 001        DB  :        *
    * xxxxxxxx                                                     *
    * APPHDL  : 1-45212              APPID:                        *
    * *N1.xxxxxxxx.110206162803                                    *
    * AUTHID  : LOADPROD                                           *
    * EDUID  : 32003                EDUNAME: db2agntp (xxxxxxxx) 1 *
    * FUNCTION: DB2 UDB, database utilities, DIAG_ERROR, probe:0   *
    * DATA #1 : String, 144 bytes                                  *
    * LOADID: 4208.2011-02-06-11.28.06.289044.1 (70;1578)          *
    * Reading db2nodes because of error  , -2062614522, 0,         *
    * Detected in                                                  *
    * file:sqluSocket.C, Line:615                                  *
    *                                                              *
    * 2011-02-06-11.28.37.854981-300 E4049268A987      LEVEL:      *
    * Error                                                        *
    * (OS)                                                         *
    * PID    : 201224              TID  : 32003      PROC :        *
    * db2sysc                                                      *
    * 1                                                            *
    * INSTANCE: xxxxxxxx            NODE : 001        DB  :        *
    * xxxxxxxx                                                     *
    * APPHDL  : 1-45212              APPID:                        *
    * *N1.xxxxxxxx.110206162803                                    *
    * AUTHID  : LOADPROD                                           *
    * EDUID  : 32003                EDUNAME: db2agntp (xxxxxxxx) 1 *
    * FUNCTION: DB2 UDB, oper system services, sqloopenp, probe:80 *
    * MESSAGE : ZRC=0x850F0006=-2062614522=SQLO_FHNL "TOO MANY     *
    * OPEN                                                         *
    * FILES"                                                       *
    *           DIA8306C Too many files were opened.               *
    * CALLED  : OS, -, open                                        *
    * OSERR  : EMFILE (24) "Too many open files"                   *
    * DATA #1 : Codepath, 8 bytes                                  *
    * 4:12:18:20:23:24:37                                          *
    * DATA #2 : File name, 33 bytes                                *
    * /db2home/xxxxxxxx/sqllib/db2systm                            *
    * DATA #3 : Bitmask, 4 bytes                                   *
    * 0x00000354                                                   *
    * DATA #4 : Hex integer, 4 bytes                               *
    * 0x000001A0                                                   *
    * DATA #5 : signed integer, 4 bytes                            *
    * 0                                                            *
    * DATA #6 : signed integer, 4 bytes                            *
    * 0                                                            *
    * DATA #7 : String, 105 bytes                                  *
    * Search for ossError*Analysis probe point after this log      *
    * entry                                                        *
    * for further                                                  *
    * self-diagnosis of this problem.                              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 V9.7 Fix Pack 6                               *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 V9.7 Fix Pack 6
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC79523

  • 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

    2011-10-28

  • Closed date

    2012-06-06

  • Last modified date

    2012-06-06

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

    IC75398

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

    IC91874

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP

  • R970 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC79523

Modified date: 06 June 2012