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

mongod fails to start on Windows DEBUG (Unoptimized) due to bad static initialization order

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.3.14
    • Fix Version/s: 3.3.14
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Linked BF Score:
      0

      Description

      On Windows DEBUG (Unoptimized) it seems that the k32IncompatibleIndexSpec value is constructed before the k32IncompatibleIndexName variable, which it is using has been initialized, which results in an invalid BSON.

      This later on leads to the following exception at startup:

      2016-09-22T13:59:31.994-0400 I -        [initandlisten] Assertion: 13111:field not found, expected type 2 E:\workspace\mongo\src\mongo/bson/bsonelement.h 667
      2016-09-22T13:59:32.537-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\util\stacktrace_windows.cpp(174)                    mongo::printStackTrace+0x5b
      2016-09-22T13:59:32.537-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\util\log.cpp(164)                                   mongo::logContext+0xe2
      2016-09-22T13:59:32.544-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\util\assert_util.cpp(239)                           mongo::msgassertedWithLocation+0x183
      2016-09-22T13:59:32.544-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\util\assert_util.cpp(229)                           mongo::msgassertedWithLocation+0x4b
      2016-09-22T13:59:32.544-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\bson\bsonelement.h(667)                             mongo::BSONElement::chk+0x172
      2016-09-22T13:59:32.545-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\bson\bsonelement.h(96)                              mongo::BSONElement::String+0x3a
      2016-09-22T13:59:32.545-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\index_builder.cpp(126)                           mongo::IndexBuilder::_build+0xd7
      2016-09-22T13:59:32.545-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\index_builder.cpp(110)                           mongo::IndexBuilder::buildInForeground+0x5c
      2016-09-22T13:59:32.545-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\commands\feature_compatibility_version.cpp(274)  mongo::FeatureCompatibilityVersion::setIfCleanStartup+0x2ff
      2016-09-22T13:59:32.545-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\db.cpp(800)                                      mongo::`anonymous namespace'::_initAndListen+0x1df1
      2016-09-22T13:59:32.545-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\db.cpp(828)                                      mongo::`anonymous namespace'::initAndListen+0x4c
      2016-09-22T13:59:32.545-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\db.cpp(1180)                                     mongoDbMain+0x274
      2016-09-22T13:59:32.546-0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\db.cpp(868)                                      wmain+0x78
      2016-09-22T13:59:32.546-0400 I CONTROL  [initandlisten] mongod.exe    f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(80)        invoke_main+0x34
      2016-09-22T13:59:32.546-0400 I CONTROL  [initandlisten] mongod.exe    f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(253)       __scrt_common_main_seh+0x127
      2016-09-22T13:59:32.546-0400 I CONTROL  [initandlisten] mongod.exe    f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(296)       __scrt_common_main+0xe
      2016-09-22T13:59:32.546-0400 I CONTROL  [initandlisten] mongod.exe    f:\dd\vctools\crt\vcstartup\src\startup\exe_wmain.cpp(17)         wmainCRTStartup+0x9
      

      This was introduced in this commit: https://github.com/mongodb/mongo/commit/96a21e63bfc1a1cdde01c671d0867310c594ea5a

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: