[
https://issues.apache.org/jira/browse/ARTEMIS-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16653521#comment-16653521
]
ASF GitHub Bot commented on ARTEMIS-2131:
-----------------------------------------
GitHub user franz1981 opened a pull request:
https://github.com/apache/activemq-artemis/pull/2378
ARTEMIS-2131 Error compacting journal
Compaction cannot free a sliced view of a ByteBuffer on Java >=9:
the fix is using the original ByteBuffer instead of the slice
to perform a file write and allow it to be correctly released by
the Cleaner.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/franz1981/activemq-artemis ARTEMIS-2131
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/2378.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2378
----
commit 28b75486c7ffa881452bc636e233b71fc5567708
Author: Francesco Nigro <nigro.fra@...>
Date: 2018-10-17T13:10:04Z
ARTEMIS-2131 Error compacting journal
Compaction cannot free a sliced view of a ByteBuffer on Java >=9:
the fix is using the original ByteBuffer instead of the slice
to perform a file write and allow it to be correctly released by
the Cleaner.
----
> Error compacting journal
> ------------------------
>
> Key: ARTEMIS-2131
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2131
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.6.3
> Environment: OpenJDK 11
> Reporter: Borna
> Priority: Major
>
> Sometimes (especially when under higher load), Artemis throws the following
> exception:
> {{[10:03:01.377] ERROR [Thread-9
> (ActiveMQ-IO-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$6@2484c868)]
> o.a.a.a.journal - AMQ144003: Error compacting
> java.lang.reflect.InvocationTargetException: null at
> java.base/jdk.internal.reflect.GeneratedMethodAccessor991.invoke(Unknown
> Source) 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.util.internal.CleanerJava9.freeDirectBuffer(CleanerJava9.java:88) at
> io.netty.util.internal.PlatformDependent.freeDirectBuffer(PlatformDependent.java:392)
> at
> org.apache.activemq.artemis.core.io.mapped.MappedSequentialFileFactory.releaseBuffer(MappedSequentialFileFactory.java:134)
> at
> org.apache.activemq.artemis.core.io.mapped.MappedSequentialFile.writeDirect(MappedSequentialFile.java:272)
> at
> org.apache.activemq.artemis.core.io.mapped.TimedSequentialFile.writeDirect(TimedSequentialFile.java:164)
> at
> org.apache.activemq.artemis.core.journal.impl.AbstractJournalUpdateTask.flush(AbstractJournalUpdateTask.java:217)
> at
> org.apache.activemq.artemis.core.journal.impl.JournalImpl.compact(JournalImpl.java:1613)
> at
> org.apache.activemq.artemis.core.journal.impl.JournalImpl$14.run(JournalImpl.java:2159)
> at
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
> at
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
> at
> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
> Caused by: java.lang.IllegalArgumentException: duplicate or slice at
> jdk.unsupported/sun.misc.Unsafe.invokeCleaner(Unsafe.java:1238) ... 17 common
> frames omitted}}
>
> As a consequence, it looks like old journal files are not reclaimed and
> consumption of disk space grows indefinitely.
> Tested using OpenJDK 11.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)