You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2023/03/15 19:17:00 UTC

[jira] [Closed] (MCOMPILER-504) Multi threaded compile crashes with a LifecycleExecutionException

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

Michael Osipov closed MCOMPILER-504.
------------------------------------
    Fix Version/s:     (was: waiting-for-feedback)
       Resolution: Cannot Reproduce

> 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:
> {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)