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

State information can be leaked if server closes too quickly on network_interface_tl

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.6, 4.0.19
    • Affects Version/s: 4.2.4, 4.0.17
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.0
    • Service Arch 2020-04-06, Service arch 2020-04-20
    • 74

      The network_interface_tl binds its command states into async lambdas for connection establishment, timeout, and command response resolution. However, the timer lambda here can cause a leak if the command state is canceled. Since the timer is a member of the command state itself, we need to cancel the timer to break the lifetime dependency cycle. We do it here, too late in program flow to observe cancelation. We should cancel the timer earlier in the command response resolution. This issue exists for v4.0 and v4.2. It is fixed for v4.4 by a reorganization (see here).

            Assignee:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: