syncope-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò (JIRA) <j...@apache.org>
Subject [jira] [Created] (SYNCOPE-1241) Under high load propagation after pull might fail
Date Fri, 01 Dec 2017 10:44:00 GMT
Francesco Chicchiriccò created SYNCOPE-1241:
-----------------------------------------------

             Summary: Under high load propagation after pull might fail
                 Key: SYNCOPE-1241
                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1241
             Project: Syncope
          Issue Type: Bug
          Components: core
    Affects Versions: 2.0.6
            Reporter: Francesco Chicchiriccò
            Assignee: Francesco Chicchiriccò
             Fix For: 2.0.7, 2.1.0


The [PriorityPropagationTaskExecutor|https://github.com/apache/syncope/blob/2_0_X/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/PriorityPropagationTaskExecutor.java]
is designed to run the assigned PropagationTask instance via a {{CompletionService}}, e.g.
potentially in a separate thread.

Dach PropagationTask instance carries a reference to ExternalResource, and in the end to the
underlying JDBC connection (via OpenJPA); given what said above, it might happen that a PropagationTask
is executed in a different thread than the one it was created in, resulting in errors as follows:

{code}
ERROR org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor - Exception
during provision on resource USERSCHED-write
org.apache.openjpa.persistence.PersistenceException: This statement has been closed.
        at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:5003) ~[openjpa-jdbc-2.4.2.jar:2.4.2]
        at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4963)
~[openjpa-jdbc-2.4.2.jar:2.4.2]
        at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:133) ~[openjpa-jdbc-2.4.2.jar:2.4.2]
        at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:115) ~[openjpa-jdbc-2.4.2.jar:2.4.2]
        at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:67) ~[openjpa-jdbc-2.4.2.jar:2.4.2]
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:687)
~[openjpa-jdbc-2.4.2.jar:2.4.2]
        at org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:117)
~[openjpa-kernel-2.4.2.jar:2.4.2]
        at org.apache.openjpa.datacache.DataCacheStoreManager.load(DataCacheStoreManager.java:462)
~[openjpa-kernel-2.4.2.jar:2.4.2]
        at org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:117)
~[openjpa-kernel-2.4.2.jar:2.4.2]
        at org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78) ~[openjpa-kernel-2.4.2.jar:2.4.2]
        at org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:3145)
~[openjpa-kernel-2.4.2.jar:2.4.2]
        at org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.java:3225)
~[openjpa-kernel-2.4.2.jar:2.4.2]
        at org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(StateManagerImpl.java:1690)
~[openjpa-kernel-2.4.2.jar:2.4.2]
        at org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerImpl.java:1624)
~[openjpa-kernel-2.4.2.jar:2.4.2]
        at org.apache.syncope.core.persistence.jpa.entity.resource.JPAExternalResource.pcGetorgUnit(JPAExternalResource.java)
~[syncope-core-persistence-jpa-2.0.6.jar:2.0.6]
        at org.apache.syncope.core.persistence.jpa.entity.resource.JPAExternalResource.getOrgUnit(JPAExternalResource.java:238)
~[syncope-core-persistence-jpa-2.0.6.jar:2.0.6]
        at org.apache.syncope.core.provisioning.java.propagation.AbstractPropagationTaskExecutor.execute(AbstractPropagationTaskExecutor.java:389)
~[syncope-core-provisioning-java-2.0.6.jar:2.0.6]
        at org.apache.syncope.core.provisioning.java.propagation.DefaultPropagationTaskCallable.call(DefaultPropagationTaskCallable.java:89)
~[syncope-core-provisioning-java-2.0.6.jar:2.0.6]
        at org.apache.syncope.core.provisioning.java.propagation.DefaultPropagationTaskCallable.call(DefaultPropagationTaskCallable.java:38)
~[syncope-core-provisioning-java-2.0.6.jar:2.0.6]
        at sun.reflect.GeneratedMethodAccessor798.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_151]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_151]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
~[spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
~[spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
~[spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
~[spring-tx-4.3.11.RELEASE.jar:4.3.11.RELEASE]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
~[spring-tx-4.3.11.RELEASE.jar:4.3.11.RELEASE]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
~[spring-tx-4.3.11.RELEASE.jar:4.3.11.RELEASE]
        at org.apache.syncope.core.persistence.jpa.spring.DomainTransactionInterceptor.invoke(DomainTransactionInterceptor.java:64)
~[syncope-core-persistence-jpa-2.0.6.jar:2.0.6]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
~[spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
~[spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
        at com.sun.proxy.$Proxy295.call(Unknown Source) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_151]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_151]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_151]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[?:1.8.0_151]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[?:1.8.0_151]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
Caused by: org.postgresql.util.PSQLException: This statement has been closed.
        at org.postgresql.jdbc.PgStatement.checkClosed(PgStatement.java:647) ~[postgresql-42.1.1.jar:42.1.1]
{code}

Such errors are observed especially when, as a result of a PullTask execution, several PropagationTasks
are generated and executed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message