Uploaded image for project: 'Jahia Community'
  1. Jahia Community
  2. JAHIA-3459

Infinite loop in JahiaAcl.getRecursedPermissions() (which causes StackOverflow)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • xCM 5.0 SP4
    • WCM 5.0 SP3
    • None
    • Windows 2003 Server + Orcale10g + Tomcat 5.5.17 + Jahia SP3
    • Acl getRecursedPermissions infinite loop JahiaAcl

    Description

      Removing inherited permissions for a group on a ContentContainer causes Error in Rights Management Engine : an infinite loop in method getRecursedPermissions() from class JahiaAcl. Once this change has been made, error appears systematically on Rights Tab of Container and his parents and childs... See below :

      2008-09-24 10:15:09,343: ERROR [TP-Processor19] JahiaAction, org.jahia.bin.JahiaAction: Error
      java.lang.StackOverflowError
      at oracle.jdbc.driver.Accessor.initForDescribe(Accessor.java:240)
      at oracle.jdbc.driver.NumberCommonAccessor.init(NumberCommonAccessor.java:37)
      at oracle.jdbc.driver.NumberAccessor.<init>(NumberAccessor.java:29)
      at oracle.jdbc.driver.T4CNumberAccessor.<init>(T4CNumberAccessor.java:49)
      at oracle.jdbc.driver.T4CTTIdcb.fillupAccessors(T4CTTIdcb.java:352)
      at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:215)
      at oracle.jdbc.driver.T4CTTIdcb.receive(T4CTTIdcb.java:114)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:703)
      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
      at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799)
      at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
      at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
      at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:1272)
      at org.hibernate.loader.Loader.doQuery(Loader.java:391)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
      at org.hibernate.loader.Loader.doList(Loader.java:1593)
      at org.hibernate.loader.Loader.list(Loader.java:1577)
      at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1322)
      at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:300)
      at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:433)
      at org.jahia.hibernate.dao.AbstractGeneratorDAO$1.doInHibernate(AbstractGeneratorDAO.java:108)
      at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:312)
      at org.jahia.hibernate.dao.AbstractGeneratorDAO.findByCriteria(AbstractGeneratorDAO.java:95)
      at org.jahia.hibernate.dao.AbstractGeneratorDAO.findByCriteriaUnique(AbstractGeneratorDAO.java:90)
      at org.jahia.hibernate.dao.JahiaAclDAO.findAclById(JahiaAclDAO.java:62)
      at org.jahia.hibernate.manager.JahiaAclManager.findJahiaAclById(JahiaAclManager.java:90)
      at org.jahia.hibernate.manager.JahiaAclManager$$FastClassByCGLIB$$e9e5ac0.invoke(<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:661)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:57)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
      at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:80)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
      at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:546)
      at org.jahia.hibernate.manager.JahiaAclManager$$EnhancerByCGLIB$$f826d9a5.findJahiaAclById(<generated>)
      at org.jahia.hibernate.model.JahiaAcl.getParent(JahiaAcl.java:233)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:959)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)
      at org.jahia.hibernate.model.JahiaAcl.getRecursedPermissions(JahiaAcl.java:968)

      I checked org.jahia.hibernate.model.JahiaAcl.java source file for SP4 in SVN. I can see a change has been made in getRecursedPermissions method. When I replace the SP3 method by the SP4 one in my development environment, I don't get the error in browser anymore, but the following traces in log file :

      2008-09-24 10:30:50,139: ERROR [TP-Processor22] JahiaAcl, org.jahia.hibernate.model.JahiaAcl: Permission loop detected : [307, 89, 410]
      2008-09-24 10:30:50,139: ERROR [TP-Processor22] JahiaAcl, org.jahia.hibernate.model.JahiaAcl: Permission loop detected : [307, 89, 410]
      2008-09-24 10:30:50,139: ERROR [TP-Processor22] JahiaAcl, org.jahia.hibernate.model.JahiaAcl: Permission loop detected : [307, 89, 410]
      2008-09-24 10:30:50,139: ERROR [TP-Processor22] JahiaAcl, org.jahia.hibernate.model.JahiaAcl: Permission loop detected : [307, 89, 410]
      2008-09-24 10:30:50,139: ERROR [TP-Processor22] JahiaAcl, org.jahia.hibernate.model.JahiaAcl: Permission loop detected : [307, 89, 410]
      2008-09-24 10:30:50,139: ERROR [TP-Processor22] JahiaAcl, org.jahia.hibernate.model.JahiaAcl: Permission loop detected : [307, 89, 410]

      which is good, but Acl for the ContentContainer that caused the problem are totally inconsistent : I have inherited Acl with wrong permissions, or if I add a permission on a parent element, I dosen't inherit correctly...

      My questions are :

      • Are there any other changes in code and / or database I should perform to solve the problem. ?
      • Would a full migration to SP4 solve the problem definitively ?

      Thanks for your help,

      Antoine T (Smile Levallois)

      TestRail: Results

        Attachments

          Activity

            People

              Unassigned Unassigned
              ataillefer Antoine Taillefer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                TestRail: Runs

                  TestRail: Cases

                    Packages

                      Version Package
                      xCM 5.0 SP4