Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » ConcurrencyException(Bug in ConcurrencyManager?)
ConcurrencyException [message #819964] Tue, 13 March 2012 14:59 Go to next message
Robin CAMUS is currently offline Robin CAMUS
Messages: 8
Registered: January 2012
Junior Member
Hi,

I got some issues using the 2.3.1 version (works perfectly fine with 2.1.2):

####<5 mars 2012 17 h 25 CET> <Error> <WebLogicServer> <qmvpl15051.n07.an.cnav> <PRODFOAGAPREV1> <[STANDBY] ExecuteThread: '27' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330964753411> <WL-000337> <[STUCK] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "621" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@2a7cb61d[
POST /onp/lri/cmd.do?commande=consulter HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Referer: WWW
Accept-Language: fr
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Content-Length: 145
Pragma: no-cache
Cookie: JSESSIONID=VBpcPJlpqK0q0vWTcyQqJ0dSR2y1JvbKx89yRxmpC1cP2d31YNl1!1612233766
Client-IP: 50.113.254.6
Connection: Keep-Alive
X-BlueCoat-Via: 46286BAE331B3E03

]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
Thread-25 "[STUCK] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, suspended, sleeping, priority=1, DAEMON> {
    java.lang.Thread.sleep(Thread.java:???)
    org.eclipse.persistence.internal.helper.ConcurrencyManager.releaseDeferredLock(ConcurrencyManager.java:430)
    org.eclipse.persistence.internal.identitymaps.CacheKey.releaseDeferredLock(CacheKey.java:379)
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:759)
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java:686)
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:656)
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:569)
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:556)
    org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:717)
    org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:735)
    org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:404)
    org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1051)
    org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:759)
    org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1036)
    org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:354)
    org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1123)
    org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1509)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1472)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1458)
    org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:406)
    org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:721)
    onp.metier.commun.PieceJointeDAOBean.getListePiecesJointes(PieceJointeDAOBean.java:91)
    sun.reflect.GeneratedMethodAccessor758.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
...




####<5 mars 2012 17 h 25 CET> <Error> <WebLogicServer> <qmvpl15051.n07.an.cnav> <PRODFOAGAPREV1> <[STANDBY] ExecuteThread: '27' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1330964753415> <WL-000337> <[STUCK] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "614" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@20910187[
POST /onp/lri/cmd.do?commande=consulter HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Referer: xxx
Accept-Language: fr
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Content-Length: 145
Pragma: no-cache
Cookie: JSESSIONID=VBpcPJlpqK0q0vWTcyQqJ0dSR2y1JvbKx89yRxmpC1cP2d31YNl1!1612233766
Client-IP: 50.113.254.6
Connection: Keep-Alive
X-BlueCoat-Via: 46286BAE331B3E03

]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
Thread-68 "[STUCK] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, suspended, waiting, priority=1, DAEMON> {
    -- Waiting for notification on: org.eclipse.persistence.internal.helper.ConcurrencyManager@208eb6ac[fat lock]
    java.lang.Object.wait(Object.java:???)
    java.lang.Object.wait(Object.java:485)
    org.eclipse.persistence.internal.helper.WriteLockManager.acquireLocksForClone(WriteLockManager.java:70)
    org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.cloneAndRegisterObject(UnitOfWorkImpl.java:942)
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java:686)
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:656)
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:569)
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:556)
    org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:717)
    org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:735)
    org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:404)
    org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1051)
    org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:759)
    org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1036)
    org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:354)
    org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1123)
    org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1509)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1472)
    org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1458)
    org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:406)
    org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:721)
    onp.metier.commun.PieceJointeDAOBean.getListePiecesJointes(PieceJointeDAOBean.java:91)
    sun.reflect.GeneratedMethodAccessor758.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
...


and one :

2012-03-05/14:22:21 ERROR onp.utils.OnpException - Identifiant  : 20120305-142221-11
Date Log        : le 05/03/2012 à 14:22:21
Exception       : org.eclipse.persistence.exceptions.ConcurrencyException
Message         :
Exception Description: Max number of attempts to lock object exceded.  Failed to build the object. Thread: Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads] has a lock on the object but thread: Thread[[ACTIVE] ExecuteThread: '66' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads] is building the object
Type            : Technique
Package         : onp.metier.commun
Classe          : onp.metier.commun.PortefeuilleDAO_7854r4_Impl
Méthode         : getListePortefeuilles
Trace           :
Local Exception Stack:
Exception [EclipseLink-2009] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.ConcurrencyException
Exception Description: Max number of attempts to lock object exceded.  Failed to build the object. Thread: Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads] has a lock on the object but thread: Thread[[ACTIVE] ExecuteThread: '66' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads] is building the object
        at org.eclipse.persistence.exceptions.ConcurrencyException.maxTriesLockOnBuildObjectExceded(ConcurrencyException.java:76)
...


No lock in base it's just a cache lock.

Is it a bug? or a concurrency problem which occured because of a bad behaviour in our application?

The problem only occurs when we have some load on the server (production only Mad)

Thx in advance

Robin Camus


Using Weblogic 10.3.4, EclipseLink 2.3.1.v20111018-r10243 (internal weaver disabled)
Re: ConcurrencyException [message #825202 is a reply to message #819964] Tue, 20 March 2012 15:44 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

It is possible it is a timeout, not a deadlock, but having a full stack dump would help. Perhaps open a bug with all of the details.

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

Why do you have weaving disabled? This will cause LAZY to not work, so this will require a lot of locking of related objects. Enabling LAZY, and weaving either dynamic or static would be a good place to start.


James : Wiki : Book : Blog : Twitter
Re: ConcurrencyException [message #825890 is a reply to message #819964] Wed, 21 March 2012 11:44 Go to previous message
Robin CAMUS is currently offline Robin CAMUS
Messages: 8
Registered: January 2012
Junior Member
We had to disable weaver in 2.1.2 because of bug 325916 (sorry can t post links Mad)
Bug 325916 - ClassCastException thrown when using FIELD access and entity fields of type long(primitive) have value null in the DB.

We forgot to reenable it...

I'll look at your link and ask our IT to have the full log.

Previous Topic:Dynamic JPA and AttributeOverrides
Next Topic:RESOLVED: retrieving some fields from an Entity
Goto Forum:
  


Current Time: Mon Sep 22 12:23:13 GMT 2014

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

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