You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Kristian Rosenvold <kr...@gmail.com> on 2014/10/09 08:14:46 UTC
Interesting java8 bug....
It would appear that the ThreadPoolExecutor in UNIXProcess can keep
the vm running for up to 12 seconds after the last process has been
forked. Once you see the symptom it is clearly visible; maven appears
to finish the build normally, but there is a short pause after this
message and the return of the command prompt:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.155s
[INFO] Finished at: Thu Oct 09 08:07:38 CEST 2014
[INFO] Final Memory: 14M/334M
[INFO] ------------------------------------------------------------------------
<Insert pause here>
The issue is https://jira.codehaus.org/browse/MEXEC-145 and applies to
a truckload of maven stuff since we fork a lot of processes, the bug
only seems to affect VM shutdown (which is also NOT very good since we
fork a lot of VM's too :).
I searched the jdk issue tracker but could not find any evidence of
this bug, hence the cc to Rory.
Kristian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Interesting java8 bug....
Posted by Dawid Weiss <da...@gmail.com>.
Hi Holger,
> I am quite certain the problem has to do with tiered compilation being
> on by default in JDK8 and kicking in/still
Isn't it on by default in JDK7 as well (last I can remember it was
turned on in one of the builds and stayed on).
Dawid
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Interesting java8 bug....
Posted by Holger Hoffstätte <ho...@googlemail.com>.
On Thu, 09 Oct 2014 10:54:35 +0200, Kristian Rosenvold wrote:
> Wow, that certainly fixed the problem. Stuff seems noticeably faster,
> too ! Do you know if this has been reported to the JDK ?
Good to know that you see the same effect. :)
I think I read that the JRuby folks set this by default as well.
No idea if this has been reported; it's not citical for anything that
stays running for more than a few seconds, and since it's so very
timing-dependent/not easily reproducible probably nobody has
noticed/investigated yet..
-h
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Interesting java8 bug....
Posted by Kristian Rosenvold <kr...@gmail.com>.
Wow, that certainly fixed the problem. Stuff seems noticeably faster,
too ! Do you know if this has been reported to the JDK ?
Kristian
2014-10-09 10:41 GMT+02:00 Holger Hoffstätte
<ho...@googlemail.com>:
> On Thu, 09 Oct 2014 08:18:34 +0100, Rory O'Donnell Oracle, Dublin Ireland
> wrote:
>
>> Can you log a Java Incident and I will follow up ?
>
> I am quite certain the problem has to do with tiered compilation being
> on by default in JDK8 and kicking in/still running while the VM tries
> to exit after a brief run. So far the best way I found to mitigate this
> problem is to set
>
> -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1
>
> in $MAVEN_OPTS. That seems to work for me, and gives much faster
> and more consistent startup times as well. The fact that less code
> is JITted early does not seem to matter much.
>
> -h
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Interesting java8 bug....
Posted by Holger Hoffstätte <ho...@googlemail.com>.
On Thu, 09 Oct 2014 08:18:34 +0100, Rory O'Donnell Oracle, Dublin Ireland
wrote:
> Can you log a Java Incident and I will follow up ?
I am quite certain the problem has to do with tiered compilation being
on by default in JDK8 and kicking in/still running while the VM tries
to exit after a brief run. So far the best way I found to mitigate this
problem is to set
-XX:CICompilerCount=1 -XX:TieredStopAtLevel=1
in $MAVEN_OPTS. That seems to work for me, and gives much faster
and more consistent startup times as well. The fact that less code
is JITted early does not seem to matter much.
-h
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Interesting java8 bug....
Posted by "Rory O'Donnell Oracle, Dublin Ireland" <ro...@oracle.com>.
Hi Kristian,
you can log an incident at bugs.sun.com. Pass me the incident number and
I will monitor it's progress.
Rgds,Rory
On 09/10/2014 09:38, Kristian Rosenvold wrote:
> Making minimal test cases is always interesting :)
>
> It appears there is some additional constraint that needs to be
> satisfied, so further research needs to be done to determine the exact
> cause of the problem.
>
> It does seem to affect most of the forking code in maven, which should
> imply some kind of interaction with commons-exec or plexus-utils.
>
> Kristian
>
> 2014-10-09 9:18 GMT+02:00 Rory O'Donnell Oracle, Dublin Ireland
> <ro...@oracle.com>:
>> Hi Kristian,
>>
>> Can you log a Java Incident and I will follow up ?
>>
>> Rgds,Rory
>>
>> On 09/10/2014 07:14, Kristian Rosenvold wrote:
>>> It would appear that the ThreadPoolExecutor in UNIXProcess can keep
>>> the vm running for up to 12 seconds after the last process has been
>>> forked. Once you see the symptom it is clearly visible; maven appears
>>> to finish the build normally, but there is a short pause after this
>>> message and the return of the command prompt:
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] BUILD SUCCESS
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 2.155s
>>> [INFO] Finished at: Thu Oct 09 08:07:38 CEST 2014
>>> [INFO] Final Memory: 14M/334M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> <Insert pause here>
>>>
>>>
>>> The issue is https://jira.codehaus.org/browse/MEXEC-145 and applies to
>>> a truckload of maven stuff since we fork a lot of processes, the bug
>>> only seems to affect VM shutdown (which is also NOT very good since we
>>> fork a lot of VM's too :).
>>>
>>> I searched the jdk issue tracker but could not find any evidence of
>>> this bug, hence the cc to Rory.
>>>
>>> Kristian
>>
>> --
>> Rgds,Rory O'Donnell
>> Quality Engineering Manager
>> Oracle EMEA , Dublin, Ireland
>>
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Interesting java8 bug....
Posted by Kristian Rosenvold <kr...@gmail.com>.
Making minimal test cases is always interesting :)
It appears there is some additional constraint that needs to be
satisfied, so further research needs to be done to determine the exact
cause of the problem.
It does seem to affect most of the forking code in maven, which should
imply some kind of interaction with commons-exec or plexus-utils.
Kristian
2014-10-09 9:18 GMT+02:00 Rory O'Donnell Oracle, Dublin Ireland
<ro...@oracle.com>:
> Hi Kristian,
>
> Can you log a Java Incident and I will follow up ?
>
> Rgds,Rory
>
> On 09/10/2014 07:14, Kristian Rosenvold wrote:
>>
>> It would appear that the ThreadPoolExecutor in UNIXProcess can keep
>> the vm running for up to 12 seconds after the last process has been
>> forked. Once you see the symptom it is clearly visible; maven appears
>> to finish the build normally, but there is a short pause after this
>> message and the return of the command prompt:
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESS
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 2.155s
>> [INFO] Finished at: Thu Oct 09 08:07:38 CEST 2014
>> [INFO] Final Memory: 14M/334M
>> [INFO]
>> ------------------------------------------------------------------------
>> <Insert pause here>
>>
>>
>> The issue is https://jira.codehaus.org/browse/MEXEC-145 and applies to
>> a truckload of maven stuff since we fork a lot of processes, the bug
>> only seems to affect VM shutdown (which is also NOT very good since we
>> fork a lot of VM's too :).
>>
>> I searched the jdk issue tracker but could not find any evidence of
>> this bug, hence the cc to Rory.
>>
>> Kristian
>
>
> --
> Rgds,Rory O'Donnell
> Quality Engineering Manager
> Oracle EMEA , Dublin, Ireland
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Interesting java8 bug....
Posted by "Rory O'Donnell Oracle, Dublin Ireland" <ro...@oracle.com>.
Hi Kristian,
Can you log a Java Incident and I will follow up ?
Rgds,Rory
On 09/10/2014 07:14, Kristian Rosenvold wrote:
> It would appear that the ThreadPoolExecutor in UNIXProcess can keep
> the vm running for up to 12 seconds after the last process has been
> forked. Once you see the symptom it is clearly visible; maven appears
> to finish the build normally, but there is a short pause after this
> message and the return of the command prompt:
>
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.155s
> [INFO] Finished at: Thu Oct 09 08:07:38 CEST 2014
> [INFO] Final Memory: 14M/334M
> [INFO] ------------------------------------------------------------------------
> <Insert pause here>
>
>
> The issue is https://jira.codehaus.org/browse/MEXEC-145 and applies to
> a truckload of maven stuff since we fork a lot of processes, the bug
> only seems to affect VM shutdown (which is also NOT very good since we
> fork a lot of VM's too :).
>
> I searched the jdk issue tracker but could not find any evidence of
> this bug, hence the cc to Rory.
>
> Kristian
--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org