lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LUCENE-5066) TestFieldsReader fails in 4.x with OOM
Date Wed, 19 Jun 2013 03:29:20 GMT
Robert Muir created LUCENE-5066:
-----------------------------------

             Summary: TestFieldsReader fails in 4.x with OOM
                 Key: LUCENE-5066
                 URL: https://issues.apache.org/jira/browse/LUCENE-5066
             Project: Lucene - Core
          Issue Type: Bug
            Reporter: Robert Muir
         Attachments: LUCENE-5066.patch

Its FaultyIndexInput is broken (doesn't implement seek/clone correctly).

This causes it to read bogus data and try to allocate an enormous byte[] for a term.

The bug was previously hidden:
FaultyDirectory doesnt override openSlice, so CFS must not be used at flush if you want to
trigger the bug.
FailtyIndexInput's clone is broken, it uses "new" but doesn't seek the clone to the right
place. This causes a disaster with BufferedIndexInput (which it extends), because BufferedIndexInput
(not just the delegate) must "know" its position since it has seek-within-block etc code...

It seems with this test (very simple one), that only 3.x codec triggers it because its term
dict relies upon clone()'s being seek'd to right place. 

I'm not sure what other codecs rely upon this, but imo we should also add a low-level test
for directories that does something like this to ensure its really tested:

{code}
dir.createOutput(x);
dir.openInput(x);
input.seek(somewhere);
clone = input.clone();
assertEquals(somewhere, clone.getFilePointer());
{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message