Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Possible synchronization problem in org.aspectj.weaver.World$TypeMap


The quick fix is this:

old:  private Map expendableMap = new WeakHashMap();

new: private Map expendableMap = Collections.synchronizedMap(new WeakHashMap());

scott


On Feb 7, 2008, at 1:09 PM, Andy Clement wrote:

tell me the fix and I will look at putting it in.

Andy.

On 07/02/2008, Scott Bartram <scottb@xxxxxxxxxxxx> wrote:

I have a VM in a cluster that will sometimes stop taking work.  The
thread dump shows that one thread is holding a lock in Spring code and
blocking all the other threads.  The blocking thread appears to be
stuck in an infinite loop in java.util.WeakHashMap.

It appears that there is no synchronization of access to the
org.aspectj.weaver.World$TypeMap.expendableMap which can cause
corruption and the WeakHashMap.get() method to go into an infinite
loop - at least on the IBM 1.5 JVM.  We've seen and fixed this
behavior before in other code (eg. Sun's javax.el implementation).


State : Waiting on condition
Owns Monitor Lock on
java/util/concurrent/ConcurrentHashMap@58574E90/58574E9C
Java Stack
at java/util/WeakHashMap.get(WeakHashMap.java:362(Compiled Code))
at org/aspectj/weaver/World$TypeMap.get(World.java:967(Compiled Code))
at org/aspectj/weaver/World.resolve(World.java:250(Compiled Code))
at org/aspectj/weaver/World.resolve(World.java:191(Compiled Code))
at org/aspectj/weaver/World.resolve(World.java:338(Compiled Code))
at org/aspectj/weaver/internal/tools/
PointcutExpressionImpl
.couldMatchJoinPointsInType(PointcutExpressionImpl.java:76(Compiled
Code))
at org/springframework/aop/aspectj/
AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:
218(Compiled Code))
at org/springframework/aop/support/AopUtils.canApply(AopUtils.java:
189(Compiled Code))
at org/springframework/aop/support/AopUtils.canApply(AopUtils.java:
244(Compiled Code))
at org/springframework/aop/support/
AopUtils.findAdvisorsThatCanApply(AopUtils.java:278(Compiled Code))
at org/springframework/aop/framework/autoproxy/
AbstractAdvisorAutoProxyCreator
.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java: 83(Compiled
Code))


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top