Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 12207 invoked from network); 17 Apr 2009 12:42:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Apr 2009 12:42:39 -0000 Received: (qmail 77374 invoked by uid 500); 17 Apr 2009 12:42:39 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 77313 invoked by uid 500); 17 Apr 2009 12:42:39 -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 77272 invoked by uid 99); 17 Apr 2009 12:42:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2009 12:42:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2009 12:42:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4824729A0011 for ; Fri, 17 Apr 2009 05:42:15 -0700 (PDT) Message-ID: <1449061646.1239972135294.JavaMail.jira@brutus> Date: Fri, 17 Apr 2009 05:42:15 -0700 (PDT) From: "Karl Pauls (JIRA)" To: dev@felix.apache.org Subject: [jira] Commented: (FELIX-1035) deadlock observed while using fileinstall to monitor multiple directories In-Reply-To: <1409426842.1239444374823.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700159#action_12700159 ] Karl Pauls commented on FELIX-1035: ----------------------------------- Ok. I did commit another attempt at fixing this issue. Could you update to trunk and see whether it makes any difference? > deadlock observed while using fileinstall to monitor multiple directories > ------------------------------------------------------------------------- > > Key: FELIX-1035 > URL: https://issues.apache.org/jira/browse/FELIX-1035 > Project: Felix > Issue Type: Bug > Components: File Install > Affects Versions: configadmin-1.0.10 > Environment: Solaris 10/x86 > java version "1.6.0_07" > Java(TM) SE Runtime Environment (build 1.6.0_07-b06) > Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) > fileinstall version #0.9.2 > felix version #1.6.0 > Reporter: Sahoo > Assignee: Karl Pauls > > I am using fileinstall to monitor two directories. fileinstall is configured using config.properties file to monitor a dir called modules. Then I have a cfg file in modules dir that configures fileinstall to monitor a second dir called autodeploy-modules. During subsequent start of the framework, I see deadlock like this: > Found one Java-level deadlock: > ============================= > "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfish/modules/, felix.fileinstall.debug=1}": > waiting to lock monitor 0x0851dac8 (object 0xa0518300, a java.net.URLClassLoader), > which is held by "Configuration Updater" > "Configuration Updater": > waiting to lock monitor 0x085202a0 (object 0xa050bd68, a sun.misc.Launcher$ExtClassLoader), > which is held by "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfish/modules/, felix.fileinstall.debug=1}" > Java stack information for the threads listed above: > =================================================== > "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfish/modules/, felix.fileinstall.debug=1}": > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:169) > at org.apache.felix.framework.URLHandlersStreamHandlerProxy.class$(URLHandlersStreamHandlerProxy.java:75) > at org.apache.felix.framework.URLHandlersStreamHandlerProxy.getStreamHandlerService(URLHandlersStreamHandlerProxy.java:438) > at org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:297) > at java.net.URL.(URL.java:596) > at java.net.URL.(URL.java:464) > at java.net.URL.(URL.java:413) > at java.net.JarURLConnection.parseSpecs(JarURLConnection.java:161) > at java.net.JarURLConnection.(JarURLConnection.java:144) > at sun.net.www.protocol.jar.JarURLConnection.(JarURLConnection.java:63) > at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:24) > at java.net.URL.openConnection(URL.java:945) > at java.net.URL.openStream(URL.java:1009) > at java.lang.ClassLoader.getSystemResourceAsStream(ClassLoader.java:1183) > at java.lang.Class.getResourceAsStream(Class.java:2028) > at sun.text.normalizer.ICUData.getStream(ICUData.java:43) > at sun.text.normalizer.ICUData.getRequiredStream(ICUData.java:63) > at sun.text.normalizer.NormalizerImpl.(NormalizerImpl.java:243) > at sun.text.normalizer.NormalizerImpl.(NormalizerImpl.java:40) > at sun.text.normalizer.NormalizerBase.decompose(NormalizerBase.java:707) > at sun.text.normalizer.NormalizerBase$NFKDMode.normalize(NormalizerBase.java:348) > at sun.text.normalizer.NormalizerBase.normalize(NormalizerBase.java:1592) > at sun.text.normalizer.NormalizerBase.normalize(NormalizerBase.java:1573) > at java.text.Normalizer.normalize(Normalizer.java:146) > at sun.security.x509.AVA.toRFC2253CanonicalString(AVA.java:986) > at sun.security.x509.RDN.toRFC2253StringInternal(RDN.java:430) > at sun.security.x509.RDN.toRFC2253String(RDN.java:409) > at sun.security.x509.X500Name.getRFC2253CanonicalName(X500Name.java:714) > at sun.security.x509.X500Name.equals(X500Name.java:400) > at sun.security.pkcs.PKCS7.getCertificate(PKCS7.java:609) > at sun.security.pkcs.SignerInfo.getCertificate(SignerInfo.java:202) > at sun.security.pkcs.SignerInfo.verify(SignerInfo.java:328) > at sun.security.pkcs.PKCS7.verify(PKCS7.java:494) > at sun.security.pkcs.PKCS7.verify(PKCS7.java:511) > at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:199) > at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176) > at java.util.jar.JarVerifier.processEntry(JarVerifier.java:277) > at java.util.jar.JarVerifier.update(JarVerifier.java:188) > at java.util.jar.JarFile.initializeVerifier(JarFile.java:321) > at java.util.jar.JarFile.getInputStream(JarFile.java:386) > - locked <0xa00f2c60> (a java.util.jar.JarFile) > at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:689) > at sun.misc.Resource.cachedInputStream(Resource.java:59) > - locked <0xa00f3530> (a sun.misc.URLClassPath$JarLoader$2) > at sun.misc.Resource.getByteBuffer(Resource.java:154) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:249) > at java.net.URLClassLoader.access$000(URLClassLoader.java:56) > at java.net.URLClassLoader$1.run(URLClassLoader.java:195) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > - locked <0xa050bd68> (a sun.misc.Launcher$ExtClassLoader) > at java.lang.ClassLoader.loadClass(ClassLoader.java:299) > - locked <0xa05078d8> (a sun.misc.Launcher$AppClassLoader) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) > - locked <0xa05078d8> (a sun.misc.Launcher$AppClassLoader) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at sun.security.jca.ProviderConfig$3.run(ProviderConfig.java:234) > at java.security.AccessController.doPrivileged(Native Method) > at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:225) > at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:205) > - locked <0xa05078d8> (a sun.misc.Launcher$AppClassLoader) > at sun.security.jca.ProviderList.getProvider(ProviderList.java:215) > at sun.security.jca.ProviderList$3.get(ProviderList.java:130) > at sun.security.jca.ProviderList$3.get(ProviderList.java:125) > at java.util.AbstractList$Itr.next(AbstractList.java:345) > at java.security.SecureRandom.getPrngAlgorithm(SecureRandom.java:522) > at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:165) > at java.security.SecureRandom.(SecureRandom.java:133) > at org.apache.felix.cm.impl.ConfigurationManager.createPid(ConfigurationManager.java:787) > at org.apache.felix.cm.impl.ConfigurationManager.createFactoryConfiguration(ConfigurationManager.java:357) > at org.apache.felix.cm.impl.ConfigurationAdminImpl.createFactoryConfiguration(ConfigurationAdminImpl.java:85) > at org.apache.felix.fileinstall.DirectoryWatcher.getConfiguration(DirectoryWatcher.java:294) > at org.apache.felix.fileinstall.DirectoryWatcher.setConfig(DirectoryWatcher.java:232) > at org.apache.felix.fileinstall.DirectoryWatcher.doConfigs(DirectoryWatcher.java:162) > at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:121) > "Configuration Updater": > at java.lang.ClassLoader.loadClass(ClassLoader.java:295) > - waiting to lock <0xa050bd68> (a sun.misc.Launcher$ExtClassLoader) > at java.lang.ClassLoader.loadClass(ClassLoader.java:299) > - locked <0xa0518300> (a java.net.URLClassLoader) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:480) > at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59) > at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1434) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > - locked <0xa0a5ef58> (a org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader) > at org.apache.felix.cm.impl.ConfigurationManager.getPersistenceManagers(ConfigurationManager.java:568) > at org.apache.felix.cm.impl.ConfigurationManager.getFactory(ConfigurationManager.java:677) > at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1014) > at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:88) > Found 1 deadlock. > I tried to reproduce the issue using a simple program, but I could not. But, I am able to reproduce the issue in my environment, where I use GlassFish application server which runs on Felix and uses fileinstall. > I understand this deadlock has to do with "deadlock observed in Sun JVM during parallel classloading," given that the threads involved are Felix threads, can we put any workaround in exercised code path to avoid this deadlock? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.