IBM Support

IV66299: performance improvement in fail case of huge malloc() request APPLIES TO AIX 6100-09

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

    IV66299

  • Reported component name

    AIX 610 STD EDI

  • Reported component ID

    5765G6200

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Submitted date

    2014-10-27

  • Closed date

    2014-10-27

  • Last modified date

    2015-11-22

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

    IV45149

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

Fix information

  • Fixed component name

    AIX 610 STD EDI

  • Fixed component ID

    5765G6200

Applicable component levels

  • R610 PSY U861403

       UP15/11/22 I 1000

PTF to Fileset Mapping

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SG11Q","label":"AIX 6.1 HIPERS, APARs and Fixes"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"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":"610","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":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSAUMY","label":"IBM AIX Enterprise Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SG11Q","label":"AIX 6.1 HIPERS, APARs and Fixes"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SG11R","label":"APARs - AIX 7.1 environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
17 December 2021