From dev-return-50841-archive-asf-public=cust-asf.ponee.io@felix.apache.org Thu Jan 25 23:12:06 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 5D149180651 for ; Thu, 25 Jan 2018 23:12:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4D46E160C3D; Thu, 25 Jan 2018 22:12:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6B89A160C17 for ; Thu, 25 Jan 2018 23:12:05 +0100 (CET) Received: (qmail 10491 invoked by uid 500); 25 Jan 2018 22:12:04 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 10480 invoked by uid 99); 25 Jan 2018 22:12:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jan 2018 22:12:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id ED581180337 for ; Thu, 25 Jan 2018 22:12:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -108.711 X-Spam-Level: X-Spam-Status: No, score=-108.711 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id riEHTWimLyGB for ; Thu, 25 Jan 2018 22:12:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2BBB05F3CC for ; Thu, 25 Jan 2018 22:12:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5DDF2E0EEF for ; Thu, 25 Jan 2018 22:12:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1F173240EE for ; Thu, 25 Jan 2018 22:12:00 +0000 (UTC) Date: Thu, 25 Jan 2018 22:12:00 +0000 (UTC) From: "Fabian Lange (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FELIX-5776) Memory Leak by Config Admin MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-5776?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1634= 0181#comment-16340181 ]=20 Fabian Lange commented on FELIX-5776: ------------------------------------- Carsten, the code looks much cleaner now with more centralized synchronisat= ion. Ill give it a try, but no guaranttes on reproducing the problem, it only ha= ppens once in a while. I could share the heap dump with you if you want to have a peek > Memory Leak by Config Admin > --------------------------- > > Key: FELIX-5776 > URL: https://issues.apache.org/jira/browse/FELIX-5776 > Project: Felix > Issue Type: Bug > Components: Configuration Admin > Affects Versions: configadmin-1.8.16 > Reporter: Fabian Lange > Assignee: Carsten Ziegeler > Priority: Major > Attachments: Screen Shot 2018-01-22 at 11.26.39.png, Screen Shot = 2018-01-22 at 11.28.14.png > > > I have a heapdump (which I cannot share publicly) of a karaf container wh= ich crashed due to out of memory. > The Heapdump shows 30mb occupied by=C2=A0org.apache.felix.cm.impl.Caching= PersistenceManagerProxy including several related classes. > I am going to attach a few screenshots from MAT/JProfiler. > There are a few threads involved which look interesting. > =C2=A0 > {noformat} > Thread "CM Configuration Updater (Delete: pid=3Dce24c1344-88bb-4c66-beb= c-527cc574f347)": > at sun.misc.Unsafe.park(boolean, long) > at java.util.concurrent.locks.LockSupport.park(java.lang.Object) (lin= e: 175) > at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheck= Interrupt() (line: 836) > at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueue= d(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node, int) (line: 8= 70) > at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(int)= (line: 1199) > at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock()= (line: 943) > at org.apache.felix.cm.impl.CachingPersistenceManagerProxy.store(java= .lang.String, java.util.Dictionary) (line: 245) > at org.apache.felix.cm.impl.Factory.store() (line: 137) > at org.apache.felix.cm.impl.ConfigurationManager$DeleteConfiguration.= run() (line: 1876) > at org.apache.felix.cm.impl.UpdateThread.run0(java.lang.Runnable) (li= ne: 141) > at org.apache.felix.cm.impl.UpdateThread.run() (line: 109) > at java.lang.Thread.run() (line: 748) > Thread "updater-thread-1": > at sun.misc.Unsafe.park(boolean, long) > at java.util.concurrent.locks.LockSupport.park(java.lang.Object) (lin= e: 175) > at java.util.concurrent.FutureTask.awaitDone(boolean, long) (line: 42= 9) > at java.util.concurrent.FutureTask.get() (line: 191) > at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doP= rovisionInThread(java.util.Map, java.util.Map, org.apache.karaf.features.in= ternal.service.State, java.util.EnumSet) (line: 1134) > at org.apache.karaf.features.internal.service.FeaturesServiceImpl.add= Requirements(java.util.Map, java.util.EnumSet) (line: 1077) > Thread "features-1-thread-1": > at sun.misc.Unsafe.park(boolean, long) > at java.util.concurrent.locks.LockSupport.park(java.lang.Object) (lin= e: 175) > at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheck= Interrupt() (line: 836) > at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSha= red(int) (line: 967) > at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShare= d(int) (line: 1283) > at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock() = (line: 727) > at org.apache.felix.cm.impl.CachingPersistenceManagerProxy.getDiction= aries(org.apache.felix.cm.impl.SimpleFilter) (line: 137) > at org.apache.felix.cm.impl.ConfigurationManager.listConfigurations(o= rg.apache.felix.cm.impl.ConfigurationAdminImpl, java.lang.String) (line: 66= 0) > at org.apache.felix.cm.impl.ConfigurationAdminImpl.listConfigurations= (java.lang.String) (line: 190) > at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.findC= onfigurations(org.osgi.service.cm.ConfigurationAdmin, java.lang.String) (li= ne: 605) > at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.findF= actoryConfigurations(org.osgi.service.cm.ConfigurationAdmin, java.lang.Stri= ng, org.osgi.framework.Bundle) (line: 540) > at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.confi= gureComponentHolder(org.apache.felix.scr.impl.manager.ComponentHolder) (lin= e: 143) > at org.apache.felix.scr.impl.BundleComponentActivator.setRegionConfig= urationSupport(org.osgi.framework.ServiceReference) (line: 833) > at org.apache.felix.scr.impl.helper.ConfigAdminTracker$1.addingServic= e(org.osgi.framework.ServiceReference) (line: 71) > at org.apache.felix.scr.impl.helper.ConfigAdminTracker$1.addingServic= e(org.osgi.framework.ServiceReference) (line: 43) > at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(org.= osgi.framework.ServiceReference, org.osgi.framework.ServiceEvent) (line: 94= 1) > at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(java= .lang.Object, java.lang.Object) (line: 870) > at org.osgi.util.tracker.AbstractTracked.trackAdding(java.lang.Object= , java.lang.Object) (line: 256) > at org.osgi.util.tracker.AbstractTracked.trackInitial() (line: 183) > at org.osgi.util.tracker.ServiceTracker.open(boolean) (line: 318) > at org.osgi.util.tracker.ServiceTracker.open() (line: 261) > at org.apache.felix.scr.impl.helper.ConfigAdminTracker.(org.apa= che.felix.scr.impl.manager.ComponentActivator) (line: 88) > at org.apache.felix.scr.impl.BundleComponentActivator.(org.apac= he.felix.scr.impl.helper.SimpleLogger, org.apache.felix.scr.impl.ComponentR= egistry, org.apache.felix.scr.impl.ComponentActorThread, org.osgi.framework= .BundleContext, org.apache.felix.scr.impl.manager.ScrConfiguration) (line: = 274) > at org.apache.felix.scr.impl.Activator.loadComponents(org.osgi.framew= ork.Bundle) (line: 388) > at org.apache.felix.scr.impl.Activator.access$200(org.apache.felix.sc= r.impl.Activator, org.osgi.framework.Bundle) (line: 54) > at org.apache.felix.scr.impl.Activator$ScrExtension.start() (line: 26= 5) > at org.apache.felix.utils.extender.AbstractExtender.createExtension(o= rg.osgi.framework.Bundle) (line: 254) > at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(or= g.osgi.framework.Bundle, org.osgi.framework.BundleEvent, java.lang.Object) = (line: 227) > at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(org= .osgi.framework.Bundle, org.osgi.framework.BundleEvent, java.lang.Object) (= line: 482) > at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(jav= a.lang.Object, java.lang.Object, java.lang.Object) (line: 415) > at org.osgi.util.tracker.AbstractTracked.track(java.lang.Object, java= .lang.Object) (line: 232) > at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(org.osgi= .framework.BundleEvent) (line: 444) > at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCal= lback(org.osgi.framework.Bundle, java.util.EventListener, java.util.EventOb= ject) (line: 915) > at org.apache.felix.framework.EventDispatcher.fireEventImmediately(or= g.apache.felix.framework.EventDispatcher, int, java.util.Map, java.util.Eve= ntObject, java.util.Dictionary) (line: 834) > at org.apache.felix.framework.EventDispatcher.fireBundleEvent(org.osg= i.framework.BundleEvent, org.apache.felix.framework.Felix) (line: 516) > at org.apache.felix.framework.Felix.fireBundleEvent(int, org.osgi.fra= mework.Bundle) (line: 4563) > at org.apache.felix.framework.Felix.startBundle(org.apache.felix.fram= ework.BundleImpl, int) (line: 2173) > at org.apache.felix.framework.BundleImpl.start(int) (line: 998) > at org.apache.felix.framework.BundleImpl.start() (line: 984) > at org.apache.karaf.features.internal.service.FeaturesServiceImpl.sta= rtBundle(org.osgi.framework.Bundle) (line: 1346) > at org.apache.karaf.features.internal.service.Deployer.deploy(org.apa= che.karaf.features.internal.service.Deployer$DeploymentState, org.apache.ka= raf.features.internal.service.Deployer$DeploymentRequest) (line: 891) > at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doP= rovision(java.util.Map, java.util.Map, org.apache.karaf.features.internal.s= ervice.State, java.util.EnumSet, java.lang.String) (line: 1233) > at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lam= bda$doProvisionInThread$0(java.util.Map, java.util.Map, org.apache.karaf.fe= atures.internal.service.State, java.util.EnumSet, java.lang.String) (line: = 1132) > at org.apache.karaf.features.internal.service.FeaturesServiceImpl$$La= mbda$16.call() > at java.util.concurrent.FutureTask.run() (line: 266) > at java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concur= rent.ThreadPoolExecutor$Worker) (line: 1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run() (line: 617) > at java.lang.Thread.run() (line: 748) > {noformat} > =C2=A0 > This might as well be a karaf bug. > While it looks like a memory leak, I could also suspect that this might b= e cause by a concurrency problem, as the threadump shows multiple updating = threads. > I can provide more details if required, or share the dump privately. -- This message was sent by Atlassian JIRA (v7.6.3#76005)