Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4246

SleepForMs() utility function has undefined behavior for > 1s

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Impala 2.6.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Backend
    • Labels:
      None

      Description

      Our SleepForMs() function relies on usleep() which sleeps for n microseconds. However, the manpage for usleep() specifies that this may not work for values > 1000000 us (or 1s).

      SYNOPSIS
      ...
             int usleep(useconds_t usec);
      ...
      
      ERRORS
      ...
             EINVAL usec is not smaller than 1000000.  (On systems where that is considered an error.)
      

      We also do not check the return value of usleep(). This means that sleeps can happen for undefined periods of time depending on the system.

      Found this issue after setting a high value for the "kerberos_reinit_interval" flag and noticed that there were very frequent kinit's happening.

        Attachments

          Activity

            People

            • Assignee:
              sailesh Sailesh Mukil
              Reporter:
              sailesh Sailesh Mukil
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: