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 rcm...@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 rcm...@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 u...@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 rcm...@gmail.com schrieb: On Sat, Feb 11, 2012 at 1:35 PM, Steven A Rowe sar...@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 To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org -- lucidimagination.com -- lucidimagination.com - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
RE: Test failure in modules/benchmark/: byTask.TestPerfTasksLogic
Thanks Shai! From: Shai Erera [mailto:ser...@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 rcm...@gmail.commailto:rcm...@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 rcm...@gmail.commailto:rcm...@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 u...@thetaphi.demailto:u...@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 rcm...@gmail.commailto:rcm...@gmail.com schrieb: On Sat, Feb 11, 2012 at 1:35 PM, Steven A Rowe sar...@syr.edumailto:sar...@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.comhttp://lucidimagination.com To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.orgmailto:dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.orgmailto:dev-h...@lucene.apache.org -- lucidimagination.comhttp://lucidimagination.com -- lucidimagination.comhttp://lucidimagination.com - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.orgmailto:dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.orgmailto:dev-h...@lucene.apache.org
Re: Test failure in modules/benchmark/: byTask.TestPerfTasksLogic
On Sat, Feb 11, 2012 at 1:35 PM, Steven A Rowe sar...@syr.edu wrote: This fails 100% of the time for me with the given seed, and passes when I don't specify the seed: Thanks for reporting this. Guessing something still has a open file handle on reuters.first20.lines.txt and thats why it cannot be deleted... hopefully not something crazy like a virus checker... I'll see if I can reproduce on windows. -- lucidimagination.com - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
Re: Test failure in modules/benchmark/: byTask.TestPerfTasksLogic
On Sat, Feb 11, 2012 at 1:35 PM, Steven A Rowe sar...@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 - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
Re: Test failure in modules/benchmark/: byTask.TestPerfTasksLogic
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 rcm...@gmail.com schrieb: On Sat, Feb 11, 2012 at 1:35 PM, Steven A Rowe sar...@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 _ To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
Re: Test failure in modules/benchmark/: byTask.TestPerfTasksLogic
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 u...@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 rcm...@gmail.com schrieb: On Sat, Feb 11, 2012 at 1:35 PM, Steven A Rowe sar...@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 To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org -- lucidimagination.com - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
Re: Test failure in modules/benchmark/: byTask.TestPerfTasksLogic
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 rcm...@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 u...@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 rcm...@gmail.com schrieb: On Sat, Feb 11, 2012 at 1:35 PM, Steven A Rowe sar...@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 To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org -- lucidimagination.com -- lucidimagination.com - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
Test failure in modules/benchmark/: byTask.TestPerfTasksLogic
This fails 100% of the time for me with the given seed, and passes when I don't specify the seed: [junit] Testsuite: org.apache.lucene.benchmark.byTask.TestPerfTasksLogic [junit] Tests run: 23, Failures: 0, Errors: 1, Time elapsed: 5.744 sec [...] [junit] java.io.IOException: could not delete C:\cygwin\home\s\svn\lucene\dev\trunk\modules\benchmark\build\test\1\benchmark5139751397tmp\reuters.first20.lines.txt [junit] at org.apache.lucene.util._TestUtil.rmDir(_TestUtil.java:91) [junit] at org.apache.lucene.util.LuceneTestCase.clearTempDirectoriesAfterClass(LuceneTestCase.java:453) [junit] at org.apache.lucene.util.LuceneTestCase.afterClassLuceneTestCaseJ4(LuceneTestCase.java:383) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] at java.lang.reflect.Method.invoke(Method.java:597) [junit] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) [junit] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [junit] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) [junit] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37) [junit] at org.junit.runners.ParentRunner.run(ParentRunner.java:236) [junit] at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768) [junit] path C:\cygwin\home\s\svn\lucene\dev\trunk\modules\benchmark\build\test\1\benchmark5139751397tmp allocated from [junit] org.apache.lucene.util._TestUtil.getTempDir(_TestUtil.java:71) [junit] org.apache.lucene.benchmark.BenchmarkTestCase.beforeClassBenchmarkTestCase(BenchmarkTestCase.java:39) [junit] NOTE: reproduce with (hopefully): ant test -Dtestcase=TestPerfTasksLogic -Dtests.seed=-3c78ffcf5129d727:0:2790d04b1d8f5ebb -Dargs=-Dfile.encoding=Cp1252 [junit] NOTE: test params are: codec=Lucene40: {body=PostingsFormat(name=Lucene40WithOrds), docdate=PostingsFormat(name=Lucene40WithOrds), docdatenum=MockVariableIntBlock(baseBlockSize=109), docname=PostingsFormat(name=Memory doPackFST= true), sort_field=PostingsFormat(name=SimpleText), country=MockVariableIntBlock(baseBlockSize=109), docid=PostingsFormat(name=Memory doPackFST= true), $facets=MockVariableIntBlock(baseBlockSize=109), random_string=PostingsFormat(name=NestedPulsing), $full_path$=PostingsFormat(name=NestedPulsing), doctitle=PostingsFormat(name=MockSep), doctimesecnum=MockVariableIntBlock(baseBlockSize=109), $payloads$=Pulsing40(freqCutoff=3 minBlockSize=66 maxBlockSize=171)}, sim=RandomSimilarityProvider(queryNorm=false,coord=true): {}, locale=bg, timezone=Singapore [junit] NOTE: all tests run in this JVM: [junit] [TestPerfTasksLogic] [junit] NOTE: Windows 7 6.1 amd64/Sun Microsystems Inc. 1.6.0_21 (64-bit)/cpus=8,threads=1,free=90172032,total=264306688 [junit] - --- [junit] Testcase: org.apache.lucene.benchmark.byTask.TestPerfTasksLogic: Caused an ERROR [junit] java.lang.AssertionError: could not remove temp dir: C:\cygwin\home\s\svn\lucene\dev\trunk\modules\benchmark\build\test\1\benchmark5139751397tmp [junit] java.lang.RuntimeException: java.lang.AssertionError: could not remove temp dir: C:\cygwin\home\s\svn\lucene\dev\trunk\modules\benchmark\build\test\1\benchmark5139751397tmp [junit] at org.apache.lucene.util.LuceneTestCase.afterClassLuceneTestCaseJ4(LuceneTestCase.java:404) [junit] at org.apache.lucene.util.LuceneTestCase.clearTempDirectoriesAfterClass(LuceneTestCase.java:465) [junit] at org.apache.lucene.util.LuceneTestCase.afterClassLuceneTestCaseJ4(LuceneTestCase.java:383) [junit] [junit] [junit] Test org.apache.lucene.benchmark.byTask.TestPerfTasksLogic FAILED BUILD FAILED C:\cygwin\home\s\svn\lucene\dev\trunk\lucene\contrib\contrib-build.xml:61: The following error occurred while executing this line: C:\cygwin\home\s\svn\lucene\dev\trunk\lucene\common-build.xml:689: The following error occurred while executing this line: C:\cygwin\home\s\svn\lucene\dev\trunk\lucene\common-build.xml:678: Tests failed!