Jetspeed 2
  1. Jetspeed 2
  2. JS2-931

ConcurrentModificationException Exception in SessionNavigationalState

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2, 2.1.3, 2.2-M1
    • Fix Version/s: 2.1.4, 2.2.0
    • Component/s: Container
    • Labels:
      None
    • Environment:
      Jetspeed 2.1.2

      Description

      This issue can only be reproduced if a user very rapidly interacts with the same portal page without waiting for the previous interaction to be completed.

      1. JS2-931.patch.txt
        0.9 kB
        Joachim Müller
      2. JS2-931-2.1.2-POSTRELEASE.patch.txt
        7 kB
        Joachim Müller
      3. JS2-931-2.1.3-POSTRELEASE.patch.txt
        7 kB
        Joachim Müller

        Activity

        Vivek Kumar created issue -
        Hide
        Joachim Müller added a comment -

        Do you have an exception trace, to quickly narrow the problem down?

        Show
        Joachim Müller added a comment - Do you have an exception trace, to quickly narrow the problem down?
        Hide
        Ate Douma added a comment -

        Yes, we encountered this on a Websphere 6.1.0.9 installation using the latest 2.1.2-postrelease branch with parallel rendering enabled.

        Stacktrace:

        java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:842)
        at java.util.HashMap$KeyIterator.next(HashMap.java:878)
        at org.apache.jetspeed.container.state.impl.PortletWindowSessionNavigationalStates.sync(PortletWindowSessionNavigationalStates.java:235)
        at org.apache.jetspeed.container.state.impl.SessionNavigationalState.sync(SessionNavigationalState.java:123)
        at org.apache.jetspeed.container.state.impl.SessionFullExtendedNavigationalState.sync(SessionFullExtendedNavigationalState.java:84)
        at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)

        Show
        Ate Douma added a comment - Yes, we encountered this on a Websphere 6.1.0.9 installation using the latest 2.1.2-postrelease branch with parallel rendering enabled. Stacktrace: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:842) at java.util.HashMap$KeyIterator.next(HashMap.java:878) at org.apache.jetspeed.container.state.impl.PortletWindowSessionNavigationalStates.sync(PortletWindowSessionNavigationalStates.java:235) at org.apache.jetspeed.container.state.impl.SessionNavigationalState.sync(SessionNavigationalState.java:123) at org.apache.jetspeed.container.state.impl.SessionFullExtendedNavigationalState.sync(SessionFullExtendedNavigationalState.java:84) at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)
        Hide
        Joachim Müller added a comment -

        The attached patches address the problem. For the trunk, a java.util.concurrent.ConcurrentHashMap is used, the older versions must use Collections.synchronizedMap(..) with synchronizing the iterations .

        Please review.

        Show
        Joachim Müller added a comment - The attached patches address the problem. For the trunk, a java.util.concurrent.ConcurrentHashMap is used, the older versions must use Collections.synchronizedMap(..) with synchronizing the iterations . Please review.
        Joachim Müller made changes -
        Field Original Value New Value
        Attachment JS2-931-2.1.2-POSTRELEASE.patch.txt [ 12401017 ]
        Attachment JS2-931.patch.txt [ 12401015 ]
        Attachment JS2-931-2.1.3-POSTRELEASE.patch.txt [ 12401016 ]
        Hide
        Vivek Kumar added a comment -

        Thanks Joachim
        For that patch, we will review and apply it.

        Show
        Vivek Kumar added a comment - Thanks Joachim For that patch, we will review and apply it.
        Hide
        Vivek Kumar added a comment -

        Patch applied

        Show
        Vivek Kumar added a comment - Patch applied
        Vivek Kumar made changes -
        Fix Version/s 2.1.4 [ 12313683 ]
        Fix Version/s 2.2 [ 12312318 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Joachim Müller added a comment -

        Thanks Vivek for applying the patch. I suggest to use a java.util.concurrent.ConcurrentHashMap for the trunk because the performance is suppose to be much better than the Collections.synchronizedMap solution. Can we use JAVA5 specifics for the trunk?

        Show
        Joachim Müller added a comment - Thanks Vivek for applying the patch. I suggest to use a java.util.concurrent.ConcurrentHashMap for the trunk because the performance is suppose to be much better than the Collections.synchronizedMap solution. Can we use JAVA5 specifics for the trunk?
        Hide
        David Sean Taylor added a comment -

        > Can we use JAVA5 specifics for the trunk?

        yes

        Show
        David Sean Taylor added a comment - > Can we use JAVA5 specifics for the trunk? yes
        Ate Douma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        12d 23h 55m 1 Vivek Kumar 05/Mar/09 15:46
        Resolved Resolved Closed Closed
        943d 5h 21m 1 Ate Douma 04/Oct/11 22:08

          People

          • Assignee:
            Vivek Kumar
            Reporter:
            Vivek Kumar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development