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

Remove the use of gettimeofday in Networking code

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • None
    • core-libs
    • None
    • b08

      The Networking native code uses gettimeofday() in several places to manage timeouts. It may not the best solution because:

        a) any active time-adjusting process (ntpd etc) will cause hard-to-reproduce hangs. Virtual and clusters environment is especially vulnerable to this problem.

        b) despite some optimization gettimeofday() remains expensive call as it typically requires access to hardware clock

      An alternative is to manage timeout in socket code by using select(),
      acceptable solution is clock_gettime() / mach_absolute_time()

      This issue was raise during the review of JDK-8075484 :
         http://mail.openjdk.java.net/pipermail/net-dev/2016-September/010201.html

            vtewari Vyom Tewari
            vtewari Vyom Tewari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: