[ 
https://issues.apache.org/jira/browse/MCOMPILER-504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tal Inbar updated MCOMPILER-504:
--------------------------------
    Description: 
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:

Caused by: java.lang.IllegalStateException: Current state = CODING_END, new 
state = FLUSHED
    at java.nio.charset.CharsetDecoder.throwIllegalStateException 
(CharsetDecoder.java:998)

 

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 `mvn -X -T 1C compile -DskipTests`.

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>).

  was:
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:

Caused by: java.lang.IllegalStateException: Current state = CODING_END, new 
state = FLUSHED
    at java.nio.charset.CharsetDecoder.throwIllegalStateException 
(CharsetDecoder.java:998)

 

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 `mvn -X -T 1C compile -DskipTests`.

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 (1 minute 
compile time for our project compared to 30 seconds without fork, or 2 minutes 
vs 1 minute if using `mvn install`).

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>).


> 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
>         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:
> Caused by: java.lang.IllegalStateException: Current state = CODING_END, new 
> state = FLUSHED
>     at java.nio.charset.CharsetDecoder.throwIllegalStateException 
> (CharsetDecoder.java:998)
>  
> 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 `mvn -X -T 1C compile 
> -DskipTests`.
> 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