cancel
Showing results for 
Search instead for 
Did you mean: 

Threads in waiting state due to not able able to acquire lock and thus causing System slowdown

Former Member
0 Kudos

Hi, We are having Hybris 4.2.2.23 with anonymous login in site. last few days we are facing issue of performance in site and on analysing dump it seems Threads are acquiring lock over resources and then end waiting for a common resource. Following is snippet from threaddump. "TP-Processor111" daemon prio=10 tid=0x00002ab449214800 nid=0x5ab waiting on condition [0x00002ab458286000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:842) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1178) at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:807) at de.hybris.platform.util.collections.YFastMap.lockForWriting(YFastMap.java:246) at de.hybris.platform.util.collections.YFastMap.remove(YFastMap.java:189) at de.hybris.platform.cache.CacheBase.removeFromCacheMap(CacheBase.java:180) at de.hybris.platform.cache.CacheBase.removeUnit(CacheBase.java:264) at de.hybris.platform.cache.CacheBase.invalidateRecursively(CacheBase.java:491) at de.hybris.platform.cache.CacheBase.invalidate(CacheBase.java:331) at de.hybris.platform.cache.Cache.invalidate(Cache.java:389) at de.hybris.platform.persistence.framework.PersistencePool$1.keyInvalidated(PersistencePool.java:114) at de.hybris.platform.cache.InvalidationTopic.invalidateLocally(InvalidationTopic.java:147) at de.hybris.platform.cache.InvalidationTopic.invalidateLocally(InvalidationTopic.java:152) at de.hybris.platform.cache.InvalidationTopic.invalidateLocally(InvalidationTopic.java:158) at de.hybris.platform.tx.Transaction.executeInvalidations(Transaction.java:936) at de.hybris.platform.tx.Transaction.invalidate(Transaction.java:908) at de.hybris.platform.tx.Transaction.invalidate(Transaction.java:885) at de.hybris.platform.cache.AbstractCacheUnit.invalidate(AbstractCacheUnit.java:220) at de.hybris.platform.persistence.order.CartEntry_HJMPWrapper$CartEntryEntityState.storeChanges(CartEntry_HJMPWrapper.java:2619) at de.hybris.platform.persistence.order.CartEntry_HJMPWrapper.ejbStore(CartEntry_HJMPWrapper.java:240) at de.hybris.platform.persistence.framework.RemoteInvocationHandler.performOther(RemoteInvocationHandler.java:193) - locked (a de.hybris.platform.persistence.framework.PKSyncUtils$PKSyncObject) at de.hybris.platform.persistence.framework.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:105) at $Proxy100.removeAllTaxValues(Unknown Source) at de.hybris.platform.persistence.order.AbstractOrderEntryEJBImpl.removeAllTaxValues(AbstractOrderEntryEJBImpl.java:183) at de.hybris.platform.jalo.order.AbstractOrderEntry.removeAllTaxValues(AbstractOrderEntry.java:767) - locked (a de.hybris.platform.jalo.order.Cart) at de.hybris.platform.jalo.order.AbstractOrderEntry.removeAllTaxValues(AbstractOrderEntry.java:754) at de.hybris.platform.jalo.order.AbstractOrderEntry.setTaxValues(AbstractOrderEntry.java:672) at de.hybris.platform.jalo.order.AbstractOrderEntry.calculateTotals(AbstractOrderEntry.java:1301) at de.hybris.platform.jalo.order.AbstractOrderEntry.recalculate(AbstractOrderEntry.java:1143) at de.hybris.platform.jalo.order.AbstractOrder.recalculateEntries(AbstractOrder.java:2446) - locked (a de.hybris.platform.jalo.order.Cart) at de.hybris.platform.jalo.order.AbstractOrder.recalculate(AbstractOrder.java:2970) - locked (a de.hybris.platform.jalo.order.Cart)

Former Member
0 Kudos

We are having the same problem in an hybris 5.04 environment, where many Threads are blocked while writing/reading the Cache. Resulting in an unresponsive Shop with suprisingly low CPU-Load, due to all Thread-Activity being in sleeping states.

Maybe there's a high-concurrency-problem where too many Cache-Accesses result in deadlocking-situtations?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

What we figured out is that this is Java problem which is yet to be resolved in version 7 also. http://bugs.java.com/view_bug.do?bug_id=6822370 And it become much more prominent in case of lesser number of JVM with higher number threads cnfigured on each than vice versa. Have not implemented any fix for this and rectified our problem by introducing one more application server in the mix.

prahlad_singh_rajput
Participant
0 Kudos

Hi Sidhartha,

I are facing the same issue, Kindly share me step's that can fix this issue ?

Thanks, Prahlad

Former Member
0 Kudos

Hi Prahlad,

As mentioned above in my comment we are not able to identify root cause of problem and have to proceed with capacity addition which eventually solved the problem. However this should be not considered as solution as our application was on Hybris 4.2.2 and over the time has accrued significant technical debt. Also please share your Hybris version and your analysis till date of your issue?