Initialization order fiasco between dataFileSync and cmdServerStatus

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • ALL
    • Hide

      scons --sanitize=address --allocator=system --cc=/usr/bin/clang --cxx=/usr/bin/clang++ smokeJs

      The test will fail immediately because mongod doesn't start.

      Show
      scons --sanitize=address --allocator=system --cc=/usr/bin/clang --cxx=/usr/bin/clang++ smokeJs The test will fail immediately because mongod doesn't start.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In db.cpp the static object dataFileSync of class DataFileSync depends on the static object cmdServerStatus inserver_status.cpp having already been initialized. These static objects are in different translation units so there is no guarantee that cmdServerStatus has been constructed when dataFileSync's constructor runs.

              Assignee:
              Andrew Morrow (Inactive)
              Reporter:
              Andrew Morrow (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: