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

Use vendored version of libfaketime when running Jepsen tests

    • Fully Compatible
    • v3.4
    • TIG 2017-05-29
    • 0

      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.

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

              Created:
              Updated:
              Resolved: