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

JDI: (doc) Documentaion on ListeningConnector methods not clear

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: core-svc
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic, x86
    • OS:
      generic, windows_nt
    • Verification:
      Not verified

      Description


      The api document for ListeningConnector does not state clearly whether startListening
      has to be called before accept. Only statement in favour of the fact that
      startListening has to be called is
      "The connected target is obtained through accept(java.util.Map)
      (using the same argument map as is passed to this method)."
      specified in startListening method documentation.

      Different scenarios were tried with and without startListening() method and
      the behaviour is different.


      1. In Windows for dt_shmem
          a) Without startListening(args), the accept(args) returns the VM.
         
      2. In Solaris for dt_socket
         a) -without calling startListening(args)
            -only accept(args) is called
            throws java.lang.IllegalArgumentException - Unknown listen address
         b) -calling startListening(args)
            -calling accept(args)
            -calling stopListening(args)
            -calling accept(args)
            throws java.lang.IllegalArgumentException - Unknown listen address
      3. In Windows for dt_socket
         a) -without calling startListening(args)
            -only accept(args) is called
            throws java.lang.IllegalArgumentException - Unknown listen address
         b) -calling startListening(args)
            -calling accept(args)
            -calling stopListening(args)
            -calling accept(args)
            throws java.net.BindException - Address in use: JVM_Bind.
             
          Though both dt_socket in WinNT and Solaris throw Exception we are not
          able to conclude the correct behaviour and point the error.
             
             
             
      ------------------------------------------------------------------------
      java.net.BindException: Address in use: JVM_Bind
              at java.net.PlainSocketImpl.socketBind(Native Method)
              at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:397)
              at java.net.ServerSocket.<init>(ServerSocket.java:170)
              at java.net.ServerSocket.<init>(ServerSocket.java:82)
              at com.sun.tools.jdi.SocketTransport.startListening(SocketTransport.java
      :93)
              at com.sun.tools.jdi.SocketTransport.startListening(SocketTransport.java
      :85)
              at com.sun.tools.jdi.SocketListeningConnector.accept(SocketListeningConn
      ector.java:59)
              at ListeningConnectorTest.testSupportMultipleConnections(ListeningConnec
      torTest.java:476)
              at ListeningConnectorTest.runTests(ListeningConnectorTest.java:47)
              at ListeningConnectorTest.main(ListeningConnectorTest.java:25)
      -------------------------------------------------------------------------
      Exception in thread "main" java.lang.IllegalArgumentException: Unknown listen
              address: 8009
              at com.sun.tools.jdi.SocketTransport.accept(SocketTransport.java:113)
              at com.sun.tools.jdi.SocketListeningConnector.accept(SocketListening
              Connector.java:60)
              at ConnectorTest1.testStopListen(ConnectorTest1.java:80)
              at ConnectorTest1.main(ConnectorTest1.java:23)
      -------------------------------------------------------------------------

      ***Detailed tabulation is provided in listen.html

      The target vms are all started using Runtime.getRuntime().exec(cmdString).
      Also the same scenario was tried without using Runtime.getRuntime().exec(cmdString).


      Testing done in JDK1.3.0-T build.(WinNT and Solaris)


      The bug can be reproduced using the files in the location
       /net/sqesvr/export/disk5/toolsbugs/4310274
        Follow the instructions in README to reproduce the bug.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ghirschsunw Gordon Hirsch (Inactive)
              Reporter:
              sshakilasunw Shahulhameedmohaideenhaleema Shakila (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: