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

Initialization order fiasco between dataFileSync and cmdServerStatus

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 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.

      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@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: