I was testing NumberDecimal to see how it handles special cases like negative signaling not a number with debug payload and crashed the shell.
MongoDB Enterprise repl0:PRIMARY> db.test.count() 0 MongoDB Enterprise repl0:PRIMARY> db.test.insert({d: NumberDecimal("-sNaN234")}) WriteResult({ "nInserted" : 1 }) MongoDB Enterprise repl0:PRIMARY> db.test.count() 1 MongoDB Enterprise repl0:PRIMARY> db.test.findOne() 2016-04-13T16:25:02.334-0700 I - [thread1] Invariant failure dec128String == "-Inf" src/mongo/platform/decimal128.cpp 395 2016-04-13T16:25:02.334-0700 I - [thread1] ***aborting after invariant() failure 2016-04-13T16:25:02.340-0700 F - [thread1] Got signal: 6 (Aborted). 0xb51fb1 0xb50f39 0xb517c1 0x7f5bd79d0680 0x7f5bd7658297 0x7f5bd765962a 0xad5cea 0xa1b694 0xa79258 0xa796c6 0xe98e69 0xe94380 0xe98c11 0xe98fc3 0xe99c59 0xffbe4d 0x7f5bd92ff8fa ----- BEGIN BACKTRACE ----- {"backtrace":[{"b":"400000","o":"751FB1","s":"_ZN5mongo15printStackTraceERSo"},{"b":"400000","o":"750F39"},{"b":"400000","o":"7517C1"},{"b":"7F5BD79C0000","o":"10680"},{"b":"7F5BD7625000","o":"33297","s":"gsignal"},{"b":"7F5BD7625000","o":"3462A","s":"abort"},{"b":"400000","o":"6D5CEA","s":"_ZN5mongo15invariantFailedEPKcS1_j"},{"b":"400000","o":"61B694","s":"_ZNK5mongo10Decimal1288toStringEv"},{"b":"400000","o":"679258","s":"_ZN5mongo5mozjs17NumberDecimalInfo9Functions8toString4callEP9JSContextN2JS8CallArgsE"},{"b":"400000","o":"6796C6","s":"_ZN5mongo5mozjs7smUtils21wrapConstrainedMethodINS0_17NumberDecimalInfo9Functions8toStringELb0EJS3_EEEbP9JSContextjPN2JS5ValueE"},{"b":"400000","o":"A98E69","s":"_ZN2js6InvokeEP9JSContextN2JS8CallArgsENS_14MaybeConstructE"},{"b":"400000","o":"A94380"},{"b":"400000","o":"A98C11","s":"_ZN2js9RunScriptEP9JSContextRNS_8RunStateE"},{"b":"400000","o":"A98FC3","s":"_ZN2js6InvokeEP9JSContextN2JS8CallArgsENS_14MaybeConstructE"},{"b":"400000","o":"A99C59","s":"_ZN2js6InvokeEP9JSContextRKN2JS5ValueES5_jPS4_NS2_13MutableHandleIS3_EE"},{"b":"400000","o":"BFBE4D"},{"b":"0","o":"7F5BD92FF8FA"}],"processInfo":{ "mongodbVersion" : "3.3.4-36-g11efcec", "gitVersion" : "11efcec0aa387b9c8e4f2ce8addd185d515479ea", "compiledModules" : [ "enterprise" ], "uname" : { "sysname" : "Linux", "release" : "4.1.15-gentoo-r1", "version" : "#1 SMP PREEMPT Mon Jan 25 13:25:52 PST 2016", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000" }, { "b" : "7FFF3A1EE000", "path" : "linux-vdso.so.1", "elfType" : 3, "buildId" : "3F58D4FCD9FE298BAA05AC39F54C158934D1E9C2" }, { "b" : "7F5BD8ECD000", "path" : "/usr/lib64/libsasl2.so.3", "elfType" : 3 }, { "b" : "7F5BD8C53000", "path" : "/usr/lib64/libssl.so.1.0.0", "elfType" : 3 }, { "b" : "7F5BD8812000", "path" : "/usr/lib64/libcrypto.so.1.0.0", "elfType" : 3 }, { "b" : "7F5BD860A000", "path" : "/lib64/librt.so.1", "elfType" : 3 }, { "b" : "7F5BD8406000", "path" : "/lib64/libdl.so.2", "elfType" : 3 }, { "b" : "7F5BD80F7000", "path" : "/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6", "elfType" : 3 }, { "b" : "7F5BD7DF3000", "path" : "/lib64/libm.so.6", "elfType" : 3 }, { "b" : "7F5BD7BDC000", "path" : "/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1", "elfType" : 3 }, { "b" : "7F5BD79C0000", "path" : "/lib64/libpthread.so.0", "elfType" : 3 }, { "b" : "7F5BD7625000", "path" : "/lib64/libc.so.6", "elfType" : 3 }, { "b" : "7F5BD90EB000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3 }, { "b" : "7F5BD734C000", "path" : "/usr/lib64/libkrb5.so.3", "elfType" : 3 }, { "b" : "7F5BD711A000", "path" : "/usr/lib64/libk5crypto.so.3", "elfType" : 3 }, { "b" : "7F5BD6F04000", "path" : "/lib64/libz.so.1", "elfType" : 3 }, { "b" : "7F5BD6D00000", "path" : "/lib64/libcom_err.so.2", "elfType" : 3 }, { "b" : "7F5BD6AF4000", "path" : "/usr/lib64/libkrb5support.so.0", "elfType" : 3 }, { "b" : "7F5BD68F0000", "path" : "/lib64/libkeyutils.so.1", "elfType" : 3 }, { "b" : "7F5BD66D9000", "path" : "/lib64/libresolv.so.2", "elfType" : 3 } ] }} mongo(_ZN5mongo15printStackTraceERSo+0x41) [0xb51fb1] mongo(+0x750F39) [0xb50f39] mongo(+0x7517C1) [0xb517c1] libpthread.so.0(+0x10680) [0x7f5bd79d0680] libc.so.6(gsignal+0x37) [0x7f5bd7658297] libc.so.6(abort+0x16A) [0x7f5bd765962a] mongo(_ZN5mongo15invariantFailedEPKcS1_j+0xDA) [0xad5cea] mongo(_ZNK5mongo10Decimal1288toStringEv+0x784) [0xa1b694] mongo(_ZN5mongo5mozjs17NumberDecimalInfo9Functions8toString4callEP9JSContextN2JS8CallArgsE+0x88) [0xa79258] mongo(_ZN5mongo5mozjs7smUtils21wrapConstrainedMethodINS0_17NumberDecimalInfo9Functions8toStringELb0EJS3_EEEbP9JSContextjPN2JS5ValueE+0x1D6) [0xa796c6] mongo(_ZN2js6InvokeEP9JSContextN2JS8CallArgsENS_14MaybeConstructE+0xC9) [0xe98e69] mongo(+0xA94380) [0xe94380] mongo(_ZN2js9RunScriptEP9JSContextRNS_8RunStateE+0xD1) [0xe98c11] mongo(_ZN2js6InvokeEP9JSContextN2JS8CallArgsENS_14MaybeConstructE+0x223) [0xe98fc3] mongo(_ZN2js6InvokeEP9JSContextRKN2JS5ValueES5_jPS4_NS2_13MutableHandleIS3_EE+0x229) [0xe99c59] mongo(+0xBFBE4D) [0xffbe4d] ??? [0x7f5bd92ff8fa] ----- END BACKTRACE ----- Aborted