[SERVER-37282] options_parser_test failed EmptySingleNam std::exception: std::bad_alloc in test EmptySingleName Created: 24/Sep/18  Updated: 27/Oct/23  Resolved: 17/Apr/19

Status: Closed
Project: Core Server
Component/s: Build, Testing Infrastructure
Affects Version/s: 3.6.8
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Dimitri John Ledkov Assignee: Unassigned
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

```

./build/opt/mongo/util/options_parser/options_parser_test

```

Sprint: Dev Tools 2018-10-08, Dev Tools 2018-10-22, Dev Tools 2018-11-05, Dev Tools 2019-04-08, Dev Tools 2019-04-22
Participants:

 Description   

Compiling mongodb 3.6.8 on Ubuntu 18.10 (Cosmic) fails at options_parser_test.cpp at EmptySingleName test case, like so:

 
[executor:cpp_unit_test:job0] 2018-09-24T12:24:10.508+0000 Running options_parser_test... build/opt/mongo/util/options_parser/options_parser_test [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.508+0000 Starting Program build/opt/mongo/util/options_parser/options_parser_test... build/opt/mongo/util/options_parser/options_parser_test [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.511+0000 Program build/opt/mongo/util/options_parser/options_parser_test started with pid 2985. [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.515+0000 2018-09-24T12:24:10.515+0000 I - [main] going to run suite: ChainingInterface [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.516+0000 2018-09-24T12:24:10.515+0000 I - [main] going to run test: GoodReference [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.516+0000 2018-09-24T12:24:10.516+0000 I - [main] going to run test: Basic [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.516+0000 2018-09-24T12:24:10.516+0000 I - [main] going to run test: Hidden [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.516+0000 2018-09-24T12:24:10.516+0000 I - [main] going to run test: DefaultValue [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.516+0000 2018-09-24T12:24:10.516+0000 I - [main] going to run test: ImplicitValue [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.516+0000 2018-09-24T12:24:10.516+0000 I - [main] going to run test: Composing [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.517+0000 2018-09-24T12:24:10.516+0000 I - [main] going to run test: Positional [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.517+0000 2018-09-24T12:24:10.516+0000 I - [main] going to run test: PositionalTooMany [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.517+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalAndFlag [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.517+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalMultiple [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.517+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalMultipleExtra [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.517+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalMultipleUnlimited [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.518+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalMultipleAndFlag [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.518+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalSingleMultipleUnlimitedAndFlag [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.518+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalHoleInRange [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.518+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalOverlappingRange [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.518+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalOverlappingRangeInfinite [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.518+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: PositionalMultipleInfinite [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.518+0000 2018-09-24T12:24:10.517+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.518+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run suite: ConfigFromFilesystem [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.518+0000 2018-09-24T12:24:10.517+0000 I - [main] going to run test: JSONGood [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.519+0000 2018-09-24T12:24:10.519+0000 I - [main] going to run test: INIGood [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.519+0000 2018-09-24T12:24:10.519+0000 I - [main] going to run test: Empty [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.519+0000 2018-09-24T12:24:10.519+0000 I - [main] going to run test: NullByte [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.519+0000 2018-09-24T12:24:10.519+0000 I - [main] going to run test: NullSubDir [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.519+0000 2018-09-24T12:24:10.519+0000 I - [main] going to run test: NullTerminated [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.519+0000 2018-09-24T12:24:10.519+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.519+0000 2018-09-24T12:24:10.519+0000 I - [main] going to run suite: Constraints [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.520+0000 2018-09-24T12:24:10.519+0000 I - [main] going to run test: NumericRangeConstraint [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.523+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: MutuallyExclusiveConstraint [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.523+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: RequiresOtherConstraint [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: StringFormatConstraint [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run suite: INIConfigFile [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: Basic [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: Empty [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: Override [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: Comments [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: Switches [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: Monkeys [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: DefaultValueOverride [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.524+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: StringVector [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: StringMap [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: StringMapDuplicateKey [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: ComposingStringVector [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: ComposingStringMap [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run suite: JSONConfigFile [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: Basic [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: Empty [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: EmptyObject [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: Override [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.525+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: UnregisteredOption [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: DuplicateOption [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.520+0000 I - [main] going to run test: TypeChecking [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: Nested [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: Dotted [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: DottedAndNested [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: StringVector [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: StringMap [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: StringMapDuplicateKey [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: StringVectorNonString [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: DefaultValueOverride [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.526+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: ComposingStringVector [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.527+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: ComposingStringMap [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.527+0000 2018-09-24T12:24:10.523+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.527+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run suite: LegacyInterface [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.527+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: Good [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.527+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: NotSpecified [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.527+0000 2018-09-24T12:24:10.523+0000 I - [main] going to run test: BadType [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.528+0000 2018-09-24T12:24:10.527+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.528+0000 2018-09-24T12:24:10.527+0000 I - [main] going to run suite: NumericalBaseParsing [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.528+0000 2018-09-24T12:24:10.527+0000 I - [main] going to run test: CommandLine [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.529+0000 2018-09-24T12:24:10.527+0000 I - [main] going to run test: INIConfigFile [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.529+0000 2018-09-24T12:24:10.528+0000 I - [main] going to run test: YAMLConfigFile [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.529+0000 2018-09-24T12:24:10.528+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.529+0000 2018-09-24T12:24:10.528+0000 I - [main] going to run suite: OptionCount [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.529+0000 2018-09-24T12:24:10.528+0000 I - [main] going to run test: Basic [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.530+0000 2018-09-24T12:24:10.528+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.530+0000 2018-09-24T12:24:10.528+0000 I - [main] going to run suite: OptionSources [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.530+0000 2018-09-24T12:24:10.528+0000 I - [main] going to run test: SourceCommandLine [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.530+0000 2018-09-24T12:24:10.528+0000 I - [main] going to run test: SourceINIConfig [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.531+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: SourceYAMLConfig [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.531+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: SourceAllConfig [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.531+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: SourceAllLegacy [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.531+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: SourceAll [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.532+0000 2018-09-24T12:24:10.529+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.532+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run suite: Parsing [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.532+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: Good [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.532+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: SubSection [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.532+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: StringVector [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.533+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: StringMap [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.533+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: StringMapDuplicateKey [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.533+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: Positional [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.533+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: PositionalTooMany [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.534+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: PositionalAndFlag [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.534+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: PositionalMultiple [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.534+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: PositionalMultipleExtra [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.534+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: PositionalMultipleUnlimited [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.534+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: PositionalMultipleAndFlag [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.535+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: NeedArg [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.535+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: BadArg [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.535+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: ExtraArg [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.535+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: DefaultValue [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.535+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: DefaultValueOverride [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.536+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: DefaultValuesNotInBSON [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.536+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: ImplicitValue [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.536+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: ImplicitValueDefault [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.536+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: ImplicitValueOverride [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.536+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: ImplicitValueOverrideWithEqualsSign [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.536+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: ShortName [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.537+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: BadConfigFileOption [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.537+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: MapForScalarMismatch [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.537+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: ScalarForMapMismatch [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.537+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: ListForScalarMismatch [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.537+0000 2018-09-24T12:24:10.529+0000 I - [main] going to run test: ScalarForListMismatch [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.537+0000 2018-09-24T12:24:10.530+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.538+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run suite: Registration [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.538+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: EmptySingleName [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.538+0000 2018-09-24T12:24:10.530+0000 I - [main] FAIL: EmptySingleName std::exception: std::bad_alloc in test EmptySingleName [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.538+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: DuplicateSingleName [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.538+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: DuplicateDottedName [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.538+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: DuplicatePositional [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.539+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: BadRangesPositional [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.539+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: DefaultValueWrongType [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.539+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: ImplicitValueWrongType [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.539+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: ComposableNotVectorOrMap [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.539+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: ComposableWithImplicit [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.539+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: ComposableWithDefault [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.540+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: NumericRangeConstraint [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.540+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: StringFormatConstraint [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.540+0000 2018-09-24T12:24:10.530+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.540+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run suite: Style [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.540+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: NoSticky [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.540+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: NoGuessing [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.541+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: LongDisguises [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.541+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: Verbosity [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.541+0000 2018-09-24T12:24:10.530+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.541+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run suite: YAMLConfigFile [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.541+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: ComposingStringVector [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.541+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: ComposingStringMap [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.542+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: Basic [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.542+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: Empty [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.542+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: Override [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.542+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: UnregisteredOption [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.542+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: DuplicateOption [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.542+0000 2018-09-24T12:24:10.530+0000 I - [main] going to run test: TypeChecking [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.543+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: Nested [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.543+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: Dotted [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.543+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: DottedAndNested [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.543+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: DeprecatedDottedNameDeprecatedOnly [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.543+0000 2018-09-24T12:24:10.533+0000 W CONTROL [main] Option: dotted.deprecated is deprecated. Please use dotted.canonical instead. [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.543+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: DeprecatedDottedNameSameAsCanonicalDottedName [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.544+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: DeprecatedDottedNameEmptyString [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.544+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: DeprecatedDottedNameSameAsOtherOptionsDottedName [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.544+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: DeprecatedDottedNameSameAsOtherOptionsDeprecatedDottedName [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.544+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: DeprecatedDottedNameCanonicalAndDeprecated [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.544+0000 2018-09-24T12:24:10.533+0000 W CONTROL [main] Option: dotted.deprecated is deprecated. Please use dotted.canonical instead. [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.544+0000 2018-09-24T12:24:10.533+0000 I - [main] going to run test: DeprecatedDottedNameMultipleDeprecated [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.545+0000 2018-09-24T12:24:10.533+0000 W CONTROL [main] Option: dotted.deprecated1 is deprecated. Please use dotted.canonical instead. [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.545+0000 2018-09-24T12:24:10.534+0000 W CONTROL [main] Option: dotted.deprecated2 is deprecated. Please use dotted.canonical instead. [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.545+0000 2018-09-24T12:24:10.534+0000 W CONTROL [main] Option: dotted.deprecated1 is deprecated. Please use dotted.canonical instead. [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.545+0000 2018-09-24T12:24:10.534+0000 W CONTROL [main] Option: dotted.deprecated2 is deprecated. Please use dotted.canonical instead. [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.545+0000 2018-09-24T12:24:10.534+0000 I - [main] going to run test: ListBrackets [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.546+0000 2018-09-24T12:24:10.534+0000 I - [main] going to run test: ListDashes [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.546+0000 2018-09-24T12:24:10.534+0000 I - [main] going to run test: DefaultValueOverride [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.546+0000 2018-09-24T12:24:10.534+0000 I - [main] going to run test: Comments [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.546+0000 2018-09-24T12:24:10.534+0000 I - [main] going to run test: EmptyKey [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.546+0000 2018-09-24T12:24:10.534+0000 I - [main] going to run test: StringVector [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.546+0000 2018-09-24T12:24:10.534+0000 I - [main] going to run test: StringMap [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.547+0000 2018-09-24T12:24:10.534+0000 I - [main] going to run test: StringMapDuplicateKey [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.547+0000 2018-09-24T12:24:10.534+0000 I - [main] DONE running tests [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.547+0000 2018-09-24T12:24:10.534+0000 I - [main] ************************************************** [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.547+0000 2018-09-24T12:24:10.534+0000 I - [main] ChainingInterface | tests: 18 | fails: 0 | assert calls: 0 | time secs: 0.001 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.547+0000 2018-09-24T12:24:10.534+0000 I - [main] ConfigFromFilesystem | tests: 6 | fails: 0 | assert calls: 0 | time secs: 0.002 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.547+0000 2018-09-24T12:24:10.534+0000 I - [main] Constraints | tests: 4 | fails: 0 | assert calls: 0 | time secs: 0.000 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.548+0000 2018-09-24T12:24:10.534+0000 I - [main] INIConfigFile | tests: 12 | fails: 0 | assert calls: 0 | time secs: 0.000 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.548+0000 2018-09-24T12:24:10.534+0000 I - [main] JSONConfigFile | tests: 17 | fails: 0 | assert calls: 0 | time secs: 0.002 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.548+0000 2018-09-24T12:24:10.534+0000 I - [main] LegacyInterface | tests: 3 | fails: 0 | assert calls: 0 | time secs: 0.003 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.548+0000 2018-09-24T12:24:10.534+0000 I - [main] NumericalBaseParsing | tests: 3 | fails: 0 | assert calls: 0 | time secs: 0.001 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.548+0000 2018-09-24T12:24:10.534+0000 I - [main] OptionCount | tests: 1 | fails: 0 | assert calls: 0 | time secs: 0.000 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.549+0000 2018-09-24T12:24:10.534+0000 I - [main] OptionSources | tests: 6 | fails: 0 | assert calls: 0 | time secs: 0.000 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.549+0000 2018-09-24T12:24:10.534+0000 I - [main] Parsing | tests: 28 | fails: 0 | assert calls: 0 | time secs: 0.000 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.549+0000 2018-09-24T12:24:10.534+0000 I - [main] Registration | tests: 12 | fails: 1 | assert calls: 0 | time secs: 0.000 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.549+0000 EmptySingleName std::exception: std::bad_alloc in test EmptySingleName [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.549+0000 2018-09-24T12:24:10.534+0000 I - [main] Style | tests: 4 | fails: 0 | assert calls: 0 | time secs: 0.000 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.550+0000 2018-09-24T12:24:10.534+0000 I - [main] YAMLConfigFile | tests: 26 | fails: 0 | assert calls: 0 | time secs: 0.003 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.550+0000 2018-09-24T12:24:10.534+0000 I - [main] TOTALS | tests: 140 | fails: 1 | assert calls: 0 | time secs: 0.012 [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.550+0000 2018-09-24T12:24:10.534+0000 I - [main] Failing tests: [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.550+0000 2018-09-24T12:24:10.534+0000 I - [main] Registration/EmptySingleName Failed [cpp_unit_test:options_parser_test] 2018-09-24T12:24:10.550+0000 2018-09-24T12:24:10.534+0000 I - [main] FAILURE - 1 tests in 1 suites failed [executor:cpp_unit_test:job0] 2018-09-24T12:24:10.551+0000 options_parser_test ran in 0.04 seconds. [executor:cpp_unit_test:job0] 2018-09-24T12:24:10.551+0000 Program build/opt/mongo/util/options_parser/options_parser_test failed, so stopping... [executor:cpp_unit_test:job0] 2018-09-24T12:24:10.551+0000 Received a StopExecution exception: Program build/opt/mongo/util/options_parser/options_parser_test failed. [executor] 2018-09-24T12:24:10.565+0000 Summary: 323 test(s) ran in 153.07 seconds (322 succeeded, 16 were skipped, 1 failed, 0 errored) The following tests failed (with exit code): build/opt/mongo/util/options_parser/options_parser_test (17) [resmoke] 2018-09-24T12:24:10.565+0000 ================================================================================ [resmoke] 2018-09-24T12:24:10.566+0000 Summary of unittests suite: 323 test(s) ran in 153.07 seconds (322 succeeded, 16 were skipped, 1 failed, 0 errored) The following tests failed (with exit code): build/opt/mongo/util/options_parser/options_parser_test (17) 323 test(s) ran in 153.07 seconds (322 succeeded, 16 were skipped, 1 failed, 0 errored) cpp_unit_tests: 323 test(s) ran in 153.07 seconds (322 succeeded, 16 were skipped, 1 failed, 0 errored) The following tests failed (with exit code): build/opt/mongo/util/options_parser/options_parser_test (17) [resmoke] 2018-09-24T12:24:10.566+0000 ================================================================================ [resmoke] 2018-09-24T12:24:10.566+0000 Summary of all suites: 2 suites ran in 208.53 seconds dbtest: All 64 test(s) passed in 55.39 seconds. 64 test(s) ran in 55.39 seconds (64 succeeded, 0 were skipped, 0 failed, 0 errored) db_tests: All 64 test(s) passed in 55.39 seconds. unittests: 323 test(s) ran in 153.07 seconds (322 succeeded, 16 were skipped, 1 failed, 0 errored) The following tests failed (with exit code): build/opt/mongo/util/options_parser/options_parser_test (17) 323 test(s) ran in 153.07 seconds (322 succeeded, 16 were skipped, 1 failed, 0 errored) cpp_unit_tests: 323 test(s) ran in 153.07 seconds (322 succeeded, 16 were skipped, 1 failed, 0 errored) The following tests failed (with exit code): build/opt/mongo/util/options_parser/options_parser_test (17) make[1]: *** [debian/rules:57: override_dh_auto_test] Error 1



 Comments   
Comment by Henrik Edin [ 17/Apr/19 ]

Closing this as works as designed, if you have any further questions or concerns feel free to re-open this ticket.

Comment by Henrik Edin [ 05/Apr/19 ]

Hi xnox and ahasenack. We cannot guarantee that arbitrary versions of boost will work with MongoDB. As you've found there was a behavioral change in recent versions of boost program_options.

MongoDB 3.6 vendors boost 1.60 and our master branch currently vendors boost 1.69, any other version may or may not work depending on what they change in the library.

When we upgraded to boost 1.69 we had to fix this issue, you can see what we did in options_parser.cpp this commit: https://github.com/mongodb/mongo/commit/1c135a8f8368b92d44b3012dbff5f0cfdfed5166#diff-7148acb91b0e8e627cf490cf59f2492b

You can try and apply that code change in the 3.6 branch, otherwise I would recommend compiling with our vendored boost version.

Comment by Andreas Hasenack [ 27/Mar/19 ]

There is just that PR as source of comments. I'm not familiar with either code, so I can't really add useful information here other than link to it. In the meantime, Ubuntu has applied the patch from the PR, even though it's not merged upstream yet. Without it, mongodb 3.6.3 and 3.6.8 tests won't pass.

Comment by Andrew Morrow (Inactive) [ 27/Mar/19 ]

Hi ahasenack - Thanks for letting us know. I've re-opened the ticket and flagged it so we take a look. In the meantime, I did take a quick look at that boost PR, but rather than trying to piece together information from several sources, do you think you could write up a somewhat more detailed summary of what you think is going wrong? It will help us make the right decisions about what to do.

Comment by Andreas Hasenack [ 25/Mar/19 ]

Hi, I just came across this as well, same situation. The boost PR at https://github.com/boostorg/program_options/pull/59 has comments indicating that it fixes the issue, but there are comments wondering if mongo is doing the right thing. I believe it starts at https://github.com/boostorg/program_options/pull/59#issuecomment-438431635

 

Comment by Andrew Morrow (Inactive) [ 31/Oct/18 ]

xnox - I going to close this ticket as "works as designed" for now, because I don't believe there is something wrong in the MongoDB codebase that needs to be fixed. If, once Ubuntu is back in dev, you find that things are still broken, please ping the ticket and I'll re-open and renew investigation.

Comment by Dimitri John Ledkov [ 22/Oct/18 ]

Ubuntu was frozen for release for a week and a half now; and the new cycle has not started yet (no name yet), thus probably there will be no news about it for another two weeks until DD series is open.

Comment by Andrew Morrow (Inactive) [ 22/Oct/18 ]

xnox - Circling back to this: did the boost PR fix the crash?

Comment by Andrew Morrow (Inactive) [ 15/Oct/18 ]

xnox - To clarify: the 'generally' there is because we do upgrade for CVEs, but I don't think this will qualify.

Comment by Andrew Morrow (Inactive) [ 15/Oct/18 ]

xnox - We generally don't upgrade our vendored third-party packages on stable branches. We are, however, planning to do a full upgrade of all vendored packages on master in the next few months. So if the above referenced PR is in fact required, that is very helpful to know.

Comment by Matt Lord (Inactive) [ 14/Oct/18 ]

Thank you for doing all of this, xnox! Please do let us know how your testing with the patched boost library goes. 

Comment by Dimitri John Ledkov [ 14/Oct/18 ]

Also it looks like this https://github.com/boostorg/program_options/pull/59/files possibly fixes this, verifying.

Comment by Dimitri John Ledkov [ 14/Oct/18 ]

So the included copy of yaml-cpp (0.5.3) cannot be built with boost 1.67+ without the following patch:
http://launchpadlibrarian.net/384305885/yaml-cpp_0.5.2-4ubuntu1_0.5.2-4ubuntu2.diff.gz

Maybe it would be nice to apply above patch to your copy of yaml-cpp, dunno. Or just upgrade to a newer yaml-cpp, cause upstream dropped boost usage in favor of just plain c++11, see https://github.com/jbeder/yaml-cpp/commit/24fa1b33805c9a91df0f32c46c28e314dd7ad96f

So I cannot test --use-system-boost, without also --use-system-yaml.

So this test case fails as described with boost 1.67 (and system yaml) but doesn't fail with vendored copy of boost 1.60, or system boost 1.65.1.

I'm suspecting a boost regression.

Comment by Dimitri John Ledkov [ 14/Oct/18 ]

git master fails too, i.e. e5c39e225effd4a28937c32c84ac3dc0c1ceb355

$ scons --use-system-tcmalloc --use-system-pcre --use-system-boost --use-system-snappy --use-system-zlib --use-system-valgrind --use-system-stemmer --use-system-yaml --ssl --nostrip -j8 CC=cc CXX=g++ --allocator=tcmalloc build/opt/mongo/util/options_parser/options_parser_test

$ build/opt/mongo/util/options_parser/options_parser_test

Comment by Dimitri John Ledkov [ 13/Oct/18 ]
  • it is happening every time
  • running on a bare-metal machine (arm64) with 64GB of RAM
  • thus there is no true out-of-memory
  • there are some ubuntu patches applied, for minor things, i will see if compiling without them makes a difference
  • and will check if i can reproduce this with just upstream git checkout
Comment by Andrew Morrow (Inactive) [ 09/Oct/18 ]

xnox - Thanks, please let me know what you find out.

Comment by Dimitri John Ledkov [ 09/Oct/18 ]
  • There are some patches applied, and also Ubuntu hardening build-flags are in use, I shall check if those are in the way here.
  • I do not believe the build is memory constrained here, it happens across all architectures.
  • And yeah, it happens everytime.

I'll get dedicated time on a build box and will report more findings if I can.

Comment by Andrew Morrow (Inactive) [ 01/Oct/18 ]

xnox -

Thanks for the report. I took a look at the log. The failure is interesting, as it appears that std::bad_alloc is being thrown:

[main] FAIL: EmptySingleName std::exception: std::bad_alloc

Typically, std::bad_alloc should only be thrown when the system has run out of memory. What is somewhat strange to me is that the unit test that is failing is linked to build/opt/mongo/unittest/libunittest_main.a, which should be defining a mainline which calls ::mongo::setupSynchronousSignalHandlers(). That in turn should be calling std::set_new_handler(reportOutOfMemoryErrorAndExit), which looks like:

void reportOutOfMemoryErrorAndExit() {
    MallocFreeOStreamGuard lk{};
    printStackTrace(mallocFreeOStream << "out of memory.\n");
    writeMallocFreeStreamToLog();
    quickExit(EXIT_ABRUPT);
}

But I do not see the out of memory message in your log, and the fact that std::bad_alloc was thrown suggests that somehow this machinery wasn't in place.

So, two follow-up questions:

  • Are you building from stock sources or are there any patches applied, especially patches that may change the way this chain of calls sets up the new_handler?
  • Is this build run inside a container which is somehow memory constrained? I wouldn't expect this test to demand much in the way of resources, but perhaps there are other tasks on the machine or constraints that could result in an actual out of memory condition?
  • Does the failure happen every time?
Comment by Dimitri John Ledkov [ 24/Sep/18 ]

This is the link to the build log https://launchpadlibrarian.net/390071547/buildlog_ubuntu-cosmic-s390x.mongodb_1%3A3.6.8-0ubuntu2_BUILDING.txt.gz

Generated at Thu Feb 08 04:45:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.