IBM Support

IZ90631: PROCESS HANG DUE TO DEADLOCK BETWEEN SELPOLL AND KFCNTL APPLIES TO AIX 5300-11

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

    IZ90631

  • Reported component name

    AIX 5.3

  • Reported component ID

    5765G0300

  • Reported release

    530

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Submitted date

    2010-12-13

  • Closed date

    2010-12-13

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

  • Fixed component ID

    5765G0300

Applicable component levels

  • R530 PSY U841917

       UP11/02/22 I 1000

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG11P","label":"APARs - AIX 5.3 environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"530","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
24 March 2013