felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-1035) deadlock observed while using fileinstall to monitor multiple directories
Date Thu, 23 Apr 2009 08:56:47 GMT

     [ https://issues.apache.org/jira/browse/FELIX-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Richard S. Hall updated FELIX-1035:
-----------------------------------

          Component/s:     (was: File Install)
                       Framework
    Affects Version/s:     (was: configadmin-1.0.10)
                       felix-1.6.0
        Fix Version/s: felix-1.6.1

> 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: Framework
>    Affects Versions: felix-1.6.0
>         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
>             Fix For: felix-1.6.1
>
>
> 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.<init>(URL.java:596)
>         at java.net.URL.<init>(URL.java:464)
>         at java.net.URL.<init>(URL.java:413)
>         at java.net.JarURLConnection.parseSpecs(JarURLConnection.java:161)
>         at java.net.JarURLConnection.<init>(JarURLConnection.java:144)
>         at sun.net.www.protocol.jar.JarURLConnection.<init>(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.<init>(NormalizerImpl.java:243)
>         at sun.text.normalizer.NormalizerImpl.<clinit>(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.<init>(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.


Mime
View raw message