Pluto
  1. Pluto
  2. PLUTO-569

Threading issue in DefaulltPortletInvoker

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.2, 2.1.0
    • Component/s: portal driver
    • Labels:
      None

      Description

      A portlet application with multiple portlets registered to listen for the same event often falls over with NPE exceptions in PortletServlet.dispatch() (line 308), caused by the PortletRequest not being set in the ServletRequest.

      On investigation, the issue appears to be that the DefaultPortletInvoker is sharing the containerRequest object across event-firing threads, and the invoking block is not synchronised. That is, event thread 1 adds the PortletRequest to the ServletRequest, does it's work, and then removes the PortletRequest. Meanwhile, event thread 2 is in the middle of doing it's work, but thread 1 has just removed the PortletRequest attribute.

      Zip file with portlets and test case demonstrating the issue (it occurs on about 40-50% of requests on an Intel Xeon 2.4Ghz, 2Gb RAM on Win XP) will be attached, along with patch to simply synchronize the relevant block on the ServletRequest object in DefaultPortletInvokerService.invoke().

      1. patch.txt
        6 kB
        Mark Piper
      2. PlutoIssueTestCase.zip
        5 kB
        Mark Piper

        Activity

        Mark Piper created issue -
        Mark Piper made changes -
        Field Original Value New Value
        Attachment PlutoIssueTestCase.zip [ 12410792 ]
        Attachment patch.txt [ 12410793 ]
        Ate Douma made changes -
        Assignee Ate Douma [ adouma ]
        Ate Douma made changes -
        Fix Version/s 2.0.2 [ 12314872 ]
        Ate Douma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.1.0 [ 12315040 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12465987 ] Default workflow, editable Closed status [ 12565153 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12565153 ] jira [ 12585860 ]

          People

          • Assignee:
            Ate Douma
            Reporter:
            Mark Piper
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development