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: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: jcs-1.3
    • Fix Version/s: jcs-2.0.0
    • 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

        Hide
        Thomas Vandahl added a comment -

        Applied heavily modified patch manually.

        Show
        Thomas Vandahl added a comment - Applied heavily modified patch manually.
        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
        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.
        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).

          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