Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82362

Deadlock detected

$
0
0

While debugging locally I got the stacktrace below. The curious part is that this object is a counter object with nothing special. There is no locking mechanisme in the model. I was wondering what could be causing this?

Regards,

Ronald

[EDIT]

I found the problem. Before a distance webservice call the user needed to select a origan and destination by setting a reference. When the webservice returned an error for some reason I can not comprehend at the moment the origin point reference would be set to empty and thus triggering the on change microflow and the webservice would be triggered again causing the deadlock. I have on the webservice custom error handling to log the webservice error, but there the references are not touched, so that is the mystery part for me. Since I can workaround the webservice triggering twice I am not going to delve deeper why a webservice fault causes the current not saved object loosing its reference.

An error has occurred while handling the request. [User 'man1' with session id '507d60de-6d1b-4115-abb1-6a2201126253' and roles 'Medewerker, Manager']

--------

com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: Exception occurred while updating data. (SQL State: 40P01, Error Code: 0)
    at Declaratie.OCh_PersoonlijkeAdres_Van (Commit : 'Commit 'DeclaratieRegel'')

Advanced stacktrace:
    at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:143)

Caused by: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: Exception occurred while updating data. (SQL State: 40P01, Error Code: 0)
    at com.mendix.core.actionmanagement.ActionManager.executeInTransactionSync(ActionManager.java:163)

Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: Exception occurred while updating data. (SQL State: 40P01, Error Code: 0)
    at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:198)

Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: Exception occurred while updating data. (SQL State: 40P01, Error Code: 0)
    at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36)

Caused by: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: Exception occurred while updating data. (SQL State: 40P01, Error Code: 0)
    at com.mendix.connectionbus.connections.jdbc.JDBCDataStore.getCorrectException(JDBCDataStore.java:1453)

Caused by: org.postgresql.util.PSQLException: ERROR: deadlock detected
  Detail: Process 2856 waits for ShareLock on transaction 301640; blocked by process 10296.
Process 10296 waits for ShareLock on transaction 301636; blocked by process 2856.
  Hint: See server log for query details.
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:366)
    at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
    at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98)
    at com.mendix.connectionbus.connections.jdbc.JDBCDataStore.execUpdateQueries(JDBCDataStore.java:830)
    at com.mendix.connectionbus.connections.jdbc.JDBCDataStore.execUpdateQueries(JDBCDataStore.java:785)
    at com.mendix.connectionbus.connections.jdbc.JDBCDataStore.store(JDBCDataStore.java:555)
    at com.mendix.connectionbus.store.EntityStorer.storeDataSetInstance(EntityStorer.java:281)
    at com.mendix.connectionbus.store.EntityStorer.handleUpdateRequest(EntityStorer.java:243)
    at com.mendix.connectionbus.store.EntityStorer.handleRequest(EntityStorer.java:168)
    at com.mendix.connectionbus.store.EntityStorer.store(EntityStorer.java:79)
    at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:94)
    at com.mendix.connectionbus.ConnectionBusImpl.doRequest(ConnectionBusImpl.java:406)
    at com.mendix.core.action.user.CommitAction.commit(CommitAction.scala:59)
    at com.mendix.core.action.user.CommitAction.commitPersistableObjects(CommitAction.scala:48)
    at com.mendix.core.action.user.CommitAction.executeAction(CommitAction.scala:36)
    at com.mendix.core.action.user.CommitAction.executeAction(CommitAction.scala:21)
    at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49)
    at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260)
    at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248)
    at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:188)
    at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)
    at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:194)
    at com.mendix.core.actionmanagement.ActionManager.executeInTransactionSync(ActionManager.java:156)
    at com.mendix.core.component.InternalCore.commitWithoutEvents(InternalCore.java:217)
    at com.mendix.core.component.InternalCore.commitWithoutEvents(InternalCore.java:205)
    at com.mendix.modules.microflowengine.actions.mxobject.CommitAction.execute(CommitAction.scala:36)
    at com.mendix.modules.microflowengine.actions.mxobject.CommitAction.execute(CommitAction.scala:19)
    at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)
    at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:192)
    at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:149)
    at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49)
    at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260)
    at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248)
    at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:188)
    at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)
    at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:194)
    at com.mendix.core.component.InternalCore.execute(InternalCore.java:386)
    at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135)
    at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:322)
    at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:315)
    at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:315)
    at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:145)
    at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)
    at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:147)
    at scala.util.Try$.apply(Try.scala:191)
    at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:141)
    at akka.actor.Actor$class.aroundReceive(Actor.scala:465)
    at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:137)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
    at akka.actor.ActorCell.invoke(ActorCell.scala:487)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
    at akka.dispatch.Mailbox.run(Mailbox.scala:220)
    at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Viewing all articles
Browse latest Browse all 82362

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>