Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5692

Inactivity monitor does not time out on stuck socket writes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 5.11.1
    • None
    • Broker

    Description

      It is possible that a socket write is stuck but the inactivity monitor currently does not time out on a socketWrite.

      AbstractInactivityMonitor.java
          final void writeCheck() {
              if (inSend.get()) {
                  LOG.trace("Send in progress. Skipping write check.");
                  return;
              }
      

      As a result a connection that is stuck in a tcp write will never be taken down due to inactivity. If a client misbehaves the broker will not be able to clear that connection as part of the inactivity monitoring.

      Now AMQ-2511 introduced a counter on the reachCheck() to detect it a socket read in progress really retrieves data or is stuck.
      I propose for a similar mechanism being applied on the writeCheck() operation so that a socket write that is stuck can be detected and the connection can be closed.

      Attachments

        1. AMQ-5692.pl
          3 kB
          Torsten Mielke

        Activity

          People

            Unassigned Unassigned
            tmielke Torsten Mielke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: