Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29336

Use vendored version of libfaketime when running Jepsen tests

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.4
    • Sprint:
      TIG 2017-05-29
    • Linked BF Score:
      0

      Description

      The user_faked_time variable in the fake_clock_gettime() function is declared static. This means that if multiple threads call user_faked_time() concurrently, then it is possible to overwrite different characters of the configurations and cause strange behavior. Using the libfaketimeMT.so.1 shared object would address this, but would come at a heavy price of serializing all calls to fake_clock_gettime() with a mutex. Given that we are running libfaketime with the cache disabled for our Jepsen tests, there's no benefit to these static variables anyway, so there's little point to paying such a heavy performance cost (and risk not being able to detect subtle races). Instead, we should apply a patch similar to the one below to convert all static variables related to caching to thread-specific static variables.

        Attachments

          Activity

            People

            Assignee:
            max.hirschhorn Max Hirschhorn
            Reporter:
            max.hirschhorn Max Hirschhorn
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: