IBM Support

IV45149: performance improvement in fail case of huge malloc() request APPLIES TO AIX 7100-03

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When a process trying to allocate huge amount of memory
    using the calls like malloc or calloc, it is possible
    that
    these calls may fail upon hitting the one of the
    resource limit like paging space, pinned memory etc ...
    In the failure case these calls may take longer time to
    return back to user with error number.
    During these longer periods before returning back to
    user,
    the thread stack of the process may look like:-
    
        (0)> stack 40210
        pvthread+9D1200 STACK:
        Use current context [F00000002FF47600] of cpu 126
        [005C0C30]shm_findsptrx+0000F0 (0000000000000000,
          F000000020000000,F00000002FF47270 [??])
        [005C0658]shm_removex+000018 (??, ??, ??)
        [005C0E28]shm_deletex+000048 (??, ??)
        [0063D5C4]_brk64+0003C4 (??, ??)
        [0063F288]_sbrk64+000068 (??)
        [0063D1B8]__sbrk+000238 (??)
        [00003850]ovlya_addr_sc_flih_main+000130 ()
        [90000000000F5DC]extend_brk+00005C (??, ??, ??)
        [9000000000A85A0]malloc_y+0003A0 (002386F26FC0FFFF,
         0000000000000000,09001000A0AB1530, 09001000A0A3FA80,
         3FFC000000000003,000000000001BA80,
           0000000000000000, 0000000000000000)
        [900000000010F48]malloc_common@AF102_86+000028 (??)
        [900000000010CD4]malloc+0000D4 (??)
        [9000000000103DC]calloc_common+00003C (??, ??)
        [90000000000EFE4]init_calloc+000044 (??, ??)
        [900000000010DA8]calloc+000028 (??, ??)
        [1000004F8]fopen_custom_buffer_size+000098 (??)
        [1000006C8]main+000088 (??, ??, ??)
        [1000002B0]__start+000070 ()
    

Local fix

  • Set the data limit using ulimit to avoid performance
    degradation with malloc/calloc failures.
    Same can be achieved by setting MAXDATA with LDR_CNTRL
    process environment variable
    

Problem summary

  • A process takes an abnormally large time to exit after a failed
    huge memory allocation. kdb would show the process spending
    most of its time in shm_findsptr64x().
    

Problem conclusion

  • Improve the hinting algorithm to catch a corner case.
    

Temporary fix

Comments

  • 6100-09 - use AIX APAR IV66299
    7100-03 - use AIX APAR IV45149
    

APAR Information

  • APAR number

    IV45149

  • Reported component name

    AIX V7.1

  • Reported component ID

    5765H4000

  • Reported release

    710

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Submitted date

    2013-07-02

  • Closed date

    2014-10-22

  • Last modified date

    2015-05-22

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

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

    IV66299 IV66309

Fix information

  • Fixed component name

    AIX V7.1

  • Fixed component ID

    5765H4000

Applicable component levels

  • R710 PSY U865837

       UP15/05/19 I 1000

PTF to Fileset Mapping

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSMV87","label":"AIX 6.1 Enterprise Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMVAX","label":"AIX Express Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG11R","label":"AIX 7.1 HIPERS, APARs and Fixes"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
22 May 2015