[jboss-jira] [JBoss JIRA] (WFLY-11026) Journal compacting doesn't work with JDK 11

Jiri Daněk (Jira) issues at jboss.org
Fri Oct 19 07:44:00 EDT 2018


    [ https://issues.jboss.org/browse/WFLY-11026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13650503#comment-13650503 ] 

Jiri Daněk commented on WFLY-11026:
-----------------------------------

[~iweiss] I have a guess. I will try this shortly, but meanwhile, I am fairly certain it will work: Using IntelliJ, you can build the project with Java 8, run the test (to create Run Configuration in the IDE) and then switch the Java SDK to Java 11, and edit the Run Configuration, removing the "Build" step from "Before launch" section.

Alternatively, Running MVN with java 8 first (mvn package) and then switching JAVA_HOME and doing {{mvn surefire:test}} may work, it should not do rebuild.

See here for screenshot https://stackoverflow.com/a/16784855/1047788

The way I run the test was that I have a branch of Artemis, which builds using Bazel, not Maven, and the bazel build works on Java 10, but that is not a good way (because the bazel build is incomplete and some things do not work there). https://github.com/jdanekrh/activemq-artemis/tree/bazel :P

> Journal compacting doesn't work with JDK 11
> -------------------------------------------
>
>                 Key: WFLY-11026
>                 URL: https://issues.jboss.org/browse/WFLY-11026
>             Project: WildFly
>          Issue Type: Bug
>          Components: JMS
>    Affects Versions: 14.0.0.Final
>         Environment: {noformat}
> java 11-ea 2018-09-25
> Java(TM) SE Runtime Environment 18.9 (build 11-ea+21)
> Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11-ea+21, mixed mode)
> {noformat}
>            Reporter: Martin Styk
>            Assignee: Ingo Weiss
>            Priority: Critical
>              Labels: Java11, jdk10, jdk11
>
> Journal compacting doesn't work with Artemis 1.5 and JDK 11 
> It fails with following stack trace:
> {noformat}
> 12:34:58,017 ERROR [org.apache.activemq.artemis.journal] (Thread-2 (ActiveMQ-IO-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$4 at 5483fda8)) AMQ144003: Error compacting: java.lang.reflect.InvocationTargetException
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> 	at io.netty at 4.1.25.Final//io.netty.util.internal.CleanerJava9.freeDirectBuffer(CleanerJava9.java:77)
> 	at io.netty at 4.1.25.Final//io.netty.util.internal.PlatformDependent.freeDirectBuffer(PlatformDependent.java:388)
> 	at org.apache.activemq.artemis.journal at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory.releaseBuffer(NIOSequentialFileFactory.java:175)
> 	at org.apache.activemq.artemis.journal at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.io.nio.NIOSequentialFile.doInternalWrite(NIOSequentialFile.java:312)
> 	at org.apache.activemq.artemis.journal at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.io.nio.NIOSequentialFile.internalWrite(NIOSequentialFile.java:282)
> 	at org.apache.activemq.artemis.journal at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.io.nio.NIOSequentialFile.writeDirect(NIOSequentialFile.java:255)
> 	at org.apache.activemq.artemis.journal at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.journal.impl.AbstractJournalUpdateTask.flush(AbstractJournalUpdateTask.java:217)
> 	at org.apache.activemq.artemis.journal at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.journal.impl.JournalImpl.compact(JournalImpl.java:1520)
> 	at org.apache.activemq.artemis.journal at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.journal.impl.JournalImpl$14.run(JournalImpl.java:2060)
> 	at org.apache.activemq.artemis.journal at 1.5.5.jbossorg-012//org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:122)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> 	at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: java.lang.IllegalArgumentException: duplicate or slice
> 	at jdk.unsupported/sun.misc.Unsafe.invokeCleaner(Unsafe.java:1238)
> {noformat}
> This causes issues also in scenario with journal replication.
> {noformat}
> 13:09:32,133 WARN  [org.apache.activemq.artemis.core.server] (Thread-173) AMQ222013: Error when trying to start replication: java.lang.RuntimeException: Error during compact, look at the logs
> 	at org.apache.activemq.artemis.journal at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.journal.impl.JournalImpl.scheduleCompactAndBlock(JournalImpl.java:1428)
> 	at org.apache.activemq.artemis at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.startReplication(JournalStorageManager.java:540)
> 	at org.apache.activemq.artemis at 1.5.5.jbossorg-012//org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation$2.run(SharedNothingLiveActivation.java:166)
> 	at java.base/java.lang.Thread.run(Thread.java:834)
> {noformat}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)



More information about the jboss-jira mailing list