IBM Support

IV43175: FILEDESCRIPTORS LEAK WHEN ALL THE STREAM OBJECTS OR RANDOMACCESS FILE ARE NOT EXPLICITLY CLOSED BY THE APPLICATION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: The following IOException is thrown when a new
    FileDescriptor is opened either by stream objects or
    RandomAccessFile or when a new process is started.
    java.io.IOException: error=24, Too many open files
    .
    Stack Trace: N/A
    .
    

Local fix

Problem summary

  • When a FileDescriptor is shared by multiple instances of
    FileInputStream/FileOutputStream/RandomAccessFile objects,  IBM
    JDK closes the FileDescriptor only when no other instance shared
    the FileDescriptor. Hence, leakage of FileDescriptor is possible
    if the application did not explicitly close all the streams
    associated with a particular FileDescriptor object. Oracle JDK
    closes the FileDescriptor  while closing the first stream itself
     irrespective of multiple streams access the FileDescriptor.
    Hence the possibility of FileDescriptor leak is minimal.
    However, unexpected  IOException can happen if other streams try
    to access the FileDescriptor after closing the first stream.
    

Problem conclusion

  • This defect will be fixed in:
    6.0.0 SR14
    6.0.1 SR6
    7.0.0 SR5
    .
     IBM JDK has introduced a new system property
    -Dcom.ibm.streams.CloseFDWithStream={trueIfalse} to support both
    the behavior. By default, the FileDescriptor will be closed
    while closing the first stream and thereby consistent with
    Oracle JDK behavior. If application want to retain the existing
    IBM JDK behavior, the property
    -Dcom.ibm.streams.CloseFDWithStream=false can be used. This
    property will be removed in a future Java release. Hence,
    application has to modified to adhere to the specification
    before migrating to higher release which do not support the
    property.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV43175

  • Reported component name

    JAVA CLASS LIBS

  • Reported component ID

    620700130

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-05-27

  • Closed date

    2013-06-11

  • Last modified date

    2013-08-06

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

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

Fix information

  • Fixed component name

    JAVA CLASS LIBS

  • Fixed component ID

    620700130

Applicable component levels

  • R600 PSY

       UP

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVQ3Y","label":"Java Class Libraries"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
06 August 2013