Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-3875

Collisions in operation tracking map file when a connection is reopened within the same process.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.6.3, 3.7.2, WT3.1.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage 2018-01-29

      When we track operations each tracked function gets itself a static ID that persists throughout the life of the process. The last unused ID is tracked in the connection structure, in the optrack_uid variable. If a function does not yet have an ID, it will take optrack_uid, increment it by one – and use the resulting value as its ID. So the first function that happens to be tracked will get the ID of 1, the second one will get the ID of 2 and so on.

      The mapping between function names and IDs is recorded in the map file. The problem is that we can have collisions between IDs. Here is how it can happen:

      If we close the connection and then reopen it, optrack_uid gets set to zero. So the next function that needs an ID will get an ID of 1. If another function also had an ID of 1 before the connection was reopened, we will have two functions with the same ID, and we will have trouble interpreting the output of operation tracking logs.

      This scenario happens all the time in wtperf.

      We need a way to remember the last used optrack id across connection closures.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            sasha.fedorova@mongodb.com Sasha Fedorova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: