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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Diagnostics
    • None
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Unassigned
            Reporter:
            David Hows (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: