Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903686

jtreg Agent should use loopback address

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • jtreg7.4
    • None
    • tools
    • None

    Description

      jtreg for its "agentvm" mode, creates a java.net.ServerSocket which currently binds to "any address" and a ephemeral port. It then launches a java process with "com.sun.javatest.regtest.agent.AgentServer" as the main class and passes it the port number on which the ServerSocket is bound to. AgentServer is then expected to communicate back to the jtreg process on that port using a java.net.Socket.

      The ServerSocket is (rightly) configured to accept() only one connection, which is from the AgentServer.

      Given that the ServerSocket is bound to "any address", any other host on the network can end up doing a socket connect against this ServerSocket. We have seen such intermittent interference from other hosts in our CI environment, where some unexpected connection has been established against this ServerSocket and thus the actual communication between the jtreg process and the AgentServer never happens, thus leading to test failures.

      Binding to loopback address will reduce the chances of such interference.

      Attachments

        Issue Links

          Activity

            People

              jpai Jaikiran Pai
              jpai Jaikiran Pai
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: