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

Small clock skew with NTP can give strange locked values on queries

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Diagnostics
    • None
    • ALL

    Description

      Tue Feb  5 04:24:26 [conn12345] command XXXXX.$cmd command: { findandmodify: "XXXXX", query: { _id: 123456 }, sort: { _id: 1 }, new: 1, remove: 0, upsert: 0, update: { $pull: { XXXXX: "GUID" } } } ntoreturn:1 keyUpdates:0 locks(micros) w:18446743918042 reslen:336 1271310163ms

      The write lock value on that query appears to be 7 months.

      Checking their NTPD logs showed that ntpd was winding back 140 milliseconds (by default its max ntp will do is 200ms)

      This looks like it could cause problems in our query execution - as it becomes possible for a query to appear to have started after it ended.

      Checking the Timer (util/timer.h) class shows that if we have a clock windback around when we call now() we could potentially generate a negative number. The values we use to capture these numbers are unsigned long long's which would cause problems in the event of a negative number.

      Attachments

        Activity

          People

            Unassigned Unassigned
            david.hows David Hows
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: