You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Andreas Beeker <ki...@apache.org> on 2018/11/18 19:11:42 UTC

JaCoCo ant task - file handle leak?

Hi Dominik / *,

I have reordered the ant build to collect as much as possible OOXML references with the new OOXMLLiteAgent [2], but this had some side-effects, which I'm currently trying to solve.

One of those seems to be a open file handle (I guess) which the JaCoCo ant task holds.

Please have a look at the deletion error in the Windows build [1] - maybe this is related to the second java-agent which is now registered.

Cheers,
Andi


[1] https://builds.apache.org/view/P/view/POI/job/POI-DSL-Windows-1.8

[2] https://bz.apache.org/bugzilla/show_bug.cgi?id=62921


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


Re: JaCoCo ant task - file handle leak?

Posted by Dominik Stadler <do...@gmx.at>.
Hi,

the new build-agent for ooxml-lite really pays off in build-execution time:
https://rawgit.com/centic9/poi-benchmark/master/results/org.apache.poi.benchmark.suite.BuildBenchmarks.benchmarkCompileAll.html

Very nice reduction at the end, from over 250 seconds down to around 100!

Thanks... Dominik.

On Sun, Nov 18, 2018 at 8:11 PM Andreas Beeker <ki...@apache.org> wrote:

> Hi Dominik / *,
>
> I have reordered the ant build to collect as much as possible OOXML
> references with the new OOXMLLiteAgent [2], but this had some side-effects,
> which I'm currently trying to solve.
>
> One of those seems to be a open file handle (I guess) which the JaCoCo ant
> task holds.
>
> Please have a look at the deletion error in the Windows build [1] - maybe
> this is related to the second java-agent which is now registered.
>
> Cheers,
> Andi
>
>
> [1] https://builds.apache.org/view/P/view/POI/job/POI-DSL-Windows-1.8
>
> [2] https://bz.apache.org/bugzilla/show_bug.cgi?id=62921
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>

Re: JaCoCo ant task - file handle leak?

Posted by Dominik Stadler <do...@gmx.at>.
Ah, I was wrong, the jobs fails at the 2nd part of verification build here.
This one actually uses the resulting source-zip-files to build, it calls
ant via ant ( <ant ...>) and this seems to hold onto resources instead of
freeing them correctly again. It happens probably because the sub-ant uses
a <taskdef uri="antlib:org.jacoco.ant"..> and the parent-Ant does not
unload this any more.

There are one or two similar questions, but no good answers, e.g.
http://ant.1045680.n5.nabble.com/taskdef-jars-unloading-amp-deleting-tt1354034.html#none
has none at all.

So the easiest option that I can think of would be to ignore the
delete-error on Windows. Another could be to exec ant as external process
in this build.xml instead of calling a sub-ant in the same process, however
this is probably again a bit error-prone on different OSes/CI-machines...

Dominik.

On Mon, Nov 19, 2018 at 8:16 AM Dominik Stadler <do...@gmx.at>
wrote:

> Hm,
>
> yes, seems like something like that happens.
>
> However the JaCoCo ant task should not use the jar-file in the build-dist
> directory, or? It should actually rather use the jar from the "/lib"
> directory.
>
> I can try to use the file-leak-detector to see if we can find where the
> file is actually kept open.
>
> Dominik.
>
> On Sun, Nov 18, 2018 at 8:11 PM Andreas Beeker <ki...@apache.org>
> wrote:
>
>> Hi Dominik / *,
>>
>> I have reordered the ant build to collect as much as possible OOXML
>> references with the new OOXMLLiteAgent [2], but this had some side-effects,
>> which I'm currently trying to solve.
>>
>> One of those seems to be a open file handle (I guess) which the JaCoCo
>> ant task holds.
>>
>> Please have a look at the deletion error in the Windows build [1] - maybe
>> this is related to the second java-agent which is now registered.
>>
>> Cheers,
>> Andi
>>
>>
>> [1] https://builds.apache.org/view/P/view/POI/job/POI-DSL-Windows-1.8
>>
>> [2] https://bz.apache.org/bugzilla/show_bug.cgi?id=62921
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
>> For additional commands, e-mail: dev-help@poi.apache.org
>>
>>

Re: JaCoCo ant task - file handle leak?

Posted by Dominik Stadler <do...@gmx.at>.
Hm,

yes, seems like something like that happens.

However the JaCoCo ant task should not use the jar-file in the build-dist
directory, or? It should actually rather use the jar from the "/lib"
directory.

I can try to use the file-leak-detector to see if we can find where the
file is actually kept open.

Dominik.

On Sun, Nov 18, 2018 at 8:11 PM Andreas Beeker <ki...@apache.org> wrote:

> Hi Dominik / *,
>
> I have reordered the ant build to collect as much as possible OOXML
> references with the new OOXMLLiteAgent [2], but this had some side-effects,
> which I'm currently trying to solve.
>
> One of those seems to be a open file handle (I guess) which the JaCoCo ant
> task holds.
>
> Please have a look at the deletion error in the Windows build [1] - maybe
> this is related to the second java-agent which is now registered.
>
> Cheers,
> Andi
>
>
> [1] https://builds.apache.org/view/P/view/POI/job/POI-DSL-Windows-1.8
>
> [2] https://bz.apache.org/bugzilla/show_bug.cgi?id=62921
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>