You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2015/07/15 14:42:04 UTC
[jira] [Commented] (OAK-3109) OOME in tarkmk standby tests
[ https://issues.apache.org/jira/browse/OAK-3109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14627986#comment-14627986 ]
Michael Dürig commented on OAK-3109:
------------------------------------
Many of the {{SegmentTracker}} instances are referenced from {{SegmentLoaderHandler}}, which is registered to the channel pipeline as a channel handler. I don't know who would be responsible to eventually clean this up. However explicitly removing the handler again in {{close()}} fixes the OOME:
{code}
--- oak-tarmk-standby/src/main/java/org/apache/jackrabbit/oak/plugins/segment/standby/client/StandbyClientHandler.java (date 1436962414000)
+++ oak-tarmk-standby/src/main/java/org/apache/jackrabbit/oak/plugins/segment/standby/client/StandbyClientHandler.java (revision )
@@ -82,6 +82,7 @@
ctx.flush();
}
+ SegmentLoaderHandler h2;
synchronized void setHead(RecordId head) {
if (store.getHead().getRecordId().equals(head)) {
@@ -97,7 +98,7 @@
ctx.pipeline().addLast(new ReplyDecoder(store));
loaderExecutor = new DefaultEventExecutorGroup(4);
- SegmentLoaderHandler h2 = new SegmentLoaderHandler(store, head,
+ h2 = new SegmentLoaderHandler(store, head,
loaderExecutor, this.observer.getID(), running, readTimeoutMs,
autoClean);
ctx.pipeline().addLast(loaderExecutor, h2);
@@ -115,6 +116,10 @@
@Override
public void close() {
+ if (h2 != null) {
+ ctx.pipeline().remove(h2);
+ h2 = null;
+ }
ctx.close();
if (!executor.isShuttingDown()) {
executor.shutdownGracefully(1, 2, TimeUnit.SECONDS)
{code}
> OOME in tarkmk standby tests
> ----------------------------
>
> Key: OAK-3109
> URL: https://issues.apache.org/jira/browse/OAK-3109
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: tarmk-standby
> Reporter: Michael Dürig
>
> Running the tarmk-standby ITs results in an OOME when running with the new string cache from OAK-3007. Looking at the heap dump I see many {{SegmentTracker}} instances around, which leads me to think that the test setup might have a leak somewhere.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)