use createUser command or updateUser command with a very large (>16mb) custom data field. Expect graceful failure, instead hit assertion and get scary-looking dump:
2013-11-01T10:45:37.369-0400 Assertion: 10334:BSONObj size: 20002895 (0x131384F) is invalid. Size must be between 0 and 16793600(16MB) First element: field0: "jXbNJTuQfmTyfBkIGnq3VkG-Vg.PGBAK7v1-syu5ZarK5WSo9iNK56TbjROhaJGGnq543O4ELaXnkmHs4zT2L24hz0P.xqLNFolL8bpDdacPaxA6pyUTQnBg3-ECs7Fr6My1GwLINfIOn1AQYfD8zo..."
2013-11-01T10:45:37.408-0400 0x1002adb55 0x100226084 0x1001fc446 0x1001fc69a 0x1000ec579 0x1000d4608 0x100011f30 0x1000b7cdc 0x1000d2fdd 0x10016d197 0x10016c932 0x10016be15 0x10016d0d2 0x1001af060 0x1001707ea 0x10043e45d 0x10043e80b 0x10043b568 0x3b2c9ff06362 0x3b2c9ff586a2
0 mongo 0x00000001002adb55 _ZN5mongo15printStackTraceERSo + 37
1 mongo 0x0000000100226084 _ZN5mongo10logContextEPKc + 228
2 mongo 0x00000001001fc446 _ZN5mongo11msgassertedEiPKc + 390
3 mongo 0x00000001001fc69a ZNK5mongo13ExceptionInfo6appendERNS_14BSONObjBuilderEPKcS4 + 0
4 mongo 0x00000001000ec579 _ZNK5mongo7BSONObj14_assertInvalidEv + 953
5 mongo 0x00000001000d4608 _ZN5mongo7BSONObj4initEPKc + 76
6 mongo 0x0000000100011f30 _ZN5mongo7BSONObj4initEPNS0_6HolderE + 80
7 mongo 0x00000001000b7cdc _ZN5mongo7BSONObjC1EPNS0_6HolderE + 60
8 mongo 0x00000001000d2fdd _ZN5mongo14BSONObjBuilder3objEv + 141
9 mongo 0x000000010016d197 _ZN5mongo7V8Scope9v8ToMongoEN2v86HandleINS1_6ObjectEEEi + 1801
10 mongo 0x000000010016c932 _ZN5mongo7V8Scope15v8ToMongoObjectERNS_14BSONObjBuilderERKNS_10StringDataEN2v86HandleINS6_5ValueEEEiPNS_7BSONObjE + 1718
11 mongo 0x000000010016be15 _ZN5mongo7V8Scope16v8ToMongoElementERNS_14BSONObjBuilderERKNS_10StringDataEN2v86HandleINS6_5ValueEEEiPNS_7BSONObjE + 2443
12 mongo 0x000000010016d0d2 _ZN5mongo7V8Scope9v8ToMongoEN2v86HandleINS1_6ObjectEEEi + 1604
13 mongo 0x00000001001af060 _ZN5mongo9mongoFindEPNS_7V8ScopeERKN2v89ArgumentsE + 544
14 mongo 0x00000001001707ea _ZN5mongo7V8Scope10v8CallbackERKN2v89ArgumentsE + 560
15 mongo 0x000000010043e45d ZN2v88internalL19HandleApiCallHelperILb0EEEPNS0_11MaybeObjectENS0_12_GLOBAL_N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEEPNS0_7IsolateE + 1789
16 mongo 0x000000010043e80b ZN2v88internalL26Builtin_Impl_HandleApiCallENS0_12_GLOBAL_N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEEPNS0_7IsolateE + 43
17 mongo 0x000000010043b568 ZN2v88internalL21Builtin_HandleApiCallENS0_12_GLOBAL_N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEEPNS0_7IsolateE + 136
18 ??? 0x00003b2c9ff06362 0x0 + 65062847931234
19 ??? 0x00003b2c9ff586a2 0x0 + 65062848267938
Error: BSONObj size: 20002895 (0x131384F) is invalid. Size must be between 0 and 16793600(16MB) First element: field0: "jXbNJTuQfmTyfBkIGnq3VkG-Vg.PGBAK7v1-syu5ZarK5WSo9iNK56TbjROhaJGGnq543O4ELaXnkmHs4zT2L24hz0P.xqLNFolL8bpDdacPaxA6pyUTQnBg3-ECs7Fr6My1GwLINfIOn1AQYfD8zo..." at src/mongo/shell/query.js:81
- duplicates
-
SERVER-11525 Provide nicer message when converting JS to BSON if too big
- Closed