Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » deadlock in a LAZY fetch
deadlock in a LAZY fetch [message #828044] Sat, 24 March 2012 05:25 Go to next message
El Ciri is currently offline El Ciri
Messages: 1
Registered: March 2012
Junior Member
Hi,

In version 2.2.0 of EclipseLink, sometimes occur deadlocks when getting joined entities in a lazy fetching.

Here is the stack of the locked thread:

"pool-1-thread-68" prio=10 tid=0x00002aaba0d60c00 nid=0x35e8 runnable [0x0000000045f86000..0x0000000045f87ba0]
   java.lang.Thread.State: RUNNABLE
 at java.util.HashMap.get(HashMap.java:303)
 at org.eclipse.persistence.internal.identitymaps.FullIdentityMap.getCacheKey(FullIdentityMap.java:104)
 at org.eclipse.persistence.internal.identitymaps.UnitOfWorkIdentityMap.acquireLock(UnitOfWorkIdentityMap.java:66)
 at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.acquireLock(IdentityMapManager.java:144)
 at org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLock(IdentityMapAccessor.java:92)
 at org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLock(IdentityMapAccessor.java:83)
 at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java:583)
 at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:565)
 at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:497)
 at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:456)
 at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:723)
 at org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:742)
 at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:423)
 at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1080)
 at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:808)
 at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040)
 at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:383)
 at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1126)
 at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2842)
 at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1521)
 at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1503)
 at org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:98)
 at org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:88)
 at org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:88)
 - locked <0x00002aaab7098938> (a org.eclipse.persistence.internal.indirection.QueryBasedValueHolder)
 at org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:161)
 at org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:222)
 at org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:88)
 - locked <0x00002aaab7098740> (a org.eclipse.persistence.internal.indirection.UnitOfWorkQueryValueHolder)
 at org.eclipse.persistence.indirection.IndirectSet.buildDelegate(IndirectSet.java:192)
 at org.eclipse.persistence.indirection.IndirectSet.getDelegate(IndirectSet.java:343)
 - locked <0x00002aaab70986f8> (a org.eclipse.persistence.indirection.IndirectSet)
 at org.eclipse.persistence.indirection.IndirectSet$1.<init>(IndirectSet.java:410)
 at org.eclipse.persistence.indirection.IndirectSet.iterator(IndirectSet.java:409)
 at de.infx.vto.VTOToINFX2Thread.run(VTOToINFX2Thread.java:242)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
 at java.lang.Thread.run(Thread.java:619)


Could it be an EclipseLink bug?

Thanks for your help..

[Updated on: Sat, 24 March 2012 05:26]

Report message to a moderator

Re: deadlock in a LAZY fetch [message #829705 is a reply to message #828044] Mon, 26 March 2012 17:21 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

See,

http://wiki.eclipse.org/EclipseLink/FAQ/JPA#How_to_diagnose_and_resolve_hangs_and_deadlocks.3F

One stack trace is not enough to evaluate a deadlock. Much more info as to what your are doing with how many threads, and at least two locked stacks would be required.


James : Wiki : Book : Blog : Twitter
Previous Topic:BundleException in org.eclipse.persistence.jpa.osgi.Activator.start()
Next Topic:DatabasePlatform: convert varchar to nvarchar for ms sql server
Goto Forum:
  


Current Time: Fri Oct 24 07:46:42 GMT 2014

Powered by FUDForum. Page generated in 0.03245 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software