IC92052: EXCESSIVELY LARGE MEMORY ALLOCATION ATTEMPTS FROM FAST INTEGER SORT DUE TO WRONG MEMORY SIZE CALCULATION

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • A Fast Integer Sort is a DB2 internal operation for sorting
    integer data. During a Fast Integer Sort execution, the
    allocated memory for the sort might need to expand.  If the
    configured SORTHEAP size is reduced during the execution of the
    statement, the additional size required may be calculated
    incorrectly, resulting in the attempt to allocate an excessively
    large amount of memory.  For example, the configured SORTHEAP
    size might be reduced by STMM tuning.
    
    Attempting to allocate excessive amounts of memory leads to
    various symptoms depending on the operating system and
    configuration.  Symptoms might include out of memory errors at
    the instance or system level only affecting the allocation
    attempt, or more severe system-wide symptoms such as paging and
    system hangs/crashes if the allocation attempt proceeds. The
    system-wide symptoms are more likely to occur on AIX systems.
    In some cases, DB2 processes might be terminated by the
    operating system.  Out of memory errors will be reflected in the
    db2diag.log file.  Instance memory allocation failures will be
    reflected by "No memory available" messages from the
    requestMemory function.  System memory allocation failures on
    Windows systems will be reflected by messages reporting a
    failure to allocate private memory from the VirtualAlloc
    function due to insufficient resources.  System memory
    allocation failures on UNIX systems will be reflected by
    reporting EINVAL and/or ENOMEM errors from the shmget operating
    system function as follows:
    
    The db2diag.log file might show repeated errors :
    
    2013-05-01-09.47.33.691608-240 E44103A526 LEVEL: Error (OS)
    PID     : 12623                TID : 2199438485840 PROC: db2sysc
    INSTANCE: dbguest8             NODE : 000           DB: SAMPLE
    APPHDL  : 0-1525 APPID:*LOCAL.dbguest8.130501134258
    AUTHID  : DBGUEST8             HOSTNAME: dbhost
    EDUID   : 18                   EDUNAME: db2agent (SAMPLE)
    FUNCTION: DB2 UDB, SQO Memory Management,
    sqloMemCreateSingleSegment, probe:100
    CALLED  : OS, -, shmget
    OSERR   : EINVAL (22) "Invalid argument"
    
    To obtain a full stack of the error set, issue the following
    command:
    
    db2pdcfg -catch diagstr="Cannot allocate memory"
    
    If the problem condition recurs, the following stack will be
    written to the db2diag.log file:
    
    Caught String Cannot allocate memory. Dumping stack trace
    CALLSTCK: (Static functions may not be resolved correctly, as
    they are resolved to the nearest symbol)
    
      [1] pdLogSysRC
      [2] /home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x3561002
      [3] sqloGetSharedMemoryFromOs
      [4] SMemSet::allocateChunkGroup
      [5] SMemSet::getChunksFromTree
      [6] SMemSet::getContiguousChunks
      [7] SMemBasePool::getNewChunkSubgroup
      [8] SQLO_MEM_POOL::getInitialChunks
      [9] sqloCreateMemorySubPool
      [10] sqlrifisGrowBuf
      [11] sqlrifis2
    ...
    
    "sqlrifisGrowBuf" is the function that allocates more memory for
    the Fast Integer Sort.
    

Local fix

  • Configure SORTHEAP to a fixed value in order to prevent STMM
    from performing dynamic sortheap configuration updates.  Note
    that SHEAPTHRES_SHR must also be manually configured.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All users                                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 version 10.1.0.3.                             *
    ****************************************************************
    

Problem conclusion

  • The problem is first fixed in DB2 version 10.1.0.3.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC92052

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-05-02

  • Closed date

    2013-09-27

  • Last modified date

    2013-09-27

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

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

    IC94095

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RA10 PSN

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

DB2 for Linux, UNIX and Windows

Software version:

10.1

Reference #:

IC92052

Modified date:

2013-09-27

Translate my page

Machine Translation

Content navigation