Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4093899

Get unexpected socket exceptions from tcpClient test application with JDK1.2T.

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta3
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Not verified

      Description

      I get the following socket exceptions from tcpClient test applications
      when running them on a SOLARIS 2.6 System and communicating with a tcpServer
      test application running on a WINDOWS 95 System. This problem is highly
      reproducible.

      java.net.SocketException: Operation already in progress
      java.net.SocketException: Transport endpoint is already connected

      I get a [java.net.SocketException: Operation already in progress] or a
      [java.net.SocketException: Transport endpoint is already connected]
      exception from [java.net.PlainSocketImpl.socketConnect(Native Method)]
      when I repeatedly run tcpClient test applications on a SOLARIS 2.6 System
      communicating with a tcpServer test application running on a WINDOWS 95
      system. The tcpClient test applications die with the socket exception.

      When running the same tcpClient test applications in reverse on a
      WINDOWS 95 System and communicating with a tcpServer test application
      running on a SOLARIS 2.6 System I don't see the problem.

      When running both the tcpClient test application and the tcpServer
      test application on a SOLARIS 2.6 System I don't see the problem.

      When running both the tcpClient test application and the tcpServer
      test application on a WINDOWS 95 System I don't see the problem.

      Here is a summary of the configurations and what PASSES and FAILS. The
      only configuration that fails is tcpClients running on SOLARIS 2.6 and
      communicating with the tcpServer running on WINDOWS 95.

      SOLARIS 2.6 SOLARIS 2.6
      tcpClient1, tcpClient2 --------> tcpServer PASSES

      WINDOWS 95 WINDOWS 95
      tcpClient1, tcpClient2 --------> tcpServer PASSES

      SOLARIS 2.6 WINDOWS 95
      tcpClient1, tcpClient2 --------> tcpServer FAILS

      WINDOWS 95 SOLARIS 2.6
      tcpClient1, tcpClient2 --------> tcpServer PASSES

      The tcpClient test application repeatedly does the following:

      for i = 1 to loopcount
      do
      open a socket connection to the tcpServer on port 30000
      for j = 1 to messagecount
      do
      write a message to the tcpServer
      read message back from the tcpServer
      verify that the message read back matches the message
      that was wriitem
      done
      close the socket connection to the tcpServer
      done

      The following invocations will reproduce this problem:

      ----------------------------
      On WINDOWS 95 System (aefpc)
      ----------------------------
      aefpc> java tcpServer -d -v -l 0

      ----------------------------
      On SOLARIS 2.6 System (lobo)
      ----------------------------
      lobo> java tcpClient -v -b 64 -l 1000 -s aefpc -c -m 10 -p 30000
      lobo> java tcpClient -v -b 16 -l 1000 -s aefpc -c -m 10 -p 30000
      ... ... ...
      ... ... ...
      ... ... ...
      VERBOSE: completed session loop #219
      VERBOSE: connect to server aefpc at port 30000
      VERBOSE: completed session loop #220
      VERBOSE: connect to server aefpc at port 30000
      VERBOSE: completed session loop #221
      VERBOSE: connect to server aefpc at port 30000
      ERROR: tcpClient.tcpClient(): exception occurred:
      java.net.SocketException: Operation already in progress
      java.net.SocketException: Operation already in progress
              at java.net.PlainSocketImpl.socketConnect(Native Method)
              at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:297)
              at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:131)
              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:118)
              at java.net.Socket.<init>(Socket.java:223)
              at java.net.Socket.<init>(Socket.java:91)
              at tcpClient.<init>(tcpClient.java:104)
              at tcpClient.main(tcpClient.java:83)


      lobo> java tcpClient -v -b 64 -l 1000 -s aefpc -c -m 10 -p 30000
      lobo> java tcpClient -v -b 16 -l 1000 -s aefpc -c -m 10 -p 30000
      ... ... ...
      ... ... ...
      ... ... ...
      VERBOSE: completed session loop #106
      VERBOSE: connect to server aefpc at port 30000
      VERBOSE: completed session loop #107
      VERBOSE: connect to server aefpc at port 30000
      ERROR: tcpClient.tcpClient(): exception occurred:
      java.net.SocketException: Transport endpoint is already connected
      java.net.SocketException: Transport endpoint is already connected
              at java.net.PlainSocketImpl.socketConnect(Native Method)
              at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:297)
              at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:131)
              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:118)
              at java.net.Socket.<init>(Socket.java:223)
              at java.net.Socket.<init>(Socket.java:91)
              at tcpClient.<init>(tcpClient.java:104)
              at tcpClient.main(tcpClient.java:83)

      I added the TCP Client/Server Test Application as part of the attachments. Benjamin use this version because I made some changes and modifications.

      This is an update to this bug. I saw the same socket exception from SOLARIS 2.6 to SOLARIS 2.6 when running a TCP stress scenario. It is not easy to reproduce however like under WINDOWS 95.

        Attachments

          Activity

            People

            • Assignee:
              brenaudsunw Benjamin Renaud (Inactive)
              Reporter:
              aefreche Alan Frechette (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: