Hadoop Common
  1. Hadoop Common
  2. HADOOP-10457

S3N NPEs if you do a read() after a seek() past the EOF

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.0.0, 2.4.0
    • Fix Version/s: 2.5.0
    • Component/s: fs/s3
    • Labels:
      None

      Description

      if you do a seek past the EOF of an S3n file

      1. it doesn't throw any exception
      2. on the next read, you get to see a stack trace

        Issue Links

          Activity

          Hide
          Steve Loughran added a comment -

          found by the new FS contract tests

          Show
          Steve Loughran added a comment - found by the new FS contract tests
          Hide
          Steve Loughran added a comment -
          
          testSeekPastEndOfFileThenReseekAndRead(org.apache.hadoop.fs.contract.s3n.TestNativeS3SeekContract)  Time elapsed: 4.499 sec  <<< ERROR!
          java.lang.NullPointerException: null
          	at org.apache.hadoop.fs.s3native.NativeS3FileSystem$NativeS3FsInputStream.read(NativeS3FileSystem.java:131)
          	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
          	at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
          	at java.io.FilterInputStream.read(FilterInputStream.java:83)
          	at org.apache.hadoop.fs.contract.AbstractSeekContractTest.testSeekPastEndOfFileThenReseekAndRead(AbstractSeekContractTest.java:219)
          	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:606)
          	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
          	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
          	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
          	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
          	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
          	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
          	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
          	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
          	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
          	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
          	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
          
          Show
          Steve Loughran added a comment - testSeekPastEndOfFileThenReseekAndRead(org.apache.hadoop.fs.contract.s3n.TestNativeS3SeekContract) Time elapsed: 4.499 sec <<< ERROR! java.lang.NullPointerException: null at org.apache.hadoop.fs.s3native.NativeS3FileSystem$NativeS3FsInputStream.read(NativeS3FileSystem.java:131) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read(BufferedInputStream.java:254) at java.io.FilterInputStream.read(FilterInputStream.java:83) at org.apache.hadoop.fs.contract.AbstractSeekContractTest.testSeekPastEndOfFileThenReseekAndRead(AbstractSeekContractTest.java:219) 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:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
          Hide
          Steve Loughran added a comment -

          was fixed in 2.5.0 via the HADOOP-9961 patch

          Show
          Steve Loughran added a comment - was fixed in 2.5.0 via the HADOOP-9961 patch
          Hide
          Vinod Kumar Vavilapalli added a comment -

          Closing old tickets that are already part of a release.

          Show
          Vinod Kumar Vavilapalli added a comment - Closing old tickets that are already part of a release.

            People

            • Assignee:
              Allen Wittenauer
              Reporter:
              Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development