JDK-8095839 : [Linux] Unit test run dies with too many open files
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8u20
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-06-16
  • Updated: 2015-06-12
  • Resolved: 2014-06-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u20Fixed
Related Reports
Relates :  
Description
The new unit tests added for RT-20295 cause the JVM running the unit tests to fail with too many open files. Once this happens, all subsequent tests in the graphics module fail (several hundred of them).

The failures are of the following form.

com.sun.javafx.iio.GIFLoaderTest > testReadGIFFile FAILED
    javax.imageio.IIOException: Can't create cache file!
        at javax.imageio.ImageIO.createImageInputStream(ImageIO.java:361)
        at javax.imageio.ImageIO.read(ImageIO.java:1351)
        at com.sun.javafx.iio.GIFLoaderTest.testReadGIFFile(GIFLoaderTest.java:217)
        at com.sun.javafx.iio.GIFLoaderTest.testReadGIFFile(GIFLoaderTest.java:226)

        Caused by:
        java.nio.file.FileSystemException: /tmp/imageio3789392384406929084.tmp: Too many open files


OR:

com.sun.javafx.geom.TransformedShapeTest > initializationError FAILED
    java.lang.ClassNotFoundException: com.sun.javafx.geom.TransformedShapeTest

        Caused by:
        java.io.FileNotFoundException: /localhome/kcr/javafx/8u-kcr/jfx/rt/modules/graphics/build/classes/test/com/sun/javafx/geom/TransformedShapeTest.class (Too many open files)


Comments
Changeset: 54a8fee7f46e Author: vadim Date: 2014-06-16 21:34 +0400 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/54a8fee7f46e
16-06-2014

+1 Since this is a test fix, let's get this into today's integration, since it will fix a nightly build failure and it won't invalidate any testing.
16-06-2014

Kevin, please review the fix: http://cr.openjdk.java.net/~vadim/RT-37565/webrev.00/ I used try-with-resources and copied some more code from the ImageIO.
16-06-2014

I verified that locally reverting just the test changes from RT-20295 makes the failure go away.
16-06-2014

I suspect that the new unit tests are keeping the image files open after the test run is complete.
16-06-2014