Lucene - Core
  1. Lucene - Core
  2. LUCENE-2852

RAMInputStream hits false EOF if you seek to EOF then seek back then readBytes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: core/store
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      TestLazyLoadThreadSafety fails in hudson, possibly an issue with RAMDirectory.
      If you hack lucene testcase to return another directory, the same seed will pass.

      1. LUCENE-2852.patch
        4 kB
        Michael McCandless

        Activity

        Robert Muir created issue -
        Hide
        Robert Muir added a comment -

        [junit] NOTE: reproduce with: ant test -Dtestcase=TestThreadSafe -Dtestmethod=testLazyLoadThreadSafety -Dtests.seed=-1064017852044447297:2570930923565383654 -Dtests.multiplier=3

        Show
        Robert Muir added a comment - [junit] NOTE: reproduce with: ant test -Dtestcase=TestThreadSafe -Dtestmethod=testLazyLoadThreadSafety -Dtests.seed=-1064017852044447297:2570930923565383654 -Dtests.multiplier=3
        Hide
        Robert Muir added a comment -

        I dont have time to dig into this one right now, but i think the first thing to check is if the problem is when filesize % buffersize == 0

        If this is the case, its the same off-by-one we had in MMapDirectory.

        Show
        Robert Muir added a comment - I dont have time to dig into this one right now, but i think the first thing to check is if the problem is when filesize % buffersize == 0 If this is the case, its the same off-by-one we had in MMapDirectory.
        Michael McCandless made changes -
        Field Original Value New Value
        Assignee Michael McCandless [ mikemccand ]
        Hide
        Michael McCandless added a comment -

        Patch.

        Amazing this corner case has lasted so long undetected!

        If you seek to EOF (or, beyond), and then seek back to the same block as where you just were, then the currentBufferIndex is off and you hit premature EOF.

        Show
        Michael McCandless added a comment - Patch. Amazing this corner case has lasted so long undetected! If you seek to EOF (or, beyond), and then seek back to the same block as where you just were, then the currentBufferIndex is off and you hit premature EOF.
        Michael McCandless made changes -
        Attachment LUCENE-2852.patch [ 12467744 ]
        Michael McCandless made changes -
        Summary TestThreadSafe hudson failure RAMInputStream hits false EOF if you seek to EOF then seek back then readBytes
        Michael McCandless made changes -
        Fix Version/s 2.9.5 [ 12315914 ]
        Fix Version/s 3.0.4 [ 12315913 ]
        Fix Version/s 3.1 [ 12314822 ]
        Fix Version/s 4.0 [ 12314025 ]
        Hide
        Michael McCandless added a comment -

        Fixed on 3.1, 4.0... I'll leave open for 2.9.x/3.0.x in case we do another release for them.

        Show
        Michael McCandless added a comment - Fixed on 3.1, 4.0... I'll leave open for 2.9.x/3.0.x in case we do another release for them.
        Hide
        Michael McCandless added a comment -

        Resolving. If we ever do another 2.9.x / 3.0.x we can backport by looking @ resolved 3.x issues.

        Show
        Michael McCandless added a comment - Resolving. If we ever do another 2.9.x / 3.0.x we can backport by looking @ resolved 3.x issues.
        Michael McCandless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.0.4 [ 12315913 ]
        Fix Version/s 2.9.5 [ 12315914 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12541868 ] Default workflow, editable Closed status [ 12564185 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12564185 ] jira [ 12585616 ]
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1
        Grant Ingersoll made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        8d 23h 52m 1 Michael McCandless 16/Jan/11 16:25
        Resolved Resolved Closed Closed
        72d 23h 24m 1 Grant Ingersoll 30/Mar/11 16:50

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development