lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven A Rowe <sar...@syr.edu>
Subject RE: Test failure in modules/benchmark/: byTask.TestPerfTasksLogic
Date Tue, 14 Feb 2012 17:18:38 GMT
Thanks Shai!

From: Shai Erera [mailto:serera@gmail.com]
Sent: Tuesday, February 14, 2012 12:17 PM
To: dev@lucene.apache.org
Subject: Re: Test failure in modules/benchmark/: byTask.TestPerfTasksLogic

Found the problem, though I don't understand why didn't it always (!!!) fail.

The problem is that DocMaker.setConfig initializes the ContentSource, however it doesn't close
it first if its current instance is not null. How can this happen? If your .alg has a resetInputs
(and such) tasks, then DocMaker.resetInputs is called, which calls DocMaker.setConfig ...

Like I wrote, I have no idea why doesn't it always fail. In fact, here's a short test that
reproduces it, and always fails irregardless of seeds:

public void testDocMakerLeak() throws Exception {
    Properties props = new Properties();
    props.setProperty("content.source", "org.apache.lucene.benchmark.byTask.feeds.LineDocSource");
    props.setProperty("docs.file", getReuters20LinesFile());
    props.setProperty("content.source.forever", "false");
    PerfRunData runData = new PerfRunData(new Config(props));

    // this causes the leak !
    ResetInputsTask reset = new ResetInputsTask(runData);
    reset.doLogic();
    reset.close();

    runData.close();
  }

But now Robert tells me that it passes for him, which leaves me baffled again ..

Anyway, if you add this to DocMaker.setConfig (inside the first try), it fixes the bug (and
there's definitely a bug):

if (source != null) {
  source.close();
}

I will fix it on both trunk and 3x (where the bug exists too !) and add the above test to
TestDocMaker.

Shai
On Mon, Feb 13, 2012 at 8:06 PM, Robert Muir <rcmuir@gmail.com<mailto:rcmuir@gmail.com>>
wrote:
I poked around... I got nothing. We should probably just open an
issue, maybe someone else can see the bug.

On Mon, Feb 13, 2012 at 12:48 PM, Robert Muir <rcmuir@gmail.com<mailto:rcmuir@gmail.com>>
wrote:
> The previous time we had these problems, I committed a half-way fix
> admitting there were still sporatic problems.
>
> So i traced this down a little more, you can add
> -Dtestmethod=testParallelExhausted to steven's 'reproduce-with'
> command-line and it fails. all other test methods are fine.
>
> So testParallelExhausted (with the seed etc he specified) is somehow
> doing something to create a leak... it looks the same as the other
> methods so I suspect the leak is not in test code but in benchmark
> code.
>
> On Mon, Feb 13, 2012 at 12:46 PM, Uwe Schindler <uwe@thetaphi.de<mailto:uwe@thetaphi.de>>
wrote:
>> I have the feeling we already fixed that or tried to? Robert?
>>
>> Uwe
>> --
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, 28213 Bremen
>> http://www.thetaphi.de
>>
>>
>>
>> Robert Muir <rcmuir@gmail.com<mailto:rcmuir@gmail.com>> schrieb:
>>>
>>> On Sat, Feb 11, 2012 at 1:35 PM, Steven A Rowe <sarowe@syr.edu<mailto:sarowe@syr.edu>>
wrote:
>>> > This fails 100% of the time for me with the given seed, and passes when
>>> > I don't specify the seed:
>>> >
>>>
>>> fails for me too on a windows box with no virus scanners. So I think
>>> in some situations we still have "reuters.first20.lines.txt" open.
>>>
>>> --
>>> lucidimagination.com<http://lucidimagination.com>
>>>
>>> ________________________________
>>>
>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org<mailto:dev-unsubscribe@lucene.apache.org>
>>> For additional commands, e-mail: dev-help@lucene.apache.org<mailto:dev-help@lucene.apache.org>
>>>
>>
>
>
>
> --
> lucidimagination.com<http://lucidimagination.com>



--
lucidimagination.com<http://lucidimagination.com>

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

Mime
View raw message