jsr@bruford:~/src/qa-281$ ~/Downloads/mongodb-osx-x86_64-2013-01-23/bin/mongo
MongoDB shell version: 2.3.3-pre-
connecting to: test
Server has startup warnings:
Wed Jan 23 14:52:39.843 [initandlisten]
Wed Jan 23 14:52:39.844 [initandlisten] ** NOTE: This is a development version (2.3.3-pre-) of MongoDB.
Wed Jan 23 14:52:39.844 [initandlisten] ** Not recommended for production.
Wed Jan 23 14:52:39.844 [initandlisten]
Wed Jan 23 14:52:39.844 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Wed Jan 23 14:52:39.844 [initandlisten]
> var doc = {}
> var cur = doc;
> for( var i = 0; i< 65536; i++ ) {
... cur[i] = {}
... cur = cur[i];
... }
{ }
> cur['a'] = 'foo'
foo
> doc
Wed Jan 23 15:00:51.265 javascript execution failed src/mongo/shell/types.js:527 RangeError: Maximum call stack size exceeded
tojsonObject = function(x, indent, nolint){
^
> var res = benchRun({ ops: [
{ ns: 'test.foo', op: 'insert', doc: doc }
], parallel: 1, seconds: 1, totals: true });
Wed Jan 23 15:04:00.591 mongo got signal 11 (Segmentation fault: 11), stack trace:
Wed Jan 23 15:04:00.592 0x10016a4fb 0x10000223d 0x7fff85d588ea 0x10200ec00 0x1002b3a29 0x1002144af 0x10010c675 0x10010cce3 0x10010bbf0 0x10010c627 0x10010cce3 0x10010bbf0 0x10010c627 0x10010cce3 0x10010bbf0 0x10010c627 0x10010cce3 0x10010bbf0 0x10010c627 0x10010cce3
0 mongo 0x000000010016a4fb _ZN5mongo15printStackTraceERSo + 43
1 mongo 0x000000010000223d _Z12quitAbruptlyi + 925
2 libsystem_c.dylib 0x00007fff85d588ea _sigtramp + 26
3 ??? 0x000000010200ec00 0x0 + 4328582144
4 mongo 0x00000001002b3a29 ZN2v88internal11GetPropertyENS0_6HandleINS0_6ObjectEEES3 + 73
5 mongo 0x00000001002144af _ZN2v86Object3GetENS_6HandleINS_5ValueEEE + 223
6 mongo 0x000000010010c675 _ZN5mongo7V8Scope9v8ToMongoEN2v86HandleINS1_6ObjectEEEi + 837
7 mongo 0x000000010010cce3 _ZN5mongo7V8Scope15v8ToMongoObjectERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE + 739
8 mongo 0x000000010010bbf0 _ZN5mongo7V8Scope16v8ToMongoElementERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE + 1664
9 mongo 0x000000010010c627 _ZN5mongo7V8Scope9v8ToMongoEN2v86HandleINS1_6ObjectEEEi + 759
10 mongo 0x000000010010cce3 _ZN5mongo7V8Scope15v8ToMongoObjectERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE + 739
11 mongo 0x000000010010bbf0 _ZN5mongo7V8Scope16v8ToMongoElementERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE + 1664
12 mongo 0x000000010010c627 _ZN5mongo7V8Scope9v8ToMongoEN2v86HandleINS1_6ObjectEEEi + 759
13 mongo 0x000000010010cce3 _ZN5mongo7V8Scope15v8ToMongoObjectERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE + 739
14 mongo 0x000000010010bbf0 _ZN5mongo7V8Scope16v8ToMongoElementERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE + 1664
15 mongo 0x000000010010c627 _ZN5mongo7V8Scope9v8ToMongoEN2v86HandleINS1_6ObjectEEEi + 759
16 mongo 0x000000010010cce3 _ZN5mongo7V8Scope15v8ToMongoObjectERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE + 739
17 mongo 0x000000010010bbf0 _ZN5mongo7V8Scope16v8ToMongoElementERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE + 1664
18 mongo 0x000000010010c627 _ZN5mongo7V8Scope9v8ToMongoEN2v86HandleINS1_6ObjectEEEi + 759
19 mongo 0x000000010010cce3 _ZN5mongo7V8Scope15v8ToMongoObjectERNS_14BSONObjBuilderERKSsN2v86HandleINS5_5ValueEEEiPNS_7BSONObjE + 739