History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UP-1124
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Faizan Ahmed
Reporter: Faizan Ahmed
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
uPortal

PortletStateManager.clearState(PortletWindow) implementation is buggy and can lead to ConcurrentModificationException under stress.

Created: 27/May/05 11:27 AM   Updated: 03/Jul/07 04:11 PM
Component/s: Portlet Container
Affects Version/s: 2.5.0 RC1, 2.5.0 RC3, 2.5.0 RC2, 2.5.0 GA
Fix Version/s: 2.6.0 M1, 2.5.1 RC1

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Duplicate
This issue duplicates:
UP-1123 PortletStateManager.clearState(Portle... Major Closed
 
Generic Relation
This issue relates to:
UP-1134 Track user state in such a way to all... Major Closed
 


 Description  « Hide
PortletStateManager.clearState(PortletWindow) implementation is buggy and can lead to ConcurrentModificationException under stress.

Under stress, you can
run into the following scenaro which produces this stack trace.

java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
      at java.util.HashMap$KeyIterator.next(HashMap.java:818)
      at org.jasig.portal.container.services.information.PortletStateManager.clearState(PortletStateManager.java:355)
      at
org.jasig.portal.channels.portlet.CPortletAdapter.receiveEvent(CPortletAdapt
er.java:345)
      at
org.jasig.portal.MultithreadedCharacterChannelAdapter.receiveEvent(Multithre
adedCharacterChannelAdapter.java:62)
      at
org.jasig.portal.ChannelManager.finishedSession(ChannelManager.java:269)

After examining the code, it looks like you'd get this exception when two
users end/begin the lifecycle of this channel at the same time (likely under
stress??), since they both have access to the same Map object at the same
time -- classic concurrency stuff. And once the remove operation throws
that exception, I believe the ChannelState object get left behind. It looks
like remove's and put's into the channelStateMap need to broken out into
synchronized methods.

 All   Comments   Work Log   Change History      Sort Order:
Faizan Ahmed [27/May/05 11:34 AM]
The current code in portal_rel-2-4-patches is quite different than the portal_rel-2-5-patches and in the head that is why I created this issue separatly.

Eric Dalquist [06/Jun/05 08:19 PM]
Fix for UP-1134 resolves this issue

Eric Dalquist [06/Jun/05 08:19 PM]
Fix for UP-1134 resolves this issue