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

sun.net.www.http.HttpClient#available() does not check server socket closed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 6
    • core-libs
    • generic
    • windows

    Description

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

      ADDITIONAL OS VERSION INFORMATION :
      Windows 7 64-bit

      A DESCRIPTION OF THE PROBLEM :
      We are getting sporadic failures in SOAP requests. The underlying problem appears to be in the the new available method introduced in bug 8000410. It does not check if the serverSocket field is closed before calling getSoTimeout on it.

      I'm not totally sure if this is actually a bug or due to misuse of HttpClient (it's being called by Apache CXF).

      This never happened in 6.0.37.

      REGRESSION. Last worked in version 6u31


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.net.SocketException: Socket Closed
      at java.net.PlainSocketImpl.getOption(PlainSocketImpl.java:286) [rt.jar:1.6.0_38]
      at java.net.Socket.getSoTimeout(Socket.java:1032) [rt.jar:1.6.0_38]
      at sun.net.www.http.HttpClient.available(HttpClient.java:356) [rt.jar:1.6.0_38]
      at sun.net.www.http.HttpClient.New(HttpClient.java:273) [rt.jar:1.6.0_38]
      at sun.net.www.http.HttpClient.New(HttpClient.java:310) [rt.jar:1.6.0_38]
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:987) [rt.jar:1.6.0_38]
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923) [rt.jar:1.6.0_38]
      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841) [rt.jar:1.6.0_38]
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1031) [rt.jar:1.6.0_38]


      REPRODUCIBILITY :
      This bug can be reproduced occasionally.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: