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

TCP connections stuck after setting socket send and receive buffers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 6u13
    • core-libs
    • x86
    • solaris_2.5.1

      FULL PRODUCT VERSION :
      java version "1.6.0_13"
      Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
      Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)

      java version "1.6.0-dp"
      Java(TM) SE Runtime Environment (build 1.6.0-dp-b88-34)
      Java HotSpot(TM) Client VM (build 1.6.0-b88-17-release, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      SUSE : Linux eng02 2.6.16.60-0.34-smp #1 SMP Fri Jan 16 14:59:01 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux

      MAC : Darwin ManG.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386

      Also, the same problem is seen in windows, ubuntu on 1.6 and 1.5 versions

      A DESCRIPTION OF THE PROBLEM :
      we are using non-blocking sockets for our client-server app. we have a problem where all of a sudden the TCP connection between client and server is stuck and no more data transfer is happening between them. However, netstat output shows that the connection is still in Established state and for long time even after the problem. This problem is seen only when we apply socket params (send and receive buffers size) on the non blocking sockets.

      #netstat -an | grep 9510

      tcp 0 0 node13:48298 node05:9510 ESTABLISHED mgovinda 932120
      tcp 0 *90435 node13:47121 node07:9510 ESTABLISHED mgovinda 932122
      tcp 0 0 node13:51713 node08:9510 ESTABLISHED mgovinda 932123

      //problem was between node13 and node07

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Failure Case: (applying socket params)

      //start the server
      > java -Dnet.core.send.buffer=10240 -Dnet.core.recv.buffer=10240 niotest.NioServer 9898

      //start the client
      > java -Dnet.core.send.buffer=10240 -Dnet.core.recv.buffer=10240 niotest.NioClient localhost 9898 5000000


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Success Case: (not applying socket params)

      //start the server
      > java niotest.NioServer 9898

      //start the client
      > java niotest.NioClient localhost 9898 5000000

      //Server echoes back all the data sent by client.
      ACTUAL -
      Server doesn't echo back all the data sent by client. They get stuck in the middle.

      REPRODUCIBILITY :
      This bug can be reproduced always.


      ---------- BEGIN SOURCE ----------
      Attached seperatly
      ---------- END SOURCE ----------

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: