ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.13.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • Not Needed
    • Developer Tools

      Problem Statement/Rationale

      ThrottledAnalytics takes a lockfile at ~/.mongodb/mongosh/am-<deviceId>.json.lock for the duration of a session. If the lock cannot be acquired, restoreThrottleState() returns false, the track queue is disabled, and every telemetry event is dropped before any network call silently, TelemetryClient swallows all errors and the log still prints "Sending telemetry event".

      The lock's mtime is refreshed on interval. That refresh passes Date.now() to fs.utimes, which interprets plain numbers as seconds. The millisecond value overflows the filesystem's int64 nanosecond timestamp and becomes 2262-04-11, so if that process exits uncleanly, the lock is permanent and the machine never sends telemetry again.

      Present since 2023 (c6ca209d4), wasn't observable because the telemetry was disabled.

      Steps to Reproduce

      Run mongosh session >6h (overnight) and let it exit uncleanly.

      Expected Results

      mongosh send telemetry and it lands in AWS bucket.

      Actual Results

      mongosh 2.12.0 emitts 0 requests. After removing the lock, the same command emitts e.g. /v1/identify and /v1/session-ended, and both then appear in the production CloudFront logs.

            Assignee:
            Alena Khineika
            Reporter:
            Alena Khineika
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: