Commons JCS
  1. Commons JCS
  2. JCS-91

JCS fails to properly dispose of the lateral TCP listener thread. If a webapp that uses JCS lateral TCP cache is undeployed, the listener is left hanging with no hope for exit.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: jcs-1.3
    • Fix Version/s: jcs-2.0-beta-1
    • Component/s: TCP Lateral Cache
    • Labels:
      None

      Description

      The problem seems to stem from two things: improper handling of accept() such that it doesn't block indefinitely (and thus can't be interrupted and broken out of), and failure by the nowait facade to pass on dispose() events to the local TCP listener.

      I'll attach a patch to fix the former, although I feel that if 1.4 will use nio instead of regular IO, this will be moot. However, the latter (failure of the nowait facade to pass on disposal events) will probably still be an issue.

        Activity

        Diego Rivera created issue -
        Hide
        Diego Rivera added a comment -

        This patch addresses the improper accept() handling which prevents the TCP listener thread from exiting gracefully.

        However, the nowait facade still needs to be fixed to communicate the dispose() invocation downstream to the listener(s).

        Show
        Diego Rivera added a comment - This patch addresses the improper accept() handling which prevents the TCP listener thread from exiting gracefully. However, the nowait facade still needs to be fixed to communicate the dispose() invocation downstream to the listener(s).
        Diego Rivera made changes -
        Field Original Value New Value
        Attachment jcs-91-fix.patch [ 12512331 ]
        Hide
        Diego Rivera added a comment -

        This patch supersedes the previously-attached patch, in that it includes the functionality to notify the listener that it should exit gracefully. This helps with thread cleanup and other tasks.

        Show
        Diego Rivera added a comment - This patch supersedes the previously-attached patch, in that it includes the functionality to notify the listener that it should exit gracefully. This helps with thread cleanup and other tasks.
        Diego Rivera made changes -
        Attachment jcs-91-full-fix.patch [ 12514801 ]
        Diego Rivera made changes -
        Attachment jcs-91-fix.patch [ 12512331 ]
        Thomas Vandahl made changes -
        Assignee Thomas Vandahl [ tv ]
        Hide
        Thomas Vandahl added a comment -

        Could you please revise your patch against the branch at http://svn.apache.org/repos/asf/commons/proper/jcs/branches/generics-interface? I was not able to apply it (too many conflicts).

        Show
        Thomas Vandahl added a comment - Could you please revise your patch against the branch at http://svn.apache.org/repos/asf/commons/proper/jcs/branches/generics-interface? I was not able to apply it (too many conflicts).
        Hide
        Thomas Vandahl added a comment -

        Applied heavily modified patch manually.

        Show
        Thomas Vandahl added a comment - Applied heavily modified patch manually.
        Thomas Vandahl made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s jcs-2.0.0 [ 12312535 ]
        Resolution Fixed [ 1 ]
        Hide
        Thomas Vandahl added a comment -

        Close after release

        Show
        Thomas Vandahl added a comment - Close after release
        Thomas Vandahl made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        287d 22h 22m 1 Thomas Vandahl 11/Nov/12 15:42
        Resolved Resolved Closed Closed
        870d 23h 8m 1 Thomas Vandahl 01/Apr/15 15:51

          People

          • Assignee:
            Thomas Vandahl
            Reporter:
            Diego Rivera
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4h
              4h
              Remaining:
              Remaining Estimate - 4h
              4h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development