IBM Support

IZ88332: PROCESS HANG DUE TO DEADLOCK BETWEEN SELPOLL AND KFCNTL APPLIES TO AIX 6100-07

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A process hang is possible if its one thread is calling
    poll() with POLLRDNORM events to check a file descriptor
    while its another thread is calling fcntl() with F_DUP2FD
    command on the same file descriptor.
    When process is hung, it has the following stack trace:
    
    pvthread+047800 STACK:
    [00066870]e_block_thread+000290 ()
    [000674C8]e_sleep_thread+0000E8 (??, ??, ??)
    [00565ABC]_getf_threaded+00011C (??, ??, ??)
    [005662C4]getft+0000C4 (??, ??, ??)
    [0058C128]fdtosth+000068 (??)
    [005F7C24]selpoll+000184 (??, ??, ??, ??, ??, ??, ??)
    [0062EB34]fp_poll+000274 (??, ??, ??, ??)
    [0062E3D8]_poll+000258 (??, ??, ??, ??)
    
    pvthread+046200 STACK:
    [00066870]e_block_thread+000290 ()
    [000674C8]e_sleep_thread+0000E8 (??, ??, ??)
    [004E207C]closex+00039C (??, ??)
    [006E7F1C]kfcntl+000FBC (??, ??, ??)
    

Local fix

  • There are two workrounds to avoid
    such kind of process hang:
    
    1. Use POLLIN instead of POLLRDNORM.
    2. Avoid to poll and dup2 on same
       file descriptor at the same time.
    

Problem summary

  • A process hang is possible if its one thread is calling
    poll() with POLLRDNORM events to check a file descriptor
    while its another thread is calling fcntl() with F_DUP2FD
    command on the same file descriptor.
    When process is hung, it has the following stack trace:
    
    pvthread+047800 STACK:
     00066870 e_block_thread+000290 ()
     000674C8 e_sleep_thread+0000E8 (??, ??, ??)
     00565ABC _getf_threaded+00011C (??, ??, ??)
     005662C4 getft+0000C4 (??, ??, ??)
     0058C128 fdtosth+000068 (??)
     005F7C24 selpoll+000184 (??, ??, ??, ??, ??, ??, ??)
     0062EB34 fp_poll+000274 (??, ??, ??, ??)
     0062E3D8 _poll+000258 (??, ??, ??, ??)
    
    pvthread+046200 STACK:
     00066870 e_block_thread+000290 ()
     000674C8 e_sleep_thread+0000E8 (??, ??, ??)
     004E207C closex+00039C (??, ??)
     006E7F1C kfcntl+000FBC (??, ??, ??)
    

Problem conclusion

  • Avoid getft() calls
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ88332

  • Reported component name

    AIX 610 STD EDI

  • Reported component ID

    5765G6200

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Submitted date

    2010-11-05

  • Closed date

    2010-11-05

  • Last modified date

    2013-03-24

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

    IZ82482

  • 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 U838167

       UP11/10/20 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":"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":"","label":""}},{"Business Unit":{"code":"BU054","label":"Systems 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":"","label":""}}]

Document Information

Modified date:
24 March 2013