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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Impala 2.6.0
    • Impala 2.8.0
    • Backend
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: