RE: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) - Build # 4310 - Still Failing!

2014-09-14 Thread Uwe Schindler
This fails reproducible.

I will dig!

-
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de

> -Original Message-
> From: Policeman Jenkins Server [mailto:jenk...@thetaphi.de]
> Sent: Sunday, September 14, 2014 2:48 AM
> To: no...@apache.org; sar...@gmail.com; rm...@apache.org;
> u...@thetaphi.de; mikemcc...@apache.org; dev@lucene.apache.org
> Subject: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) - Build #
> 4310 - Still Failing!
> 
> Build: http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Windows/4310/
> Java: 64bit/jdk1.7.0_67 -XX:-UseCompressedOops -
> XX:+UseConcMarkSweepGC
> 
> 1 tests failed.
> FAILED:
> junit.framework.TestSuite.org.apache.lucene.benchmark.byTask.TestPerfTa
> sksParse
> 
> Error Message:
> Could not remove the following files (in the order of attempts):
> C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt:
> java.nio.file.AccessDeniedException:
> C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt
> C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt:
> java.nio.file.AccessDeniedException:
> C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt
> C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001:
> java.nio.file.DirectoryNotEmptyException:
> C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001
> 
> Stack Trace:
> java.io.IOException: Could not remove the following files (in the order of
> attempts):
>C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt:
> java.nio.file.AccessDeniedException:
> C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt
>C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt:
> java.nio.file.AccessDeniedException:
> C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt
>C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001:
> java.nio.file.DirectoryNotEmptyException:
> C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> .TestPerfTasksParse-2D34950549928D3F-001
> 
>   at __randomizedtesting.SeedInfo.seed([2D34950549928D3F]:0)
>   at org.apache.lucene.util.IOUtils.rm(IOUtils.java:288)
>   at
> org.apache.lucene.util.TestRuleTemporaryFilesCleanup.afterAlways(TestRul
> eTemporaryFilesCleanup.java:126)
>   at
> com.carrotsearch.randomizedtesting.rules.TestRuleAdapter$1.afterAlways(T
> estRuleAdapter.java:31)
>   at
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(Stat
> ementAdapter.java:43)
>   at
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(Stat
> ementAdapter.java:36)
>   at
> org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAss
> ertionsRequired.java:43)
>   at
> org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure
> .java:48)
>   at
> org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRule
> IgnoreAfterMaxFailures.java:65)
>   at
> org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnore
> TestSuites.java:55)
>   at
> com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(Stat
> ementAdapter.java:36)
>   at
> com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.
> run(ThreadLeakControl.java:365)
>   at java.lang.Thread.run(Thread.java:745)
> 
> 
> 
> 
> Build Log:
> [...truncated 7622 lines...]
>[junit4] Suite: org.apache.lucene.benchmark.byTask.TestPerfTasksParse
>[junit4]   1> > queries:
>[junit4]   1>
>[junit4]   1> > queries:
>[junit4]   1>
>[junit4]   1> > queries:
>[junit4]   1>
>[junit4]   1> 

RE: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) - Build # 4310 - Still Failing!

2014-09-14 Thread Uwe Schindler
The problem here is incomplete cleanup:

This test parses the whole algorithm, it then creates an Algorithm instance 
containing all Tasks to execute. The "WriteLineDocsTask" is instantiated, which 
in fact opens the output stream for the line docs file in its ctor. But as the 
tasks are never executed, so the Task's close() is never called.

I fixed the whole thing by making Algorithm implement AutoCloseable (not 
Closeable, because it throws not only IOException). I also backported the whole 
stuff to Lucene 4, because this is unrelated to Robert's changes. Roberts 
changes just triggered other code execution paths, so GC did not clean up 
algorithm.

TODO: verify other uses of Algorithm and check that they are correctly closed. 
In fact I have seen this bug sometimes when running tests locally, so this was 
existent since long time, just in most cases GC was faster!

Uwe

-
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -Original Message-
> From: Uwe Schindler [mailto:u...@thetaphi.de]
> Sent: Sunday, September 14, 2014 12:21 PM
> To: dev@lucene.apache.org
> Subject: RE: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) -
> Build # 4310 - Still Failing!
> 
> This fails reproducible.
> 
> I will dig!
> 
> -
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de
> 
> > -Original Message-
> > From: Policeman Jenkins Server [mailto:jenk...@thetaphi.de]
> > Sent: Sunday, September 14, 2014 2:48 AM
> > To: no...@apache.org; sar...@gmail.com; rm...@apache.org;
> > u...@thetaphi.de; mikemcc...@apache.org; dev@lucene.apache.org
> > Subject: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) -
> > Build #
> > 4310 - Still Failing!
> >
> > Build: http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Windows/4310/
> > Java: 64bit/jdk1.7.0_67 -XX:-UseCompressedOops -
> > XX:+UseConcMarkSweepGC
> >
> > 1 tests failed.
> > FAILED:
> >
> junit.framework.TestSuite.org.apache.lucene.benchmark.byTask.TestPerfT
> > a
> > sksParse
> >
> > Error Message:
> > Could not remove the following files (in the order of attempts):
> > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt:
> > java.nio.file.AccessDeniedException:
> > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt
> > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt:
> > java.nio.file.AccessDeniedException:
> > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt
> > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001:
> > java.nio.file.DirectoryNotEmptyException:
> > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001
> >
> > Stack Trace:
> > java.io.IOException: Could not remove the following files (in the
> > order of
> > attempts):
> >C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt:
> > java.nio.file.AccessDeniedException:
> > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt
> >C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt:
> > java.nio.file.AccessDeniedException:
> > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt
> >C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> >

RE: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) - Build # 4310 - Still Failing!

2014-09-14 Thread Uwe Schindler
Hi,

I know why it fails consequently with the new Java 7 APIs:
FileOutputStream since version 1.0 of Java has a custom finalizer() method, so 
the file gets closed on GC, kept until now for backwards compatibility. But if 
you the stream with Java 7's NIO.2, the created OutputStream instance (some 
non-public internal platform specific impl class) no longer has a finalizer(), 
so the file handle is never closed when the OutputStream is GCed. This is great 
(f*ck finalizers)!

So by using NIO.2 we have a very nice "detector" for unclosed file, if people 
do broken stuff like "new Properties(new FileInputStream(...))" as seen in Solr 
quite often!

Uwe

-
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -Original Message-
> From: Uwe Schindler [mailto:u...@thetaphi.de]
> Sent: Sunday, September 14, 2014 1:16 PM
> To: dev@lucene.apache.org
> Subject: RE: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) -
> Build # 4310 - Still Failing!
> 
> The problem here is incomplete cleanup:
> 
> This test parses the whole algorithm, it then creates an Algorithm instance
> containing all Tasks to execute. The "WriteLineDocsTask" is instantiated,
> which in fact opens the output stream for the line docs file in its ctor. But 
> as
> the tasks are never executed, so the Task's close() is never called.
> 
> I fixed the whole thing by making Algorithm implement AutoCloseable (not
> Closeable, because it throws not only IOException). I also backported the
> whole stuff to Lucene 4, because this is unrelated to Robert's changes.
> Roberts changes just triggered other code execution paths, so GC did not
> clean up algorithm.
> 
> TODO: verify other uses of Algorithm and check that they are correctly
> closed. In fact I have seen this bug sometimes when running tests locally, so
> this was existent since long time, just in most cases GC was faster!
> 
> Uwe
> 
> -
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de
> 
> 
> > -Original Message-
> > From: Uwe Schindler [mailto:u...@thetaphi.de]
> > Sent: Sunday, September 14, 2014 12:21 PM
> > To: dev@lucene.apache.org
> > Subject: RE: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) -
> > Build # 4310 - Still Failing!
> >
> > This fails reproducible.
> >
> > I will dig!
> >
> > -
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: u...@thetaphi.de
> >
> > > -Original Message-
> > > From: Policeman Jenkins Server [mailto:jenk...@thetaphi.de]
> > > Sent: Sunday, September 14, 2014 2:48 AM
> > > To: no...@apache.org; sar...@gmail.com; rm...@apache.org;
> > > u...@thetaphi.de; mikemcc...@apache.org; dev@lucene.apache.org
> > > Subject: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) -
> > > Build #
> > > 4310 - Still Failing!
> > >
> > > Build:
> > > http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Windows/4310/
> > > Java: 64bit/jdk1.7.0_67 -XX:-UseCompressedOops -
> > > XX:+UseConcMarkSweepGC
> > >
> > > 1 tests failed.
> > > FAILED:
> > >
> >
> junit.framework.TestSuite.org.apache.lucene.benchmark.byTask.TestPerfT
> > > a
> > > sksParse
> > >
> > > Error Message:
> > > Could not remove the following files (in the order of attempts):
> > > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> > >
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > > .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt:
> > > java.nio.file.AccessDeniedException:
> > > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> > >
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > > .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt
> > > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> > >
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > > .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt:
> > > java.nio.file.AccessDeniedException:
> > > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> > >
> >
> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
> > > .TestPerfTasksParse-2D34950549928D3F-001\linefile-002.txt
> > > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
> > >
> >
> Windows\lucene\build\benchmark\test

Re: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) - Build # 4310 - Still Failing!

2014-09-14 Thread Robert Muir
thank you for debugging this! I didn't know about this crazy finalizer
at all: I tried to figure it out last night, but i could not see the
problem and without a windows machine it was hopeless for me.

On Sun, Sep 14, 2014 at 7:29 AM, Uwe Schindler  wrote:
> Hi,
>
> I know why it fails consequently with the new Java 7 APIs:
> FileOutputStream since version 1.0 of Java has a custom finalizer() method, 
> so the file gets closed on GC, kept until now for backwards compatibility. 
> But if you the stream with Java 7's NIO.2, the created OutputStream instance 
> (some non-public internal platform specific impl class) no longer has a 
> finalizer(), so the file handle is never closed when the OutputStream is 
> GCed. This is great (f*ck finalizers)!
>
> So by using NIO.2 we have a very nice "detector" for unclosed file, if people 
> do broken stuff like "new Properties(new FileInputStream(...))" as seen in 
> Solr quite often!
>
> Uwe
>
> -
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de
>
>
>> -Original Message-
>> From: Uwe Schindler [mailto:u...@thetaphi.de]
>> Sent: Sunday, September 14, 2014 1:16 PM
>> To: dev@lucene.apache.org
>> Subject: RE: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) -
>> Build # 4310 - Still Failing!
>>
>> The problem here is incomplete cleanup:
>>
>> This test parses the whole algorithm, it then creates an Algorithm instance
>> containing all Tasks to execute. The "WriteLineDocsTask" is instantiated,
>> which in fact opens the output stream for the line docs file in its ctor. 
>> But as
>> the tasks are never executed, so the Task's close() is never called.
>>
>> I fixed the whole thing by making Algorithm implement AutoCloseable (not
>> Closeable, because it throws not only IOException). I also backported the
>> whole stuff to Lucene 4, because this is unrelated to Robert's changes.
>> Roberts changes just triggered other code execution paths, so GC did not
>> clean up algorithm.
>>
>> TODO: verify other uses of Algorithm and check that they are correctly
>> closed. In fact I have seen this bug sometimes when running tests locally, so
>> this was existent since long time, just in most cases GC was faster!
>>
>> Uwe
>>
>> -
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, D-28213 Bremen
>> http://www.thetaphi.de
>> eMail: u...@thetaphi.de
>>
>>
>> > -Original Message-
>> > From: Uwe Schindler [mailto:u...@thetaphi.de]
>> > Sent: Sunday, September 14, 2014 12:21 PM
>> > To: dev@lucene.apache.org
>> > Subject: RE: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) -
>> > Build # 4310 - Still Failing!
>> >
>> > This fails reproducible.
>> >
>> > I will dig!
>> >
>> > -
>> > Uwe Schindler
>> > H.-H.-Meier-Allee 63, D-28213 Bremen
>> > http://www.thetaphi.de
>> > eMail: u...@thetaphi.de
>> >
>> > > -Original Message-
>> > > From: Policeman Jenkins Server [mailto:jenk...@thetaphi.de]
>> > > Sent: Sunday, September 14, 2014 2:48 AM
>> > > To: no...@apache.org; sar...@gmail.com; rm...@apache.org;
>> > > u...@thetaphi.de; mikemcc...@apache.org; dev@lucene.apache.org
>> > > Subject: [JENKINS] Lucene-Solr-trunk-Windows (64bit/jdk1.7.0_67) -
>> > > Build #
>> > > 4310 - Still Failing!
>> > >
>> > > Build:
>> > > http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Windows/4310/
>> > > Java: 64bit/jdk1.7.0_67 -XX:-UseCompressedOops -
>> > > XX:+UseConcMarkSweepGC
>> > >
>> > > 1 tests failed.
>> > > FAILED:
>> > >
>> >
>> junit.framework.TestSuite.org.apache.lucene.benchmark.byTask.TestPerfT
>> > > a
>> > > sksParse
>> > >
>> > > Error Message:
>> > > Could not remove the following files (in the order of attempts):
>> > > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
>> > >
>> >
>> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
>> > > .TestPerfTasksParse-2D34950549928D3F-001\linefile-001.txt:
>> > > java.nio.file.AccessDeniedException:
>> > > C:\Users\JenkinsSlave\workspace\Lucene-Solr-trunk-
>> > >
>> >
>> Windows\lucene\build\benchmark\test\J0\temp\lucene.benchmark.byTask
>> > > .TestPerfTasksParse-2D349