Remove the use of gettimeofday in Networking code

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 10
    • Affects Version/s: None
    • Component/s: 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

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

              Created:
              Updated:
              Resolved: