|EclipseLink deadlock after SELECT 1 FROM DUAL [message #1279350]
||Fri, 28 March 2014 16:09
| Kibbles Lee
Registered: March 2014
I'm using eclipselink 2.4.1 with weblogic 10.3.4 and oracle 11g|
I'm getting a strange deadlock issue where the eclipselink will call "SELECT 1 FROM DUAL" and deadlock on the following query. Deadlock occurs under heavy load.
The transaction is simple, query for update on 1 row by PK column, update and commit. Schema is simple, order and order_attribute tables. order_attribute has order_id as FK and is indexed.
Can anyone shed some light on how I can debug this? Are there any debug/tracing capabilities in eclipselink that can be turned on. I can't see how a simple transaction like this would deadlock.
The interesting thing is that every deadlock is preceded by a call to SELECT 1 FROM DUAL by the same execute thread.
I have all SQL statements printed and the deadlock trace is printed below:
2014-03-28 11:26:59,647 DEBUG [ACTIVE] ExecuteThread: '50' for queue: 'weblogic.kernel.Default (self-tuning)' org.eclipse.persistence.session.file:/C:/work/eclipseindigo/workspaces/ORDER_PROJ/OrderEJBProj/build/classes/_defaultDatasource.sql - 28-Mar-2014 11:26:59 AM org.eclipse.persistence.session.file:/C:/work/eclipseindigo/workspaces/ORDER_PROJ/OrderEJBProj/build/classes/_defaultDatasource.sql ClientSession(12102843)
FINE: SELECT 1 FROM DUAL
2014-03-28 11:26:59,649 WARN [ACTIVE] ExecuteThread: '50' for queue: 'weblogic.kernel.Default (self-tuning)' org.eclipse.persistence.session.file:/C:/work/eclipseindigo/workspaces/ORDER_PROJ/OrderEJBProj/build/classes/_defaultDatasource - 28-Mar-2014 11:26:59 AM org.eclipse.persistence.session.file:/C:/work/eclipseindigo/workspaces/ORDER_PROJ/OrderEJBProj/build/classes/_defaultDatasource UnitOfWork(18049404)
WARNING: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00060: deadlock detected while waiting for resource
Error Code: 60
Call: SELECT <my query data omitted from post> WHERE (ORDER_ID = ?) FOR UPDATE
bind => 
Powered by FUDForum
. Page generated in 0.02108 seconds