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

Remove the use of gettimeofday in Networking code

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b08

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: