Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7009975

Large file support broken in hs20-b04

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: hs20
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b06
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        It looks like the removal of the HPI in 6348631 has broken the large file support on Solaris in jdk7-b123. With hs20-b04 it is no longer possible to use java.io.FileInputStream, FileOutputStream or RandomAccessFile to open files >2GB. Other operations that cause the file to grow to larger than 2GB are also impacted.

        I've only briefly looked at the issue but it seems to be that os::open is using ::open rather than ::open64.

        Here are some of the regression tests that are failing:

        jdk/test/java/io/FileInputStream/LargeFileAvailable.java
        java.io.FileNotFoundException: /var/tmp/largefile1592599311387224322.tmp (Value too large for defined data type)
                at java.io.FileInputStream.open(Native Method)
                at java.io.FileInputStream.<init>(FileInputStream.java:137)
                at LargeFileAvailable.main(LargeFileAvailable.java:40)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:613)
                at com.sun.javatest.regtest.MainAction$SameVMThread.run(MainAction.java:575)
                at java.lang.Thread.run(Thread.java:732)

        jdk/test/java/io/File/SetLastModified.java
        java.io.IOException: File too large
                at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
                at sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:59)
                at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:90)
                at sun.nio.ch.IOUtil.write(IOUtil.java:61)
                at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:193)
                at SetLastModified.main(SetLastModified.java:109)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:613)
                at com.sun.javatest.regtest.MainAction$SameVMThread.run(MainAction.java:575)
                at java.lang.Thread.run(Thread.java:732)

        test/java/nio/channels/FileChannel/Size.java fails with:
        Exception in thread "main" java.io.IOException: File too large
                at sun.nio.ch.FileDispatcherImpl.truncate0(Native Method)
                at sun.nio.ch.FileDispatcherImpl.truncate(FileDispatcherImpl.java:79)
                at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:814)
                at Size.test2(Size.java:79)
                at Size.main(Size.java:48)

        test/java/nio/channels/FileChannel/Transfer.java fails with:
        java.io.FileNotFoundException: /var/tmp/blah6957361226591087591.tmp (Value too large for defined data type)
                at java.io.FileInputStream.open(Native Method)
                at java.io.FileInputStream.<init>(FileInputStream.java:137)
                at Transfer.xferTest04(Transfer.java:247)
                at Transfer.main(Transfer.java:54)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:613)
                at com.sun.javatest.regtest.MainAction$SameVMThread.run(MainAction.java:575)
                at java.lang.Thread.run(Thread.java:732)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                alanb Alan Bateman
                Reporter:
                alanb Alan Bateman
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: