Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database deadlocks on concurrent deployments #97

Closed
afischer211 opened this issue May 27, 2015 · 44 comments
Closed

database deadlocks on concurrent deployments #97

afischer211 opened this issue May 27, 2015 · 44 comments
Assignees
Labels
Milestone

Comments

@afischer211
Copy link

We use package drone 0.9.0 with MariaDB5.5.41 on CentOS7 (64bit) and Java8u45.
If different Maven builds deploys there artifacts to package-drone concurrently, we receive exceptions with following stacktrace:
javax.servlet.ServletException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.maven.internal.MavenServlet.doPut(MavenServlet.java:219) ~[de.dentrassi.pm.maven_1.0.0.20150520-1001.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) ~[javax.servlet-api_3.1.0.jar:3.1.0] at de.dentrassi.pm.storage.service.servlet.AbstractStorageServiceServlet.service(AbstractStorageServiceServlet.java:85) ~[de.dentrassi.pm.storage.service_1.0.0.20150508-1435.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api_3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) ~[na:na] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) [org.eclipse.jetty.security_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.Server.handle(Server.java:497) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [org.eclipse.jetty.io_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45] Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:87) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.modifyCall(LockManager.java:63) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.internalCreateArtifact(StorageServiceImpl.java:203) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.createArtifact(StorageServiceImpl.java:198) ~[na:na] at de.dentrassi.pm.storage.service.jpa.ChannelImpl.createArtifact(ChannelImpl.java:124) ~[na:na] at de.dentrassi.pm.maven.internal.MavenServlet.storeArtifact(MavenServlet.java:531) ~[de.dentrassi.pm.maven_1.0.0.20150520-1001.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.lambda$1(MavenServlet.java:508) ~[de.dentrassi.pm.maven_1.0.0.20150520-1001.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet$$Lambda$143/1191335508.apply(Unknown Source) ~[na:na] at de.dentrassi.pm.maven.internal.MavenServlet.pullFromTemp(MavenServlet.java:550) ~[de.dentrassi.pm.maven_1.0.0.20150520-1001.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.store(MavenServlet.java:508) ~[de.dentrassi.pm.maven_1.0.0.20150520-1001.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.store(MavenServlet.java:501) ~[de.dentrassi.pm.maven_1.0.0.20150520-1001.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.processMetaData(MavenServlet.java:457) ~[de.dentrassi.pm.maven_1.0.0.20150520-1001.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.processPut(MavenServlet.java:250) ~[de.dentrassi.pm.maven_1.0.0.20150520-1001.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.doPut(MavenServlet.java:211) ~[de.dentrassi.pm.maven_1.0.0.20150520-1001.jar:na] ... 23 common frames omitted Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithTransaction(AbstractJpaServiceImpl.java:124) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.doWithHandler(StorageServiceImpl.java:848) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$6(StorageServiceImpl.java:204) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$112/201083977.call(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.process(LockManager.java:111) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:83) ~[na:na] ... 36 common frames omitted Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.lambda$1(AbstractJpaServiceImpl.java:113) ~[na:na] at de.dentrassi.pm.common.service.AbstractJpaServiceImpl$$Lambda$12/2079861320.process(Unknown Source) ~[na:na] at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithManager(AbstractJpaServiceImpl.java:48) ~[na:na] at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithTransaction(AbstractJpaServiceImpl.java:68) ~[na:na] ... 41 common frames omitted Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1303) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1281) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$53(StorageServiceImpl.java:209) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$113/905336974.process(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$40(StorageServiceImpl.java:850) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$44/134699125.process(Unknown Source) ~[na:na] at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.lambda$1(AbstractJpaServiceImpl.java:80) ~[na:na] ... 44 common frames omitted Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:87) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.modifyCall(LockManager.java:63) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.performStoreArtifact(StorageHandlerImpl.java:477) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1289) ~[na:na] ... 50 common frames omitted Caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.lambda$6(StorageHandlerImpl.java:587) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl$$Lambda$103/1919851429.accept(Unknown Source) ~[na:na] at de.dentrassi.pm.aspect.ChannelAspectProcessor.process(ChannelAspectProcessor.java:158) ~[de.dentrassi.pm.aspect_1.0.0.20150519-0849.jar:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.runChannelTriggers(StorageHandlerImpl.java:580) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.lambda$5(StorageHandlerImpl.java:541) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl$$Lambda$106/1203510008.call(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.process(LockManager.java:111) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:83) ~[na:na] ... 53 common frames omitted Caused by: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:87) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.modifyRun(LockManager.java:50) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.runChannelAggregators(StorageHandlerImpl.java:782) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.deleteArtifact(StorageHandlerImpl.java:741) ~[na:na] at de.dentrassi.pm.storage.service.jpa.PostAddContentImpl.deleteArtifact(PostAddContentImpl.java:62) ~[na:na] at de.dentrassi.pm.aspect.cleanup.internal.CleanupListener.artifactAdded(CleanupListener.java:74) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.lambda$24(StorageHandlerImpl.java:541) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl$$Lambda$110/2090346483.accept(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.lambda$6(StorageHandlerImpl.java:583) ~[na:na] ... 60 common frames omitted Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:308) ~[na:na] at de.dentrassi.pm.storage.service.jpa.ValidationHandler.aggregateFullChannel(ValidationHandler.java:135) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.lambda$12(StorageHandlerImpl.java:842) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl$$Lambda$57/605634034.run(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.lambda$1(LockManager.java:51) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager$$Lambda$59/2043231135.call(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.process(LockManager.java:111) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:83) ~[na:na] ... 68 common frames omitted Caused by: org.eclipse.persistence.exceptions.DatabaseException: Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:902) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055) ~[na:na] at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:306) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:271) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateAll(DatasourceCallQueryMechanism.java:835) ~[na:na] at org.eclipse.persistence.queries.UpdateAllQuery.executeDatabaseQuery(UpdateAllQuery.java:154) ~[na:na] at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904) ~[na:na] at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:803) ~[na:na] at org.eclipse.persistence.queries.ModifyAllQuery.executeInUnitOfWork(ModifyAllQuery.java:148) ~[na:na] at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) ~[na:na] at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:298) ~[na:na] ... 75 common frames omitted Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_45] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_45] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_45] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_45] at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[na:na] at com.mysql.jdbc.Util.getInstance(Util.java:360) ~[na:na] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:985) ~[na:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) ~[na:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) ~[na:na] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) ~[na:na] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) ~[na:na] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2141) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2077) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2062) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:892) ~[na:na] ... 93 common frames omitted
The channel is configured with cleanup aspect and aspect for generating P2 metadata.

@afischer211
Copy link
Author

informations from MariaDB (command show engine innodb status;):

`

LATEST DETECTED DEADLOCK

150527 9:21:46
*** (1) TRANSACTION:
TRANSACTION B7C94, ACTIVE 6 sec fetching rows
mysql tables in use 1, locked 1
LOCK WAIT 49 lock struct(s), heap size 6960, 141 row lock(s), undo log entries 62
MySQL thread id 297538, OS thread handle 0x7f661ef14700, query id 48321662 localhost 127.0.0.1 pd updating
DELETE FROM VALIDATION_MESSAGES WHERE ((CHANNEL_ID = 'A0E9EAF7-DE94-41C7-B1F5-8707F0239D74') AND (TYPE = 'A'))
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 3529 n bits 96 index PRIMARY of table pd.VALIDATION_MESSAGES trx id B7C94 lock_mode X locks rec but not gap waiting
*** (2) TRANSACTION:
TRANSACTION B7C8A, ACTIVE 17 sec fetching rows
mysql tables in use 1, locked 1
56 lock struct(s), heap size 6960, 920 row lock(s), undo log entries 44
MySQL thread id 297528, OS thread handle 0x7f661efa6700, query id 48327058 localhost 127.0.0.1 pd Updating
UPDATE ARTIFACTS SET AGR_NUM_WARN = 0, AGR_NUM_ERR = 0 WHERE (CHANNEL_ID = 'D3973734-1309-46FC-B55C-6DD214ACEAB8')
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 0 page no 3529 n bits 96 index PRIMARY of table pd.VALIDATION_MESSAGES trx id B7C8A lock mode S locks rec but not gap
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 685 n bits 152 index PRIMARY of table pd.ARTIFACTS trx id B7C8A lock_mode X locks rec but not gap waiting
*** WE ROLL BACK TRANSACTION (2)
`

@ctron
Copy link
Owner

ctron commented May 27, 2015

I just checked the stack trace and I have an idea where this is coming from!

@ctron ctron added the bug label May 27, 2015
@ctron ctron self-assigned this May 27, 2015
@ctron ctron added this to the v0.9.1 milestone May 27, 2015
@ctron
Copy link
Owner

ctron commented May 27, 2015

This should be an issue caused by child artifact uploads. Which happen frequently with a plain maven upload. I think I have a fix for that in the master branch which will be in 0.9.1.

@afischer211
Copy link
Author

Ok, thanks for your quick response. When will the next version be available (for me different builds actually break because of the problem with deadlock exception on deployment)?

@ctron
Copy link
Owner

ctron commented May 27, 2015

I just uploaded the signed release candidate to Wuala (same link as before) -> https://www.wuala.com/ctron/drone/?key=rTnBx1xnFmFD

I would be glad if you could test it and give some feedback! Thanks!

@afischer211
Copy link
Author

I have downloaded and installed the new version. Then I received a big amount of errors abount contexts. So I run the software manually with -clean and reconfigure the system-settings. Now it seems to run normally and I can test with concurrent deployments.

@afischer211
Copy link
Author

After some concurrent builds against the new version 0.9.1 I dont get any exceptions anymore. So I think, the problem is fixed.

@afischer211
Copy link
Author

Sorry, the problem occurs again:
Caused by: org.eclipse.persistence.exceptions.DatabaseException: Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:902) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055) ~[na:na] at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:306) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:271) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateAll(DatasourceCallQueryMechanism.java:835) ~[na:na] at org.eclipse.persistence.queries.UpdateAllQuery.executeDatabaseQuery(UpdateAllQuery.java:154) ~[na:na] at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904) ~[na:na] at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:803) ~[na:na] at org.eclipse.persistence.queries.ModifyAllQuery.executeInUnitOfWork(ModifyAllQuery.java:148) ~[na:na] at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) ~[na:na] at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:298) ~[na:na] ... 75 common frames omitted Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_45] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_45] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_45] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_45] at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[na:na] at com.mysql.jdbc.Util.getInstance(Util.java:360) ~[na:na] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:985) ~[na:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) ~[na:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) ~[na:na] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) ~[na:na] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) ~[na:na] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2141) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2077) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2062) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:892) ~[na:na] ... 93 common frames omitted 13:28:23.035 [qtp1007018466-30] WARN o.e.jetty.servlet.ServletHandler [ServletHandler.java:620] javax.servlet.ServletException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.maven.internal.MavenServlet.doPut(MavenServlet.java:219) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) ~[javax.servlet-api_3.1.0.jar:3.1.0] at de.dentrassi.pm.storage.service.servlet.AbstractStorageServiceServlet.service(AbstractStorageServiceServlet.java:85) ~[de.dentrassi.pm.storage.service_1.0.0.20150527-0749.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api_3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) ~[na:na] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) [org.eclipse.jetty.security_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.Server.handle(Server.java:497) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [org.eclipse.jetty.io_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45] Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:87) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.modifyCall(LockManager.java:63) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.internalCreateArtifact(StorageServiceImpl.java:203) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.createArtifact(StorageServiceImpl.java:198) ~[na:na] at de.dentrassi.pm.storage.service.jpa.ChannelImpl.createArtifact(ChannelImpl.java:124) ~[na:na] at de.dentrassi.pm.maven.internal.MavenServlet.storeArtifact(MavenServlet.java:531) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.lambda$1(MavenServlet.java:508) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet$$Lambda$129/708095740.apply(Unknown Source) ~[na:na] at de.dentrassi.pm.maven.internal.MavenServlet.pullFromTemp(MavenServlet.java:550) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.store(MavenServlet.java:508) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.store(MavenServlet.java:501) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.processMetaData(MavenServlet.java:457) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.processPut(MavenServlet.java:250) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] at de.dentrassi.pm.maven.internal.MavenServlet.doPut(MavenServlet.java:211) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] ... 23 common frames omitted Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithTransaction(AbstractJpaServiceImpl.java:124) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.doWithHandler(StorageServiceImpl.java:849) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$6(StorageServiceImpl.java:204) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$131/677860406.call(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.process(LockManager.java:111) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:83) ~[na:na] ... 36 common frames omitted Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.lambda$1(AbstractJpaServiceImpl.java:113) ~[na:na] at de.dentrassi.pm.common.service.AbstractJpaServiceImpl$$Lambda$12/720693738.process(Unknown Source) ~[na:na] at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithManager(AbstractJpaServiceImpl.java:48) ~[na:na] at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithTransaction(AbstractJpaServiceImpl.java:68) ~[na:na] ... 41 common frames omitted Caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1303) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1281) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$53(StorageServiceImpl.java:209) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$132/1791184446.process(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$40(StorageServiceImpl.java:851) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$43/355030451.process(Unknown Source) ~[na:na] at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.lambda$1(AbstractJpaServiceImpl.java:80) ~[na:na] ... 44 common frames omitted Caused by: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:87) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.modifyRun(LockManager.java:50) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.runChannelAggregators(StorageHandlerImpl.java:782) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1291) ~[na:na] ... 50 common frames omitted Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:308) ~[na:na] at de.dentrassi.pm.storage.service.jpa.ValidationHandler.aggregateFullChannel(ValidationHandler.java:135) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.lambda$12(StorageHandlerImpl.java:842) ~[na:na] at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl$$Lambda$82/1541164056.run(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.lambda$1(LockManager.java:51) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager$$Lambda$52/353704296.call(Unknown Source) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.process(LockManager.java:111) ~[na:na] at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:83) ~[na:na] ... 53 common frames omitted Caused by: org.eclipse.persistence.exceptions.DatabaseException: Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction Error Code: 1213 Call: UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?) bind => [3 parameters bound] Query: UpdateAllQuery(referenceClass=ArtifactEntity sql="UPDATE ARTIFACTS SET AGR_NUM_WARN = ?, AGR_NUM_ERR = ? WHERE (CHANNEL_ID = ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:902) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055) ~[na:na] at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:306) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:271) ~[na:na] at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateAll(DatasourceCallQueryMechanism.java:835) ~[na:na] at org.eclipse.persistence.queries.UpdateAllQuery.executeDatabaseQuery(UpdateAllQuery.java:154) ~[na:na] at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904) ~[na:na] at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:803) ~[na:na] at org.eclipse.persistence.queries.ModifyAllQuery.executeInUnitOfWork(ModifyAllQuery.java:148) ~[na:na] at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839) ~[na:na] at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) ~[na:na] at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:298) ~[na:na] ... 60 common frames omitted Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_45] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_45] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_45] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_45] at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[na:na] at com.mysql.jdbc.Util.getInstance(Util.java:360) ~[na:na] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:985) ~[na:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) ~[na:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) ~[na:na] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) ~[na:na] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) ~[na:na] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2141) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2077) ~[na:na] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2062) ~[na:na] at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:892) ~[na:na] ... 78 common frames omitted

The informations from MariaDB are the same like above.

@afischer211 afischer211 reopened this May 27, 2015
@afischer211
Copy link
Author

Here the (nearly same) informations from MariaDB:


LATEST DETECTED DEADLOCK

150527 13:28:22
*** (1) TRANSACTION:
TRANSACTION D76DF, ACTIVE 6 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 85 lock struct(s), heap size 14776, 305 row lock(s), undo log entries 173
MySQL thread id 425704, OS thread handle 0x7f6629f27700, query id 54082677 localhost 127.0.0.1 pd updating
DELETE FROM VALIDATION_MESSAGES WHERE ((CHANNEL_ID = 'A0E9EAF7-DE94-41C7-B1F5-8707F0239D74') AND (TYPE = 'A'))
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 3529 n bits 96 index PRIMARY of table pd.VALIDATION_MESSAGES trx id D76DF lock_mode X locks rec but not gap waiting
*** (2) TRANSACTION:
TRANSACTION D768E, ACTIVE 17 sec fetching rows
mysql tables in use 1, locked 1
53 lock struct(s), heap size 6960, 1482 row lock(s), undo log entries 28
MySQL thread id 425623, OS thread handle 0x7f661ee39700, query id 54087134 localhost 127.0.0.1 pd Updating
UPDATE ARTIFACTS SET AGR_NUM_WARN = 0, AGR_NUM_ERR = 0 WHERE (CHANNEL_ID = 'D3973734-1309-46FC-B55C-6DD214ACEAB8')
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 0 page no 3529 n bits 96 index PRIMARY of table pd.VALIDATION_MESSAGES trx id D768E lock mode S locks rec but not gap
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 4007 n bits 120 index PRIMARY of table pd.ARTIFACTS trx id D768E lock_mode X locks rec but not gap waiting
*** WE ROLL BACK TRANSACTION (2)

@ctron
Copy link
Owner

ctron commented May 27, 2015

Do you think it is possible to switch to Postgres for a test?

I just checked how MySQL does locking and this sounds not too good. So it seems that the full tables are locked.

Now my colleague is a Postgres fan, which is why we use Postgres for "thedrone" and I only use MySQL locally. His suggestion was to dump MySQL altogether.

While I am not a fan of just switching the database to solve this issue, I am not sure it there is anything else that can be done in reasonable terms.

@afischer211
Copy link
Author

The deadlocks are now rarely, but sometimes one occurs again.
I will try to install a Postgres instance and switch over the package drone to this database.
How can I transfer my settings and channels to the other database?
Do you think, that Postgres is in general the better choice for this software? Then may be this should remarked in the Wiki.

@ctron
Copy link
Owner

ctron commented May 27, 2015

You can do a full export in the "System" -> "Storage" menu as "Admin" and then you can import everything again in the new instance. Be sure to use a different file storage blob location though.

The more I work with MySQL the more it think that PostgreSQL is a better choice. And I did update the wiki a few minutes ago to reflect that. If you do find any other place where it should be updated, please let me know!

Sorry for the troubles!

@ctron ctron removed this from the v0.9.1 milestone May 27, 2015
@afischer211
Copy link
Author

Thanks for your hints. So I will do a full export and then wipe the local filesystem storage and run server -clean ?
After this I configure package drone new for PostgreSQL and reimport the full export? So I can use the same filesystem location again.

@ctron
Copy link
Owner

ctron commented May 27, 2015

Yes this sounds good. Except for:

Be sure to use a different file storage blob location though.

The database instance is linked with the file system store. So this is not supported at the moment. So create a new database instance, install the database schema, activate the file system BLOB store and then import the channels.

@afischer211
Copy link
Author

Ok, I have switched the installation to PostgreSQL. The software is the same pre 0.9.1 version.
After some heavy stresstests (multiple concurrent uploads) I got the follwing exceptions:
`
14:46:59.083 [qtp1007018466-28] WARN o.e.jetty.servlet.ServletHandler [ServletHandler.java:620]
javax.servlet.ServletException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: Verklemmung (Deadlock) entdeckt
Detail: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633.
Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594.
Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.
Wobei: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x«
Error Code: 0
Call: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)
bind => [2 parameters bound]
Query: DataModifyQuery(name="artifacts" sql="INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)")
at de.dentrassi.pm.maven.internal.MavenServlet.doPut(MavenServlet.java:219) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) ~[javax.servlet-api_3.1.0.jar:3.1.0]
at de.dentrassi.pm.storage.service.servlet.AbstractStorageServiceServlet.service(AbstractStorageServiceServlet.java:85) ~[de.dentrassi.pm.storage.service_1.0.0.20150527-0749.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api_3.1.0.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) ~[na:na]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) [org.eclipse.jetty.security_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.Server.handle(Server.java:497) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [org.eclipse.jetty.io_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: Verklemmung (Deadlock) entdeckt
Detail: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633.
Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594.
Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.
Wobei: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x«
Error Code: 0
Call: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)
bind => [2 parameters bound]
Query: DataModifyQuery(name="artifacts" sql="INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)")
at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:87) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.modifyCall(LockManager.java:63) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.internalCreateArtifact(StorageServiceImpl.java:203) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.createArtifact(StorageServiceImpl.java:198) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.ChannelImpl.createArtifact(ChannelImpl.java:124) ~[na:na]
at de.dentrassi.pm.maven.internal.MavenServlet.storeArtifact(MavenServlet.java:531) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na]
at de.dentrassi.pm.maven.internal.MavenServlet.processUpload(MavenServlet.java:297) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na]
at de.dentrassi.pm.maven.internal.MavenServlet.processPut(MavenServlet.java:246) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na]
at de.dentrassi.pm.maven.internal.MavenServlet.doPut(MavenServlet.java:211) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na]
... 23 common frames omitted
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: Verklemmung (Deadlock) entdeckt
Detail: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633.
Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594.
Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.
Wobei: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x«
Error Code: 0
Call: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)
bind => [2 parameters bound]
Query: DataModifyQuery(name="artifacts" sql="INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)")
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithTransaction(AbstractJpaServiceImpl.java:124) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.doWithHandler(StorageServiceImpl.java:849) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$6(StorageServiceImpl.java:204) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$131/1344974515.call(Unknown Source) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.process(LockManager.java:111) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:83) ~[na:na]
... 31 common frames omitted
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: Verklemmung (Deadlock) entdeckt
Detail: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633.
Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594.
Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.
Wobei: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x«
Error Code: 0
Call: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)
bind => [2 parameters bound]
Query: DataModifyQuery(name="artifacts" sql="INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)")
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.lambda$1(AbstractJpaServiceImpl.java:113) ~[na:na]
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl$$Lambda$12/1974378849.process(Unknown Source) ~[na:na]
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithManager(AbstractJpaServiceImpl.java:48) ~[na:na]
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithTransaction(AbstractJpaServiceImpl.java:68) ~[na:na]
... 36 common frames omitted
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: Verklemmung (Deadlock) entdeckt
Detail: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633.
Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594.
Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.
Wobei: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x«
Error Code: 0
Call: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)
bind => [2 parameters bound]
Query: DataModifyQuery(name="artifacts" sql="INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)")
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1303) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1281) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$53(StorageServiceImpl.java:209) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$132/626330931.process(Unknown Source) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$40(StorageServiceImpl.java:851) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$97/864685763.process(Unknown Source) ~[na:na]
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.lambda$1(AbstractJpaServiceImpl.java:80) ~[na:na]
... 39 common frames omitted
Caused by: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: Verklemmung (Deadlock) entdeckt
Detail: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633.
Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594.
Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.
Wobei: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x«
Error Code: 0
Call: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)
bind => [2 parameters bound]
Query: DataModifyQuery(name="artifacts" sql="INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)")
at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:87) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.modifyRun(LockManager.java:50) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.runChannelAggregators(StorageHandlerImpl.java:782) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1291) ~[na:na]
... 45 common frames omitted
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: Verklemmung (Deadlock) entdeckt
Detail: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633.
Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594.
Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.
Wobei: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x«
Error Code: 0
Call: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)
bind => [2 parameters bound]
Query: DataModifyQuery(name="artifacts" sql="INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)")
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:879) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.lambda$12(StorageHandlerImpl.java:830) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl$$Lambda$48/1137260157.run(Unknown Source) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.lambda$1(LockManager.java:51) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager$$Lambda$46/750288578.call(Unknown Source) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.process(LockManager.java:111) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:83) ~[na:na]
... 48 common frames omitted
Caused by: org.eclipse.persistence.exceptions.DatabaseException:
Internal Exception: org.postgresql.util.PSQLException: FEHLER: Verklemmung (Deadlock) entdeckt
Detail: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633.
Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594.
Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.
Wobei: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x«
Error Code: 0
Call: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)
bind => [2 parameters bound]
Query: DataModifyQuery(name="artifacts" sql="INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES (?, ?)")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1620) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055) ~[na:na]
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:306) ~[na:na]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) ~[na:na]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) ~[na:na]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:271) ~[na:na]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelect(DatasourceCallQueryMechanism.java:251) ~[na:na]
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.executeNoSelect(StatementQueryMechanism.java:118) ~[na:na]
at org.eclipse.persistence.queries.DataModifyQuery.executeDatabaseQuery(DataModifyQuery.java:85) ~[na:na]
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:3267) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839) ~[na:na]
at org.eclipse.persistence.mappings.ManyToManyMapping.insertIntoRelationTable(ManyToManyMapping.java:672) ~[na:na]
at org.eclipse.persistence.mappings.ManyToManyMapping.performDataModificationEvent(ManyToManyMapping.java:831) ~[na:na]
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:160) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4260) ~[na:na]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1441) ~[na:na]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1587) ~[na:na]
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:455) ~[na:na]
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:874) ~[na:na]
... 54 common frames omitted
Caused by: org.postgresql.util.PSQLException: FEHLER: Verklemmung (Deadlock) entdeckt
Detail: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633.
Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594.
Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.
Wobei: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x«
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270) ~[na:na]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998) ~[na:na]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[na:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570) ~[na:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420) ~[na:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:366) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:892) ~[na:na]
... 77 common frames omitted

`

@ctron
Copy link
Owner

ctron commented May 28, 2015

Could you also attach the server log the message mentions? May be in the comment but somewhere else.

@afischer211
Copy link
Author

Which server log do you mean (PostgreSQL or Package-Drone)?

@ctron
Copy link
Owner

ctron commented May 28, 2015

Hinweis: Einzelheiten zur Anfrage finden Sie im Serverlog.

I guess it means the Postgres server log.

@afischer211
Copy link
Author

Here the (interesting) lines of the file pg_log/postgresql-Thu.log:
FEHLER: Verklemmung (Deadlock) entdeckt DETAIL: Prozess 3594 wartet auf ShareLock-Sperre auf Transaktion 3420; blockiert von Prozess 3633. Prozess 3633 wartet auf ShareLock-Sperre auf Transaktion 3419; blockiert von Prozess 3594. Prozess 3594: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES ($1, $2) Prozess 3633: DELETE FROM ARTIFACTS WHERE (ID = $1) TIPP: Einzelheiten zur Anfrage finden Sie im Serverlog. ZUSAMMENHANG: SQL-Anweisung »SELECT 1 FROM ONLY "public"."artifacts" x WHERE "id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR SHARE OF x« ANWEISUNG: INSERT INTO VAL_MSG_ARTIFACTS (ARTIFACT_ID, MSG_ID) VALUES ($1, $2) FEHLER: aktuelle Transaktion wurde abgebrochen, Befehle werden bis zum Ende der Transaktion ignoriert ANWEISUNG: SELECT 1
After required shutdown the following lines also occurs:
LOG: schnelles Herunterfahren verlangt LOG: etwaige aktive Transaktionen werden abgebrochen FATAL: breche Verbindung ab aufgrund von Anweisung des Administrators FATAL: breche Verbindung ab aufgrund von Anweisung des Administrators ANWEISUNG: DELETE FROM VAL_MSG_ARTIFACTS WHERE EXISTS(SELECT ID FROM VALIDATION_MESSAGES WHERE ((CHANNEL_ID = $1) AND ("TYPE" = $2)) AND ID = VAL_MSG_ARTIFACTS.MSG_ID) FATAL: breche Verbindung ab aufgrund von Anweisung des Administrators

Some remarks: Parallel to deploying over Maven-builds I delete manually (over web-interface) some artifacts. May be there are some problems with concurrent deletes from gui and inserts over Maven?

@ctron
Copy link
Owner

ctron commented May 28, 2015

Thanks for the log! I guess I will need to set up a similar use case and try to reproduce it. Since in this case there seem to be no table locks involved.

So just to get it right .. your are deploying with several Maven builds at the same time and in addition to that delete artifacts manually from the Web UI?

@afischer211
Copy link
Author

Yes. I have several Jenkins-jobs with running 'mvn deploy' operations. Parallely I manage the package-drone manually (upload some artifacts with drag&drop, delete other artifacts because of validation problems and so on). Of course this is a heavy usage profile...

@ctron
Copy link
Owner

ctron commented May 28, 2015

.. which must be supported! 😉

@ctron
Copy link
Owner

ctron commented May 28, 2015

Ok, it might be a simple problem this time. There was another location where the lock manager was not called. I will check all modify operations now just to be sure.

Would it be OK if I would give you another version in a few minutes/hours for testing? This would help a lot. And I am sorry I use you for debugging 😉

@ctron
Copy link
Owner

ctron commented May 28, 2015

I just uploaded another version to he web link ... It also is version 0.9.1 but release 2.el7.

@afischer211
Copy link
Author

Hello, I will test it tomorrow (friday) at the office. Many thanks for your quick responses and solutions...

@afischer211
Copy link
Author

The update for package drone was successful. Now let's see, if we get some more deadlocks...

@afischer211
Copy link
Author

Hello, here a new error/exception (has it something to do with the last modifications?):
`
javax.servlet.ServletException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey«
Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.xml)« existiert bereits.
Error Code: 0
Call: INSERT INTO CHANNEL_CACHE (NS, "KEY", CREATION_TS, DATA, MIME_TYPE, NAME, SIZE, CHANNEL_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
bind => [8 parameters bound]
Query: InsertObjectQuery(de.dentrassi.pm.storage.jpa.ChannelCacheEntity@2e0dd408)
at de.dentrassi.pm.maven.internal.MavenServlet.doPut(MavenServlet.java:219) ~[de.dentrassi.pm.maven_1.0.0.20150528-1324.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) ~[javax.servlet-api_3.1.0.jar:3.1.0]
at de.dentrassi.pm.storage.service.servlet.AbstractStorageServiceServlet.service(AbstractStorageServiceServlet.java:85) ~[de.dentrassi.pm.storage.service_1.0.0.20150527-0749.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api_3.1.0.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) ~[na:na]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) [org.eclipse.jetty.security_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.Server.handle(Server.java:497) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [org.eclipse.jetty.io_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey«
Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.xml)« existiert bereits.
Error Code: 0
Call: INSERT INTO CHANNEL_CACHE (NS, "KEY", CREATION_TS, DATA, MIME_TYPE, NAME, SIZE, CHANNEL_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
bind => [8 parameters bound]
Query: InsertObjectQuery(de.dentrassi.pm.storage.jpa.ChannelCacheEntity@2e0dd408)
at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:87) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.modifyCall(LockManager.java:63) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.internalCreateArtifact(StorageServiceImpl.java:203) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.createArtifact(StorageServiceImpl.java:198) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.ChannelImpl.createArtifact(ChannelImpl.java:124) ~[na:na]
at de.dentrassi.pm.maven.internal.MavenServlet.storeArtifact(MavenServlet.java:531) ~[de.dentrassi.pm.maven_1.0.0.20150528-1324.jar:na]
at de.dentrassi.pm.maven.internal.MavenServlet.processUpload(MavenServlet.java:297) ~[de.dentrassi.pm.maven_1.0.0.20150528-1324.jar:na]
at de.dentrassi.pm.maven.internal.MavenServlet.processPut(MavenServlet.java:246) ~[de.dentrassi.pm.maven_1.0.0.20150528-1324.jar:na]
at de.dentrassi.pm.maven.internal.MavenServlet.doPut(MavenServlet.java:211) ~[de.dentrassi.pm.maven_1.0.0.20150528-1324.jar:na]
... 23 common frames omitted
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey«
Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.xml)« existiert bereits.
Error Code: 0
Call: INSERT INTO CHANNEL_CACHE (NS, "KEY", CREATION_TS, DATA, MIME_TYPE, NAME, SIZE, CHANNEL_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
bind => [8 parameters bound]
Query: InsertObjectQuery(de.dentrassi.pm.storage.jpa.ChannelCacheEntity@2e0dd408)
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithTransaction(AbstractJpaServiceImpl.java:124) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.doWithHandler(StorageServiceImpl.java:854) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$6(StorageServiceImpl.java:204) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$63/1317300901.call(Unknown Source) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.process(LockManager.java:111) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:83) ~[na:na]
... 31 common frames omitted
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey«
Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.xml)« existiert bereits.
Error Code: 0
Call: INSERT INTO CHANNEL_CACHE (NS, "KEY", CREATION_TS, DATA, MIME_TYPE, NAME, SIZE, CHANNEL_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
bind => [8 parameters bound]
Query: InsertObjectQuery(de.dentrassi.pm.storage.jpa.ChannelCacheEntity@2e0dd408)
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.lambda$1(AbstractJpaServiceImpl.java:113) ~[na:na]
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl$$Lambda$12/2041113371.process(Unknown Source) ~[na:na]
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithManager(AbstractJpaServiceImpl.java:48) ~[na:na]
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.doWithTransaction(AbstractJpaServiceImpl.java:68) ~[na:na]
... 36 common frames omitted
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey«
Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.xml)« existiert bereits.
Error Code: 0
Call: INSERT INTO CHANNEL_CACHE (NS, "KEY", CREATION_TS, DATA, MIME_TYPE, NAME, SIZE, CHANNEL_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
bind => [8 parameters bound]
Query: InsertObjectQuery(de.dentrassi.pm.storage.jpa.ChannelCacheEntity@2e0dd408)
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1311) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1289) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$53(StorageServiceImpl.java:209) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$65/703015248.process(Unknown Source) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl.lambda$40(StorageServiceImpl.java:856) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageServiceImpl$$Lambda$43/255678580.process(Unknown Source) ~[na:na]
at de.dentrassi.pm.common.service.AbstractJpaServiceImpl.lambda$1(AbstractJpaServiceImpl.java:80) ~[na:na]
... 39 common frames omitted
Caused by: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey«
Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.xml)« existiert bereits.
Error Code: 0
Call: INSERT INTO CHANNEL_CACHE (NS, "KEY", CREATION_TS, DATA, MIME_TYPE, NAME, SIZE, CHANNEL_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
bind => [8 parameters bound]
Query: InsertObjectQuery(de.dentrassi.pm.storage.jpa.ChannelCacheEntity@2e0dd408)
at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:87) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.modifyRun(LockManager.java:50) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.runChannelAggregators(StorageHandlerImpl.java:790) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.internalCreateArtifact(StorageHandlerImpl.java:1299) ~[na:na]
... 45 common frames omitted
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002](Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey«
Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.xml)« existiert bereits.
Error Code: 0
Call: INSERT INTO CHANNEL_CACHE (NS, "KEY", CREATION_TS, DATA, MIME_TYPE, NAME, SIZE, CHANNEL_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
bind => [8 parameters bound]
Query: InsertObjectQuery(de.dentrassi.pm.storage.jpa.ChannelCacheEntity@2e0dd408)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:879) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl.lambda$15(StorageHandlerImpl.java:838) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.StorageHandlerImpl$$Lambda$88/4444053.run(Unknown Source) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.lambda$1(LockManager.java:51) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager$$Lambda$90/235730862.call(Unknown Source) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.process(LockManager.java:111) ~[na:na]
at de.dentrassi.pm.storage.service.jpa.LockManager.act(LockManager.java:83) ~[na:na]
... 48 common frames omitted
Caused by: org.eclipse.persistence.exceptions.DatabaseException:
Internal Exception: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey«
Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.xml)« existiert bereits.
Error Code: 0
Call: INSERT INTO CHANNEL_CACHE (NS, "KEY", CREATION_TS, DATA, MIME_TYPE, NAME, SIZE, CHANNEL_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
bind => [8 parameters bound]
Query: InsertObjectQuery(de.dentrassi.pm.storage.jpa.ChannelCacheEntity@2e0dd408)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1620) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055) ~[na:na]
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:306) ~[na:na]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) ~[na:na]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) ~[na:na]
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:377) ~[na:na]
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:165) ~[na:na]
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:180) ~[na:na]
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:489) ~[na:na]
at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80) ~[na:na]
at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90) ~[na:na]
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:301) ~[na:na]
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58) ~[na:na]
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904) ~[na:na]
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:803) ~[na:na]
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108) ~[na:na]
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85) ~[na:na]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1790) ~[na:na]
at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:227) ~[na:na]
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:194) ~[na:na]
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:139) ~[na:na]
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4260) ~[na:na]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1441) ~[na:na]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1587) ~[na:na]
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:455) ~[na:na]
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:874) ~[na:na]
... 54 common frames omitted
Caused by: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey«
Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.xml)« existiert bereits.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270) ~[na:na]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998) ~[na:na]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[na:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570) ~[na:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420) ~[na:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:366) ~[na:na]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:892) ~[na:na]
... 85 common frames omitted

`

@ctron
Copy link
Owner

ctron commented May 29, 2015

Sorry, for that. I am not sure how this could happen. I will dig into it.

@ctron
Copy link
Owner

ctron commented May 29, 2015

I am currently trying to create a local stress test scenario with multiple concurrent builds. I guess it was time 😉

@afischer211
Copy link
Author

I have completely cleared the channel now and refill it again with maven deployments.
May be the cache was corrupted because of the other problems with transactions?

@ctron
Copy link
Owner

ctron commented May 29, 2015

Well it should not! I am currently trying to reproduce it. Not with complete success 😉

I could reproduce the MySQL problem. This really is a problem. Switching to Postgres this is gone. I was also able to create another issue 😄 some trouble with the XML parser used concurrently.

But not the cache issue, at least until now.

@ctron
Copy link
Owner

ctron commented May 29, 2015

I got the same exception now!

@ctron
Copy link
Owner

ctron commented May 29, 2015

Did you modify channel aspects when this exception did occur?

@afischer211
Copy link
Author

It could be, that I have reconfigured the cleanup aspect. Other aspects - I think no.
I will stay on PostgreSQL because of the general better stability. May be you should remove the support for MySQL/MariaDB completely?

@ctron
Copy link
Owner

ctron commented May 29, 2015

Ok .. I think I got a clue what happens ... the lock managers locks, based on the channel id. However some operations also operate on the channel alias/name. So the lock would not be the same. This is something I completely overlooked!

This is more a note to myself, since I have to leave now for weekend 😉 I will fix this on Monday!

@ctron
Copy link
Owner

ctron commented May 29, 2015

I do have an idea how to "rescue" the MySQL setup. However, you are right. There should be a big warning sign when using MySQL.

@ctron
Copy link
Owner

ctron commented May 29, 2015

Btw ... this also brings up a workaround ... as long as you only access the channel either by name or by id, not both at the same time, the issue should not occur!

@ctron
Copy link
Owner

ctron commented Jun 1, 2015

Ok, a little bit of update here. It was not my original though. Actually the channel alias is used, but never passed to the lock manager. Which is how it should be.

I guess the weekend gave me a fresh look on this and I did found a race condition between the lock manager and the actual database transaction. In some cases the lock is released before the transaction is actually committed.

After a fix for this specific case, I can reproduce that I the issue is fixed. However I will check a few more occasions where this might happen, since I now know the pattern to look for.

But definitely this will occur when adding aspects to the channel.

ctron added a commit that referenced this issue Jun 1, 2015
The issue is caused by the fact that the channel cache entries
are written to the database, but are not committed. The second
operation gets woken up by the lock manager too early. The first
operation opens the transaction before locking the channel, which,
as of now, also closes the transaction _after_ releasing the lock.
ctron added a commit that referenced this issue Jun 1, 2015
The issue is caused by the fact that the channel cache entries
are written to the database, but are not committed. The second
operation gets woken up by the lock manager too early. The first
operation opens the transaction before locking the channel, which,
as of now, also closes the transaction _after_ releasing the lock.
@afischer211
Copy link
Author

I have got the error again with version 0.9.4.
I have a running maven-job, whch deploys to a specific pdrone-channel and in the same time I delete an artifact from the same channel. Now I get the same execption about doubled keys (unique constraint):
10:23:44.804 [qtp951225204-32] WARN o.e.jetty.servlet.ServletHandler [ServletHandler.java:620] javax.servlet.ServletException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »channel_cache_pkey« Detail: Schlüssel »(channel_id, ns, "KEY")=(1D89D103-EFB0-4C1B-940B-91527DD16AD8, p2.repo, content.jar)« existiert bereits. Error Code: 0 Call: INSERT INTO CHANNEL_CACHE (NS, "KEY", CREATION_TS, DATA, MIME_TYPE, NAME, SIZE, CHANNEL_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?) bind => [8 parameters bound] Query: InsertObjectQuery(de.dentrassi.pm.storage.jpa.ChannelCacheEntity@4718a7b9) at de.dentrassi.pm.maven.internal.MavenServlet.doPut(MavenServlet.java:219) ~[de.dentrassi.pm.maven_1.0.0.20150521-1004.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) ~[javax.servlet-api_3.1.0.jar:3.1.0] at de.dentrassi.pm.storage.service.servlet.AbstractStorageServiceServlet.service(AbstractStorageServiceServlet.java:85) ~[de.dentrassi.pm.storage.service_1.0.0.20150527-0749.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api_3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) ~[na:na] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) [org.eclipse.jetty.security_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [org.eclipse.jetty.servlet_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.Server.handle(Server.java:497) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [org.eclipse.jetty.server_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [org.eclipse.jetty.io_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [org.eclipse.jetty.util_9.2.9.v20150224.jar:9.2.9.v20150224] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]

* I don't have modified anything on the aspects or aspect-configuration of this channel in the moment!* Only concurrently adding artifacts over maven-deploy and deleting other artifacts from the same channel over web-gui.

@ctron
Copy link
Owner

ctron commented Jun 3, 2015

Yes, this is the same problem. The fix only fixed the "add aspect" case. There are a few other occasions where this could happen. It is fixed in 0.10.0.

But the change on the locking are rather extensive. So I don't want to simply add these in the 0.9.x branch.

However I made the same stress test with the new locking mechanism in 0.10.0 did not run into this issue anymore.

@ctron ctron added this to the v0.10.0-m1 milestone Jun 3, 2015
@afischer211
Copy link
Author

Is the new version 0.10.0-m1 stable enough compared to 0.9.4?
I see, that you have switched the equinox to mars and the felix configuration-management. What does it mean for update and can you recommend it already now?

@ctron
Copy link
Owner

ctron commented Jun 4, 2015

The short answer is: no.

0.10.0 is planned not to have any database schema changes, so it should be easy to downgrade again. But there will be a few more changes and the release is not yet complete.

The next milestone is planned for next week. So I think this is a better candidate.

@afischer211
Copy link
Author

I have updated to version 0.10.0-m2, all is running. I will see, if all exceptions for deadlocks are gone...

@afischer211
Copy link
Author

Until now (after 48h of test) I don't receive any new exceptions. So I think, the problem is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants