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

socket write error on client with HalfWriteIgnored test and Win* server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.3.0
    • 1.3.0
    • core-libs
    • kestrel
    • generic
    • windows_95, windows_2000
    • Verified


        daniel.daugherty@Eng 1999-12-02

        The java.net test suite was run on Win2000 in a standalone
        client-server configuration using Kestrel FCS-P. One test threw an
        unexpected exception:

        ERROR: Cannot write single byte(s) to server.
        ERROR: Connection reset by peer: socket write error
        FINALSTATUS:HalfWriteIgnored:EXIT_ERROR:2:Number of ERRORS:1:TEST INCOMPLETE

        It appears that the server closed the socket before the client was done
        writing data. In this test application, the server thread is supposed
        to stick around until the client thread finishes writing and goes away.

        While reading the test application, I noticed that there may be an
        application level protocol problem:

        server client
        ---------------------------- ----------------------------
                                      |T|
        read line |I| write line as single array
        shutdown InputStream |M| write line as single bytes
        while client is still there |E| write line as single array(1)
            write NUL byte to client | | write line as single array(2)
                                      \ /
         
        Consider a very fast client and a slow server: the client could write
        all the data before the server has finished reading (and verifying the
        first line). I don't think that this explains the "socket write error"
        exception, but this problem needs to be solved before dealing with a
        potential product bug.

        daniel.daugherty@Eng 1999-12-10

        This bug was also observed with a Win95 client and a WinNT server
        during Kestrel FCS-P testing. I have updated the synopsis.

              dcubed Daniel Daugherty
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: