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

Avoid accessing uninitialized resources during `mongos` shutdown

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.28
    • Component/s: Internal Code
    • Labels:
      None
    • ALL
    • Hide

      Reproducing the issue is quite easy: start a mongos using an already in-use listening port. The issue is reliably reproducible using v4.0.28.

      Show
      Reproducing the issue is quite easy: start a mongos using an already in-use listening port. The issue is reliably reproducible using v4.0.28.
    • Service Arch 2022-07-11

      The shutdown task for mongos doesn't consider exceptions that may occur before the initialization of global objects (and decorations). For example, LogicalSessionCache is accessed from here on v4.0.28, while it is initialized from here and any error that may occur before this point will cause a segmentation fault during shutdown.

      This ticket should identify any resource that is accessed by the shutdown task but may not be ready/initialized during shutdown. The shutdown task must ensure each resource is valid before accessing it.

      AC: Investigate if this behavior exists on 4.2/4.4/5.0/6.0, if it does re-triage, if not, close.

            Assignee:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Reporter:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: