Bug 793377 (JBEPP-459)

Summary: NullPointerException in BreadcumbsPortlet during performance test
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: mposolda
Component: PerformanceAssignee: hfnukal <hfnukal>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0.0.GA, 5.0.1.GA, 5.1.0.GA, 5.1.0.ER04CC: epp-bugs
Target Milestone: ---   
Target Release: 5.1.1.DEV01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-459
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
EPP 5.0.1 CR1 snapshot (from 2010-09-10), RHEL 5, Sun JDK 6, MySQL 5.0.1 database, Performance test with 50 users,
Last Closed: 2011-03-22 10:40:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
perfAnonymousUser-epp501cr1-breadcumbsIssue.txt none

Description mposolda 2010-09-14 08:46:39 UTC
project_key: JBEPP

During run of performance test for anonymous user with 50 concurrent clients, I noticed this exception in server log:

2010-09-11 02:59:02,375 ERROR [org.exoplatform.webui.application.portlet.PortletApplicationController] (ajp-perf11%2F10.16.88.189-8009-31) Error while rendering the porlet
java.lang.NullPointerException
	at org.exoplatform.portal.webui.component.UIBreadcumbsPortlet.loadSelectedPath(UIBreadcumbsPortlet.java:69)
	at org.exoplatform.portal.webui.component.UIBreadcumbsPortlet.renderChildren(UIBreadcumbsPortlet.java:89)
	at org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle.processRender(UIApplicationLifecycle.java:72)
	at org.exoplatform.webui.core.UIComponent.processRender(UIComponent.java:148)
	at org.exoplatform.webui.core.UIPortletApplication.processRender(UIPortletApplication.java:103)
	at org.exoplatform.webui.application.portlet.PortletApplication.render(PortletApplication.java:254)
	at org.exoplatform.webui.application.portlet.PortletApplicationController.render(PortletApplicationController.java:110)
	at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:569)
	at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
        ...................

I am attaching part of server log from beginning of test. It can be seen in log that exception occurs periodically during run of performance test and it occurs usually in same worker threads (ajp-perf11%2F10.16.88.189-8009-31, ajp-perf11%2F10.16.88.189-8009-4, ajp-perf11%2F10.16.88.189-8009-33, ajp-perf11%2F10.16.88.189-8009-27).

I tried more builds but I am not able to simulate it reliably. Some performance builds did not show this exception. I saw it only 2 times during some builds. In this build, it can be seen from log that 4 Tomcat worker threads are failing, different time I noticed that only 1 worker thread. So looks like concurrency problem...

Let me know if I should investigate more and provide more info about this issue.

Comment 1 mposolda 2010-09-14 08:47:19 UTC
Attachment: Added: perfAnonymousUser-epp501cr1-breadcumbsIssue.txt


Comment 2 mposolda 2010-10-06 12:06:27 UTC
I did more investigation and details are in related issue GTNPORTAL-1541

Comment 3 mposolda 2010-10-06 12:06:27 UTC
Link: Added: This issue depends GTNPORTAL-1541


Comment 4 mposolda 2010-10-06 12:07:04 UTC
Link: Removed: This issue depends GTNPORTAL-1541 


Comment 5 mposolda 2010-10-06 12:07:25 UTC
Link: Added: This issue is related to GTNPORTAL-1541


Comment 6 mposolda 2010-11-11 20:59:48 UTC
Is this planned to be added to EPP for EPP 5.1 ER4 ? I am seeing that related issue GTNPORTAL-1541 is already fixed in GateIn trunk but it's not ported in http://anonsvn.jboss.org/repos/gatein/epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/config/Component.java

It can be good to cover it in EPP to avoid exceptions caused by thread-unsafe code during perf. test.

Comment 7 Prabhat Jha 2010-11-11 21:26:49 UTC
I hope it's not too late for ER4. I have left the fix version unselected.

Comment 8 Thomas Heute 2010-11-12 08:11:54 UTC
Release Notes Docs Status: Added: Documented as Resolved Issue
Release Notes Text: Added: Thread safety issue leading to "Error while rendering the porlet
java.lang.NullPointerException at org.exoplatform.portal.webui.component.UIBreadcumbsPortlet.loadSelectedPath(UIBreadcumbsPortlet.java:69)" under load.



Comment 11 mposolda 2010-11-16 11:59:43 UTC
I am reopening it because sometimes it still happens for me. I added more info to related GTNPORTAL issue.

Comment 12 mposolda 2010-11-16 17:40:03 UTC
Link: Added: This issue is related to JBQA-3980


Comment 14 Scott Mumford 2011-04-28 04:34:08 UTC
Release Notes Docs Status: Removed: Documented as Resolved Issue Added: Needs More Info
Release Notes Text: Removed: Thread safety issue leading to "Error while rendering the porlet
java.lang.NullPointerException at org.exoplatform.portal.webui.component.UIBreadcumbsPortlet.loadSelectedPath(UIBreadcumbsPortlet.java:69)" under load.
 Added: Original Text:
Thread safety issue leading to "Error while rendering the porlet
java.lang.NullPointerException at org.exoplatform.portal.webui.component.UIBreadcumbsPortlet.loadSelectedPath(UIBreadcumbsPortlet.java:69)" under load.

CCFR:
Cause: A bug in the double-check locking code.
Consequence: A NullPointerException thrown from Breadcrumbs portlet under load.
Fix: Volatile specifier added to eventMap field to prevent reordering.
Result: NPE is no longer thrown.

Proposed text:
A bug in double-check locking code caused a NullPointerException to be thrown from the Breadcrumbs portlet when under load. A 'volatile' java specifier was added to the eventMap to prevent reordering, which resolved the issue. The portlet no longer throws the NPE.


Comment 15 Scott Mumford 2011-05-03 04:09:58 UTC
Release Notes Docs Status: Removed: Needs More Info Added: Documented as Resolved Issue
Release Notes Text: Removed: Original Text:
Thread safety issue leading to "Error while rendering the porlet
java.lang.NullPointerException at org.exoplatform.portal.webui.component.UIBreadcumbsPortlet.loadSelectedPath(UIBreadcumbsPortlet.java:69)" under load.

CCFR:
Cause: A bug in the double-check locking code.
Consequence: A NullPointerException thrown from Breadcrumbs portlet under load.
Fix: Volatile specifier added to eventMap field to prevent reordering.
Result: NPE is no longer thrown.

Proposed text:
A bug in double-check locking code caused a NullPointerException to be thrown from the Breadcrumbs portlet when under load. A 'volatile' java specifier was added to the eventMap to prevent reordering, which resolved the issue. The portlet no longer throws the NPE. Added: A thread safety issue in the breadcrumb portlet could lead to NullPointerException under load.The issue has been fixed. 


Comment 16 Scott Mumford 2011-08-22 04:37:44 UTC
Release Notes Text: Removed: A thread safety issue in the breadcrumb portlet could lead to NullPointerException under load.The issue has been fixed.  Added: A thread safety issue in the breadcrumb portlet could lead to NullPointerException under load. The issue has been fixed in this release.