Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-10881

Upgrade from 3.4.13 with MT to 4.2 hangs during applying patch.activitiesTemplatesUpdate

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 4.2
    • Fix Version/s: 4.2.2
    • Component/s: Multitenant, Upgrades
    • Labels:
      None
    • Environment:

      Description

      Found during validation of ALF-16662.

      Steps to reproduce:

      1. Start 3.4.13 with MT enabled
      2. Open Tenant Admin Console
      3. Create any tenant 'tenant'
      4. Stop 3.4.13
      5. Start 4.2 with Lucene search engine (index.recovery.mode=AUTO)

      Observed result: Upgrade hangs when patch.activitiesTemplatesUpdate is being applied. Please, see the logs and jstack dump in the attachment.
      [UPD] The patch fails with an error in more than half an hour:

       2013-11-01 11:59:32,735  WARN  [admin.patch.AbstractPatch] [AbstractPatch Processor for patch.activitiesTemplatesUpdate1] AbstractPatch Processor for patch.activitiesTemplatesUpdate: Failed to process entry "tenant".
       org.springframework.dao.CannotAcquireLockException: 
      ### Error updating database.  Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
      ### The error may involve alfresco.qname.insert.insert_QName-Inline
      ### The error occurred while setting parameters
      ### Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
      ; SQL []; Lock wait timeout exceeded; try restarting transaction; nested exception is java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
      	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:261)
      	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
      	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
      	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:346)
      	at com.sun.proxy.$Proxy8.insert(Unknown Source)
      	at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:231)
      	at org.alfresco.repo.domain.qname.ibatis.QNameDAOImpl.createQNameEntity(QNameDAOImpl.java:113)
      	at org.alfresco.repo.domain.qname.AbstractQNameDAOImpl$QNameCallbackDAO.createValue(AbstractQNameDAOImpl.java:351)
      	at org.alfresco.repo.domain.qname.AbstractQNameDAOImpl$QNameCallbackDAO.createValue(AbstractQNameDAOImpl.java:295)
      	at org.alfresco.repo.cache.lookup.EntityLookupCache.getOrCreateByValue(EntityLookupCache.java:469)
      	at org.alfresco.repo.domain.qname.AbstractQNameDAOImpl.getOrCreateQName(AbstractQNameDAOImpl.java:257)
      	at org.alfresco.repo.domain.node.NodePropertyHelper.convertToPersistentProperties(NodePropertyHelper.java:92)
      	at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.setNodePropertiesImpl(AbstractNodeDAOImpl.java:2234)
      	at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.addNodeProperties(AbstractNodeDAOImpl.java:2416)
      	at org.alfresco.repo.node.db.DbNodeServiceImpl.addAspectsAndProperties(DbNodeServiceImpl.java:553)
      	at org.alfresco.repo.node.db.DbNodeServiceImpl.addAspectsAndProperties(DbNodeServiceImpl.java:455)
      	at org.alfresco.repo.node.db.DbNodeServiceImpl.addAspect(DbNodeServiceImpl.java:793)
      	at sun.reflect.GeneratedMethodAccessor525.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:140)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at com.sun.proxy.$Proxy11.addAspect(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor525.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:215)
      	at com.sun.proxy.$Proxy30.addAspect(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor525.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:306)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.repo.lock.mem.LockableAspectInterceptor.invoke(LockableAspectInterceptor.java:200)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.enterprise.repo.sync.SyncPropertyInterceptor.invoke(SyncPropertyInterceptor.java:258)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:135)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at com.sun.proxy.$Proxy11.addAspect(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor525.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
      	at com.sun.proxy.$Proxy11.addAspect(Unknown Source)
      	at org.alfresco.repo.admin.patch.impl.GenericEMailTemplateUpdatePatch.updateContent(GenericEMailTemplateUpdatePatch.java:155)
      	at org.alfresco.repo.admin.patch.impl.GenericEMailTemplateUpdatePatch.updateTemplates(GenericEMailTemplateUpdatePatch.java:95)
      	at org.alfresco.repo.admin.patch.impl.ActivitiesTemplatesUpdatePatch.applyInternal(ActivitiesTemplatesUpdatePatch.java:88)
      	at org.alfresco.repo.admin.patch.AbstractPatch$2$1.doWork(AbstractPatch.java:508)
      	at org.alfresco.repo.admin.patch.AbstractPatch$2$1.doWork(AbstractPatch.java:505)
      	at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
      	at org.alfresco.repo.admin.patch.AbstractPatch$2.process(AbstractPatch.java:504)
      	at org.alfresco.repo.admin.patch.AbstractPatch$2.process(AbstractPatch.java:487)
      	at org.alfresco.repo.batch.BatchProcessor$TxnCallback.execute(BatchProcessor.java:712)
      	at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452)
      	at org.alfresco.repo.batch.BatchProcessor$TxnCallback.run(BatchProcessor.java:756)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:724)
      Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
      	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1362)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
      	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:22)
      	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:51)
      	at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:29)
      	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:87)
      	at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:46)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:118)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:107)
      	at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:338)
      	... 66 more
      

      Please, see the logs.
      Then the same error occurs for patch.publishing.root and patch.remoteCredentialsContainer.

      Note: Upgrade without MT proceeds successfully.

      ChristinaSh

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs (Inactive)
                  Reporter:
                  alfrescoqa Alfresco QA Team (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day, 4 hours, 30 minutes
                    1d 4h 30m

                      Structure Helper Panel