Ошибка компиляции Maven с использованием OpenJ9 с Lombok - PullRequest
0 голосов
/ 07 октября 2019

Я хотел бы попросить помощи сообщества. Я провел эксперимент, чтобы изменить jvm на Eclipse OpenJ9 VM AdoptOpenJDK из Oracle Hotspot . Я создал простое приложение spring boot , но во время компиляции я получил ошибку.

java -version:

openjdk version "13" 2019-09-17
OpenJDK Runtime Environment AdoptOpenJDK (build 13+33)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.16.0, JRE 13 Linux amd64-64-Bit Compressed References 20190916_75 (JIT enabled, AOT enabled)
OpenJ9   - 867dab457
OMR      - d4c85c31
JCL      - 2858e3f001 based on jdk-13+33)

Система:

System:    Host: inspiron3542 Kernel: 5.0.0-31-generic x86_64 bits: 64 compiler: gcc v: 7.4.0 
           Desktop: Cinnamon 4.2.4 wm: muffin dm: LightDM Distro: Linux Mint 19.2 Tina 
           base: Ubuntu 18.04 bionic 
Machine:   Type: Portable System: Dell product: Inspiron 3542 v: N/A serial: <filter> Chassis: 
           type: 8 serial: <filter> 
           Mobo: Dell model: 0WW73H v: A04 serial: <filter> BIOS: Dell v: A04 date: 08/05/2014
CPU:       Topology: Dual Core model: Intel Core i7-4510U bits: 64 type: MT MCP arch: Haswell 
           rev: 1 L2 cache: 4096 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 15963 

Код:

package hu.gaszabo.openj9.app;

import static org.springframework.boot.SpringApplication.run;

import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        run(Application.class, args);
    }

}

pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.8.RELEASE</version>
        <relativePath />
    </parent>

    <groupId>hu.gaszabo.openj9</groupId>
    <artifactId>app</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-verbose</arg>
                        <arg>-Xlint:all,-options,-path</arg>
                        <arg>-Xshareclasses</arg>
                    </compilerArgs>
                    <fork>true</fork>
                    <executable>/usr/lib/jvm/adoptopenjdk-13-openj9-amd64/bin/javac</executable>
                    <compilerVersion>13</compilerVersion>
                </configuration>
            </plugin>
            -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

Команда:

mvn clean compile

Ошибка:

[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ app ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/gaszabo/eclipse-workspace/app/target/classes
Unhandled exception
Type=Segmentation error vmState=0x00000000
J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
Handler1=00007FA3E188A7D0 Handler2=00007FA3E116FE80 InaccessibleAddress=0000000000000001
RDI=0000000000AC6700 RSI=0000000000000001 RAX=0000000000B42C00 RBX=0000000000000002
RCX=0000000085CF4290 RDX=0000000000B42C00 R8=0000000000000001 R9=0000000085EB22B0
R10=0000000000B59200 R11=0000000000000000 R12=00000000864C8DB8 R13=0000000000000001
R14=00000000FF8F07F8 R15=0000000085DA7768
RIP=00007FA3DB74B9D9 GS=0000 FS=0000 RSP=0000000000FF9EA8
EFlags=0000000000010202 CS=0033 RBP=0000000000AC6700 ERR=0000000000000004
TRAPNO=000000000000000E OLDMASK=0000000000000000 CR2=0000000000000001
xmm0 0000000000000006 (f: 6,000000, d: 2,964394e-323)
xmm1 7373656363416b63 (f: 1665231744,000000, d: 1,356156e+248)
xmm2 00007fa3e27ea670 (f: 3799950848,000000, d: 6,933809e-310)
xmm3 0000000000000000 (f: 0,000000, d: 0,000000e+00)
xmm4 43e0000000000000 (f: 0,000000, d: 9,223372e+18)
xmm5 000000003da2b542 (f: 1034073408,000000, d: 5,109001e-315)
xmm6 0000000049e0d050 (f: 1239470208,000000, d: 6,123796e-315)
xmm7 3d754568669a952a (f: 1721406720,000000, d: 1,209123e-12)
xmm8 402e81791e212b45 (f: 505490240,000000, d: 1,525288e+01)
xmm9 3fefe23de63c2a1e (f: 3862702592,000000, d: 9,963674e-01)
xmm10 3bbcc86800000000 (f: 0,000000, d: 6,095003e-21)
xmm11 3c02821ad5a6d353 (f: 3584480000,000000, d: 1,254166e-19)
xmm12 3f6dcff891e44c38 (f: 2447657984,000000, d: 3,639207e-03)
xmm13 3bf0000000000000 (f: 0,000000, d: 5,421011e-20)
xmm14 bbd00addc7f9d69c (f: 3355039488,000000, d: -1,358848e-20)
xmm15 402e7f9c1e980d00 (f: 513281280,000000, d: 1,524924e+01)
Module=/usr/lib/jvm/adoptopenjdk-13-openj9-amd64/lib/compressedrefs/libj9jit29.so
Module_base_address=00007FA3DAF10000
Target=2_90_20190916_75 (Linux 5.0.0-31-generic)
CPU=amd64 (4 logical CPUs) (0x1ec662000 RAM)
----------- Stack Backtrace -----------
(0x00007FA3E119E032 [libj9prt29.so+0x4e032])
(0x00007FA3E1170BE3 [libj9prt29.so+0x20be3])
(0x00007FA3E119E0AE [libj9prt29.so+0x4e0ae])
(0x00007FA3E119E1A4 [libj9prt29.so+0x4e1a4])
(0x00007FA3E1170BE3 [libj9prt29.so+0x20be3])
(0x00007FA3E119DF0B [libj9prt29.so+0x4df0b])
(0x00007FA3E188A314 [libj9vm29.so+0x9f314])
(0x00007FA3E1170BE3 [libj9prt29.so+0x20be3])
(0x00007FA3E188A585 [libj9vm29.so+0x9f585])
(0x00007FA3E18B6D65 [libj9vm29.so+0xcbd65])
---------------------------------------
JVMDUMP039I Processing dump event "gpf", detail "" at 2019/10/07 19:04:35 - please wait.
JVMDUMP032I JVM requested System dump using '/home/gaszabo/eclipse-workspace/app/core.20191007.190435.5260.0001.dmp' in response to an event
JVMPORT030W /proc/sys/kernel/core_pattern setting "|/usr/share/apport/apport %p %s %c %d %P" specifies that the core dump is to be piped to an external program.  Attempting to rename either core or core.5297.

JVMDUMP010I System dump written to /home/gaszabo/eclipse-workspace/app/core.20191007.190435.5260.0001.dmp
JVMDUMP032I JVM requested Java dump using '/home/gaszabo/eclipse-workspace/app/javacore.20191007.190435.5260.0002.txt' in response to an event
JVMDUMP010I Java dump written to /home/gaszabo/eclipse-workspace/app/javacore.20191007.190435.5260.0002.txt
JVMDUMP032I JVM requested Snap dump using '/home/gaszabo/eclipse-workspace/app/Snap.20191007.190435.5260.0003.trc' in response to an event
JVMDUMP010I Snap dump written to /home/gaszabo/eclipse-workspace/app/Snap.20191007.190435.5260.0003.trc
JVMDUMP007I JVM Requesting JIT dump using '/home/gaszabo/eclipse-workspace/app/jitdump.20191007.190435.5260.0004.dmp'
JVMDUMP010I JIT dump written to /home/gaszabo/eclipse-workspace/app/jitdump.20191007.190435.5260.0004.dmp
JVMDUMP013I Processed dump event "gpf", detail "".
  • Чего не хватает?
  • Что я забыл сделать?
  • Не могли бы вы дать мне рекомендации, чтобы он работал?
  • Не могли бы вы дать мне объяснение?

1 Ответ

1 голос
/ 09 октября 2019

Это просто похоже на ошибку либо в коде JIT-компилятора из-за

Module=/usr/lib/jvm/adoptopenjdk-13-openj9-amd64/lib/compressedrefs/libj9jit29.so

, либо в сгенерированном коде из-за

vmState=0x00000000

Я бы открыл проблему здесь так, чтобы на него смотрели.

...