ICEfaces
  1. ICEfaces
  2. ICE-4688

Add a timeout to the semaphore acquire invocation and log an error message after the timeout has been reached.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces Core, ICEfaces Push Server

      Description

      Currently, when using the semaphore logic, trying to acquire the semaphore is done without specifying a timeout. In case of a thread leak the Servlet Container supplied thread will block indefinitely. Introducing a timeout on the acquire call provides a failsafe mechanism. On timeout a warning message should be logged stating that a request has been pending for the specified timeout, including details on the request. Though this avoids a particular thread leak in this area, the underlying problem causing this to happen still needs to be addressed in the future.

      Basically, in the ThreadBlockingAdaptingServlet the Semaphore.acquire() method is invoked which blocks the container thread. This semaphore should be released in a timely fashion. However, in case it does not get released, it should not get stuck in the acquire() invocation for the remainder of the JVM lifespan. We should introduce a timeout and an error message to inform of the situation.

        Activity

        Hide
        Jack Van Ooststroom added a comment -

        Changed Fix Version(s) to 1.8.2

        Show
        Jack Van Ooststroom added a comment - Changed Fix Version(s) to 1.8.2
        Hide
        Jack Van Ooststroom added a comment -

        The ThreadBlockingAdaptingServlet is now using a timeout of 10 minutes on the acquire() invocation. If the acquire failed after 10 minutes an error messages is logged with details on the pending request. Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - The ThreadBlockingAdaptingServlet is now using a timeout of 10 minutes on the acquire() invocation. If the acquire failed after 10 minutes an error messages is logged with details on the pending request. Marking this one as FIXED.

          People

          • Assignee:
            Jack Van Ooststroom
            Reporter:
            Jack Van Ooststroom
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: