[ https://issues.apache.org/jira/browse/FELIX-6729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17887645#comment-17887645 ]
Mahesh Kantharaj edited comment on FELIX-6729 at 10/8/24 4:00 PM: ------------------------------------------------------------------ Hi [~karlpauls] , Please find my comments below: * The infinite recursion is still seen even after we have upgraded to the latest version of the Felix framework jar i.e. v7.0.5 . There is NO change in behavior with respect to URL Handler observed between the earlier version v6.0.* and the latest version v7.0.5 * The primary issue we are currently facing is that, we are unable to disable the Felix URL Handler using the configuration property "felix.service.urlhandlers=false" in the latest Felix framework jar version v7.0.5. This step has been attempted to suppress the Felix module causing the infinite recursion upon usage that eventually results in "Stack Over Flow Exception". * Please note that in the Felix framework jar , the "config/config.properties", "classes/config.properties", "resources/config.properties" were set to felix.service.urlhandlers=false. However still the URLHandlersActivator.start returns true. This means that even though we have set the property to override the default value (i.e. true) to false, we still observe that the default (i.e. true) has been applied wherein the config property seems to have no effect. We tried hardcoding the value within the Felix jar to "false", but facing compilation issues. We are using JDK 8 * $ java -version java version "1.8.0_351" Java(TM) SE Runtime Environment (build 1.8.0_351-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.351-b10, mixed mode) * Please attempt to disable the Felix URL Handler ("felix.service.urlhandlers=false") in your internal env and let me know if you indeed observed the same behavior with the property. It would be great if the detailed steps to disable the property after validation in your internal env. is provided to me. * We have printed out the Felix configuration parameters from the config map after setting the "felix.service.urlhandlers=false" but do NOT see the parameter "felix.service.urlhandlers" listed in the map. * m_configMap.get(FelixConstants.SERVICE_URLHANDLERS_PROP) null configMap \{felix.cache.dir=/var/folders/lp/bnbrr7bs60bbk2phmksh_tbh0000gn/T/felix-cache5802616214459103027.dir, felix.cache.profiledir=/var/folders/lp/bnbrr7bs60bbk2phmksh_tbh0000gn/T/felix-cache5802616214459103027.dir, felix.native.osname.alias.aix=, felix.native.osname.alias.digitalunix=, felix.native.osname.alias.epoc32=symbianos, felix.native.osname.alias.hpux=hp-ux, felix.native.osname.alias.irix=, felix.native.osname.alias.linux=, felix.native.osname.alias.macos=mac os, felix.native.osname.alias.macosx=mac os x, felix.native.osname.alias.netbsd=, felix.native.osname.alias.netware=, felix.native.osname.alias.openbsd=, felix.native.osname.alias.os2=os/2, felix.native.osname.alias.qnx=procnto, felix.native.osname.alias.solaris=, felix.native.osname.alias.sunos=, felix.native.osname.alias.vxworks=, felix.native.osname.alias.win32=, felix.native.osname.alias.windows10=windows 10,win32, felix.native.osname.alias.windows2000=win2000,windows 2000,win32, felix.native.osname.alias.windows2003=win2003,windows 2003,win32,windows server 2003, felix.native.osname.alias.windows7=windows 7,win32, felix.native.osname.alias.windows8=windows 8,win32, felix.native.osname.alias.windows9=windows 9,win32, felix.native.osname.alias.windows95=win95,windows 95,win32, felix.native.osname.alias.windows98=win98,windows 98,win32, felix.native.osname.alias.windowsce=wince,windows ce, felix.native.osname.alias.windowsnt=winnt,windows nt,win32, felix.native.osname.alias.windowsserver2008=windows server 2008,win32, felix.native.osname.alias.windowsserver2012=windows server 2012,win32, felix.native.osname.alias.windowsserver2016=windows server 2016,win32, felix.native.osname.alias.windowsserver2019=windows server 2019,win32, felix.native.osname.alias.windowsvista=winvista,windows vista,win32, felix.native.osname.alias.windowsxp=winxp,windows xp,win32, felix.native.processor.alias.68k=, felix.native.processor.alias.alpha=, felix.native.processor.alias.arm=, felix.native.processor.alias.arm_be=, felix.native.processor.alias.arm_le=, felix.native.processor.alias.ignite=psc1k, felix.native.processor.alias.mips=, felix.native.processor.alias.parisc=, felix.native.processor.alias.powerpc=power,ppc, felix.native.processor.alias.sparc=, felix.native.processor.alias.x86=pentium,i386,i486,i586,i686, felix.native.processor.alias.x86-64=amd64,em64t,x86_64, felix.version=7.0.5, org.osgi.framework.executionenvironment=JavaSE-1.8,JavaSE-1.7,JavaSE-1.6,J2SE-1.5,J2SE-1.4,J2SE-1.3, J2SE-1.2,JRE-1.1,JRE-1.0,OSGi/Minimum-1.2,OSGi/Minimum-1.1, OSGi/Minimum-1.0 , org.osgi.framework.language=en, org.osgi.framework.os.name=macosx, org.osgi.framework.os.version=14.5.0, org.osgi.framework.processor=x86-64, org.osgi.framework.storage=/var/folders/lp/bnbrr7bs60bbk2phmksh_tbh0000gn/T/felix-cache5802616214459103027.dir, org.osgi.framework.system.packages=org.osgi.framework; version=1.4.0,org.osgi.service.packageadmin; version=1.2.0,org.osgi.service.startlevel; version=1.1.0,org.osgi.util.tracker; version=1.3.3,org.osgi.service.url; version=1.0.0, org.osgi.framework.uuid=111a57ed-6847-4187-b886-1a612a88abed, org.osgi.framework.vendor=Apache Software Foundation, org.osgi.framework.version=1.9, org.osgi.supports.bootclasspath.extension=false, org.osgi.supports.framework.extension=true, org.osgi.supports.framework.fragment=true, org.osgi.supports.framework.requirebundle=true} was (Author: JIRAUSER307242): Hi [~karlpauls] , Please find my comments below: * The infinite recursion is still seen even after we have upgraded to the latest version of the Felix framework jar i.e. v7.0.5 . There is NO change in behavior with respect to URL Handler observed between the earlier version v6.0.* and the latest version v7.0.5 * The primary issue we are currently facing is that, we are unable to disable the Felix URL Handler using the configuration property "felix.service.urlhandlers=false" in the latest Felix framework jar version v7.0.5. This step has been attempted to suppress the Felix module causing the infinite recursion upon usage that eventually results in "Stack Over Flow Exception". * Please note that in the Felix framework jar , the "config/config.properties", "classes/config.properties", "resources/config.properties" were set to felix.service.urlhandlers=false. However still the URLHandlersActivator.start returns true. This means that even though we have set the property to override the default value (i.e. true) to false, we still observe that the default (i.e. true) has been applied wherein the config property seems to have no effect. We tried hardcoding the value within the Felix jar to "false", but facing compilation issues. We are using JDK 8 * $ java -version java version "1.8.0_351" Java(TM) SE Runtime Environment (build 1.8.0_351-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.351-b10, mixed mode) * Please attempt to disable the Felix URL Handler ("felix.service.urlhandlers=false") in your internal env and let me know if you indeed observed the same behavior with the property. It would be great if the detailed steps to disable the property after validation in your internal env. * We have printed out the Felix configuration parameters from the config map after setting the "felix.service.urlhandlers=false" but do NOT see the parameter "felix.service.urlhandlers" listed in the map. * m_configMap.get(FelixConstants.SERVICE_URLHANDLERS_PROP) null configMap \{felix.cache.dir=/var/folders/lp/bnbrr7bs60bbk2phmksh_tbh0000gn/T/felix-cache5802616214459103027.dir, felix.cache.profiledir=/var/folders/lp/bnbrr7bs60bbk2phmksh_tbh0000gn/T/felix-cache5802616214459103027.dir, felix.native.osname.alias.aix=, felix.native.osname.alias.digitalunix=, felix.native.osname.alias.epoc32=symbianos, felix.native.osname.alias.hpux=hp-ux, felix.native.osname.alias.irix=, felix.native.osname.alias.linux=, felix.native.osname.alias.macos=mac os, felix.native.osname.alias.macosx=mac os x, felix.native.osname.alias.netbsd=, felix.native.osname.alias.netware=, felix.native.osname.alias.openbsd=, felix.native.osname.alias.os2=os/2, felix.native.osname.alias.qnx=procnto, felix.native.osname.alias.solaris=, felix.native.osname.alias.sunos=, felix.native.osname.alias.vxworks=, felix.native.osname.alias.win32=, felix.native.osname.alias.windows10=windows 10,win32, felix.native.osname.alias.windows2000=win2000,windows 2000,win32, felix.native.osname.alias.windows2003=win2003,windows 2003,win32,windows server 2003, felix.native.osname.alias.windows7=windows 7,win32, felix.native.osname.alias.windows8=windows 8,win32, felix.native.osname.alias.windows9=windows 9,win32, felix.native.osname.alias.windows95=win95,windows 95,win32, felix.native.osname.alias.windows98=win98,windows 98,win32, felix.native.osname.alias.windowsce=wince,windows ce, felix.native.osname.alias.windowsnt=winnt,windows nt,win32, felix.native.osname.alias.windowsserver2008=windows server 2008,win32, felix.native.osname.alias.windowsserver2012=windows server 2012,win32, felix.native.osname.alias.windowsserver2016=windows server 2016,win32, felix.native.osname.alias.windowsserver2019=windows server 2019,win32, felix.native.osname.alias.windowsvista=winvista,windows vista,win32, felix.native.osname.alias.windowsxp=winxp,windows xp,win32, felix.native.processor.alias.68k=, felix.native.processor.alias.alpha=, felix.native.processor.alias.arm=, felix.native.processor.alias.arm_be=, felix.native.processor.alias.arm_le=, felix.native.processor.alias.ignite=psc1k, felix.native.processor.alias.mips=, felix.native.processor.alias.parisc=, felix.native.processor.alias.powerpc=power,ppc, felix.native.processor.alias.sparc=, felix.native.processor.alias.x86=pentium,i386,i486,i586,i686, felix.native.processor.alias.x86-64=amd64,em64t,x86_64, felix.version=7.0.5, org.osgi.framework.executionenvironment=JavaSE-1.8,JavaSE-1.7,JavaSE-1.6,J2SE-1.5,J2SE-1.4,J2SE-1.3, J2SE-1.2,JRE-1.1,JRE-1.0,OSGi/Minimum-1.2,OSGi/Minimum-1.1, OSGi/Minimum-1.0 , org.osgi.framework.language=en, org.osgi.framework.os.name=macosx, org.osgi.framework.os.version=14.5.0, org.osgi.framework.processor=x86-64, org.osgi.framework.storage=/var/folders/lp/bnbrr7bs60bbk2phmksh_tbh0000gn/T/felix-cache5802616214459103027.dir, org.osgi.framework.system.packages=org.osgi.framework; version=1.4.0,org.osgi.service.packageadmin; version=1.2.0,org.osgi.service.startlevel; version=1.1.0,org.osgi.util.tracker; version=1.3.3,org.osgi.service.url; version=1.0.0, org.osgi.framework.uuid=111a57ed-6847-4187-b886-1a612a88abed, org.osgi.framework.vendor=Apache Software Foundation, org.osgi.framework.version=1.9, org.osgi.supports.bootclasspath.extension=false, org.osgi.supports.framework.extension=true, org.osgi.supports.framework.fragment=true, org.osgi.supports.framework.requirebundle=true} > Infinite recursion observed with Felix Main and Felix Framework jar usage > ------------------------------------------------------------------------- > > Key: FELIX-6729 > URL: https://issues.apache.org/jira/browse/FELIX-6729 > Project: Felix > Issue Type: Bug > Components: Framework, Main > Affects Versions: framework-7.0.5 > Environment: Oracle WebLogic on which Custom Plugin applications have > been deployed which uses the "org.apache.felix.org.apache.felix.main.jar" and > "org.apache.felix.framework.jar" jar as 3rd party references for OSGi > implementation. > Operating System : Oracle Linux > Reporter: Mahesh Kantharaj > Priority: Blocker > Fix For: framework-7.0.5 > > Original Estimate: 168h > Remaining Estimate: 168h > > The Custom Plugin which references the > "org.apache.felix.org.apache.felix.main.jar" and > "org.apache.felix.framework.jar" 3rd Party jars is deployed on WLS (Oracle > WebLogic Server). The Felix Framework jar is used in the Custom Plugin to > enable the plugin to interact with the OAM (Oracle Access Manager) system > wherein it helps in integrating the custom plugin with the OAM seamlessly and > efficiently. > However there is an intermittent issue that is observed during the > initialization phase (Deployed Server restart) of the custom plugin wherein > repeated looping is observed with the below mentioned stack upon > java.net.URL usage. > This results in Stack Over Exception with an abnormal compressed class space > growth that eventually leads to Out of Memory exception and thereby the JVM > crashes. The only workaround available with us now is to perform the Server > restart on which the custom plugin is deployed so that the Full GC is > triggered and thereby the compressed class space is cleared as a temporary > relief to the issue. We would like to have the URL Handler related looping > stack from Felix Main and Framework to be investigated to devise a solution > from Apache team, to resolve the issue (This seems to be a race condition > scenario based on issue symptoms). > at > org.apache.felix.framework.util.SecureAction.getDeclaredMethod(SecureAction.java:850) > at > org.apache.felix.framework.URLHandlers.getFrameworkFromContext(URLHandlers.java:752) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.getStreamHandlerService(URLHandlersStreamHandlerProxy.java:574) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:369) > at java.net.URL.<init>(URL.java:639) > at java.net.URL.<init>(URL.java:507) > ********** > The complete stack trace having the deep recursive call related to Felix jar > is pasted below for your reference: > <FINER> <ClassLoader> Thread [ACTIVE] ExecuteThread: '37' for queue: > 'weblogic.kernel.Default (self-tuning)' Defining > org.osgi.service.packageadmin.ExportedPackage from > file:/p01/app/oracle/oam12c/wlserver/server/lib/org.apache.felix.org.apache.felix.main.jar > in 'weblogic-launcher' > java.lang.Exception > at > sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1340) > at sun.misc.URLClassPath.getResource(URLClassPath.java:250) > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:363) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:362) > at java.lang.ClassLoader.loadClass(ClassLoader.java:418) > at java.lang.ClassLoader.loadClass(ClassLoader.java:351) > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) > at java.lang.Class.getDeclaredMethod(Class.java:2128) > at > org.apache.felix.framework.util.SecureAction.getDeclaredMethod(SecureAction.java:850) > at > org.apache.felix.framework.URLHandlers.getFrameworkFromContext(URLHandlers.java:752) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.getStreamHandlerService(URLHandlersStreamHandlerProxy.java:574) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:369) > at java.net.URL.<init>(URL.java:639) > at java.net.URL.<init>(URL.java:507) > at > sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1340) > at sun.misc.URLClassPath.getResource(URLClassPath.java:250) > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:363) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:362) > at java.lang.ClassLoader.loadClass(ClassLoader.java:418) > at java.lang.ClassLoader.loadClass(ClassLoader.java:351) > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) > at java.lang.Class.getDeclaredMethod(Class.java:2128) > at > org.apache.felix.framework.util.SecureAction.getDeclaredMethod(SecureAction.java:850) > at > org.apache.felix.framework.URLHandlers.getFrameworkFromContext(URLHandlers.java:752) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.getStreamHandlerService(URLHandlersStreamHandlerProxy.java:574) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:369) > at java.net.URL.<init>(URL.java:639) > at java.net.URL.<init>(URL.java:507) > at > sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1340) > at sun.misc.URLClassPath.getResource(URLClassPath.java:250) > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:363) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:362) > at java.lang.ClassLoader.loadClass(ClassLoader.java:418) > at java.lang.ClassLoader.loadClass(ClassLoader.java:351) > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) > at java.lang.Class.getDeclaredMethod(Class.java:2128) > at > org.apache.felix.framework.util.SecureAction.getDeclaredMethod(SecureAction.java:850) > > > > -- This message was sent by Atlassian Jira (v8.20.10#820010)