Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
SHAIK SHER ALI
5.1.1 PermissionChecker causes high cpu
October 4, 2012 1:23 PM
Answer

SHAIK SHER ALI

Rank: New Member

Posts: 1

Join Date: October 4, 2012

Recent Posts

We are seeing high cpus caused by PermissionChecker. When we took the thread dump we found multiple threads stuck at the below code.


java.lang.Thread.State: RUNNABLE
at java.util.HashMap.get(HashMap.java:303)
at com.liferay.portal.security.permission.ResourceActionsUtil._getActions(ResourceActionsUtil.java:395)
at com.liferay.portal.security.permission.ResourceActionsUtil._getPortletResourceGuestUnsupportedActions(ResourceActionsUtil.java:549)
at com.liferay.portal.security.permission.ResourceActionsUtil.getPortletResourceGuestUnsupportedActions(ResourceActionsUtil.java:240)
at com.liferay.portal.security.permission.AdvancedPermissionChecker.hasGuestPermission(AdvancedPermissionChecker.java:407)
at com.liferay.portal.security.permission.AdvancedPermissionChecker.hasPermissionImpl(AdvancedPermissionChecker.java:463)
at com.liferay.portal.security.permission.AdvancedPermissionChecker.hasPermission(AdvancedPermissionChecker.java:206)
at com.liferay.portal.security.permission.BasePermissionChecker.hasPermission(BasePermissionChecker.java:49)


With further analysis we found out that map ResourceActionsUtil._portletResourceGuestUnsupportedActions is not thread safe and its causing infinite loops in getter method. Is there any workaround for this.

This looks similar to the below issue
LPS-16142