[ 
https://issues.apache.org/jira/browse/MCOMPILER-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17581375#comment-17581375
 ] 

Tal Inbar commented on MCOMPILER-504:
-------------------------------------

I ran compilation many times with java 17.0.2 in an attempt to reproduce and so 
far the issue does not occur on both WSL2 and Windows.

We'll upgrade to java 17 later on and see if it helps as more people will run 
compilation. I will update if the issue occurs again.

> Multi threaded compile crashes with a LifecycleExecutionException
> -----------------------------------------------------------------
>
>                 Key: MCOMPILER-504
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-504
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.8.1, 3.10.1
>            Reporter: Tal Inbar
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>         Attachments: maven compiler IllegalStateException - Stack trace.txt
>
>
> Compiling with multiple threads yields an 
> org.apache.maven.lifecycle.LifecycleExecutionException which is caused by a 
> java.lang.IllegalStateException as the first exception on the stack:
> {code:java}
> Caused by: java.lang.IllegalStateException: Current state = CODING_END, new 
> state = FLUSHED
>     at java.nio.charset.CharsetDecoder.throwIllegalStateException 
> (CharsetDecoder.java:998){code}
> The compilation is performed for a multi-module project.
> The issue is produced on WSL2 (Ubuntu 20.04), with Windows 11 Enterprise 
> Version 10.0.22621 Build 22621, using Maven version 3.8.6 and Maven compiler 
> plugin v3.10.1. JDK version is 15.0.2.
> The issue is also reproducible on Windows 11 natively with the same version 
> as above, using Maven version 3.6.1 and Maven compiler plugin v3.8.1, 
> although on windows the compile time is slower and the error occurs less 
> frequently. JDK version is 15.0.2 as well.
> Compilation was performed using the command :
> {code:java}
> mvn -X -T 1C compile -DskipTests{code}
> The issue can be worked around by using less threads (although the issue can 
> still occur) or by using the `<fork>true</fork>` parameter with the 
> `<executable>/path/to/java_home/bin/javac</executable>` parameter, although 
> this causes compilation to be two times slower and is less desirable. On 
> windows, compilation time for our project runs for 2 minutes with fork vs 1 
> minute without fork, or 4 minutes vs 2 minutes if using `mvn install` which 
> becomes an issue.
> I have attached a text file which includes the full stack trace (the name of 
> the compiled project displayed in the stack trace was replaced with 
> <project-name>).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to