[SERVER-13707] mongo shell may crash when converting invalid regular expression Created: 24/Apr/14  Updated: 22/Jul/15  Resolved: 16/May/14

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: 2.6.4, 2.7.1

Type: Bug Priority: Major - P3
Reporter: rohit Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: community-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File cmd.png     Zip Archive dump.zip    
Issue Links:
Depends
Related
related to SERVER-14107 Querying for a document containing a ... Closed
related to SERVER-14909 Shell crashes when printing DBPointer... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

I have created a collection named as staffer and when i execute a simple select command db.staffers.find(), mongo shell stop executing.

Sprint: Server 2.7.1
Participants:

 Description   
Issue Status as of Jul 22, 2014

ISSUE SUMMARY
If a document contains an invalid regular expression, the mongo shell may crash when trying to display such document.

USER IMPACT
The shell may crash with a SegmentationFault error and a stack trace. The mongod process is not affected.

WORKAROUNDS
N/A

AFFECTED VERSIONS
MongoDB production releases up to 2.6.3 are affected by this issue.

FIX VERSION
The fix is included in the 2.6.4 production release.

RESOLUTION DETAILS
Fixed as part of SERVER-14107: convert values of either type Javascript or JavascriptWithScope to a string.

Original description

Mongo shell version 2.6
O.S Windows -64
Database : MongoDB 2.6 windows version



 Comments   
Comment by rohit [ 23/Jul/14 ]

Which language driver are you using to insert these documents into the database – JDBC Driver.

Can you review your application code to see if you might be using an unsupported regular expression flag? – this is basically due to invalid flag for PATTERN in two of the records.

Comment by Githook User [ 22/Jul/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-13707 simplify tojsonObject

(cherry picked from commit 68c2f37993d8abb7d35a61eb79c7e0e16d021f68)
Branch: v2.6
https://github.com/mongodb/mongo/commit/2d157304846c8f211a43e37a1290f50132901a8c

Comment by Githook User [ 16/May/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-13707 simplify tojsonObject
Branch: master
https://github.com/mongodb/mongo/commit/68c2f37993d8abb7d35a61eb79c7e0e16d021f68

Comment by Benety Goh [ 01/May/14 ]

Hi Rohit,

When I tried to print the following document, the mongo shell reported an invalid JavaScript RegExp flag "d":

> db.staffers.find({"_id" : ObjectId("52b92fe4b1203730bb610981") },{_id:0, pattern: 1})
Error: 16863 Error converting /.*xy.*/d in field pattern to a JS RegExp object: SyntaxError: Invalid flags supplied to RegExp constructor 'd'

This flag is also visible in mongoexport:

./mongoexport --db=local --collection=staffers --query='{"_id" : ObjectId("52b92fe4b1203730bb610981") }'
connected to: 127.0.0.1
{ "_id" : { "$oid" : "52b92fe4b1203730bb610981" }, "BSONTimestamp" : { "$timestamp" : { "t" : 1305000000, "i" : 2 } }, "bool" : false, "code" : "\n  function () {\n      x = 3, y = 5, z = x + y;\n      docuement.write.ln(z);\n  }", "pattern" : { "$regex" : ".*xy.*", "$options" : "d" }, "regexpr" : { "$binary" : "UkF/b1gAtEp1WbfN", "$type" : "05" }, "timestampField" : { "$date" : "2012-02-09T23:00:00.000-0500" } }
exported 1 records

I am wondering if you can share with us some information on your application - it would

  • Which language driver are you using to insert these documents into the database?
  • Can you review your application code to see if you might be using an unsupported regular expression flag?

Here are the docs on supported regular expressions:

http://docs.mongodb.org/manual/reference/operator/query/regex/

Thank you
Ben

Comment by Randolph Tan [ 28/Apr/14 ]

Output on linux64:

{ "_id" : ObjectId("52b92fe2b1203730bb61097e"), "BSONTimestamp" : Timestamp(1297396800, 2), "bool" : true, "code" : "", "pattern" : /.*/xy/.*/, "regexpr" : BinData(5,"UkF/b1gAtEp1Wbfe"), "timestampField" : ISODate("2011-03-10T04:00:00Z") }
{ "_id" : ObjectId("52b92fe2b1203730bb61097f"), "BSONTimestamp" : Timestamp(1302408000, 2), "bool" : false, "code" : function () {
      x = 3, y = 5, z = (x * y)+y;
      docuement.write.ln(z);
  }, "pattern" : /.*/xy/.*/m, "regexpr" : BinData(5,"UkF/b1gAtEp1Wbet"), "timestampField" : ISODate("2011-05-10T04:00:00Z") }
{ "_id" : ObjectId("52b92fe4b1203730bb610980"), "BSONTimestamp" : Timestamp(1297396800, 2), "bool" : true, "code" : function () {
  }, "pattern" : /.*ab.*/, "regexpr" : BinData(5,"UkF/b1gAtEp1WbfN"), "timestampField" : ISODate("2011-03-10T04:00:00Z") }
2014-04-28T15:33:19.607-0400 mongo got signal 11 (Segmentation fault), stack trace: 
2014-04-28T15:33:19.613-0400 0x8639e1 0x61a555 0x7f87cce0c0b0 0xb1b907 0xb7c0a2 0xa0eddd 0x96d7f2 0x7b33b4 0xb0a003 0xb099e3 0xb66920 0x2e739bc06362 
 ./mongo(_ZN5mongo15printStackTraceERSo+0x21) [0x8639e1]
 ./mongo(_Z12quitAbruptlyi+0xe5) [0x61a555]
 /lib/x86_64-linux-gnu/libc.so.6(+0x370b0) [0x7f87cce0c0b0]
 ./mongo(_ZN2v88internal10JSReceiver11SetPropertyENS0_6HandleIS1_EENS2_INS0_6StringEEENS2_INS0_6ObjectEEE18PropertyAttributesNS0_14StrictModeFlagE+0x37) [0xb1b907]
 ./mongo(_ZN2v88internal7Runtime17SetObjectPropertyEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_S6_18PropertyAttributesNS0_14StrictModeFlagE+0x492) [0xb7c0a2]
 ./mongo(_ZN2v88internal11SetPropertyENS0_6HandleINS0_6ObjectEEES3_S3_18PropertyAttributesNS0_14StrictModeFlagE+0x5d) [0xa0eddd]
 ./mongo(_ZN2v86Object3SetENS_6HandleINS_5ValueEEES3_NS_17PropertyAttributeE+0xf2) [0x96d7f2]
 ./mongo() [0x7b33b4]
 ./mongo(_ZN2v88internal8JSObject35GetPropertyAttributeWithInterceptorEPS1_PNS0_6StringEb+0x453) [0xb0a003]
 ./mongo(_ZN2v88internal10JSReceiver32GetPropertyAttributeWithReceiverEPS1_PNS0_6StringE+0xb3) [0xb099e3]
 ./mongo(_ZN2v88internal19Runtime_HasPropertyENS0_9ArgumentsEPNS0_7IsolateE+0x70) [0xb66920]
 [0x2e739bc06362]

addr2line:

/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/util/stacktrace.cpp:304
/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/shell/dbshell.cpp:229
??:0
/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/third_party/v8/src/handles-inl.h:66
/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/third_party/v8/src/runtime.cc:4639
/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/third_party/v8/src/handles.cc:238
/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/third_party/v8/src/isolate.h:865
/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/bson/bsonelement.h:112
/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/third_party/v8/src/isolate.h:1010
/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/third_party/v8/src/objects.cc:3147
/srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/third_party/v8/src/objects-inl.h:4989
??:0

Was also able to reproduce locally build on master with git commit 381a35be63129419516c77825c2a27e7fc447e63. Output with debug on:

> db.staffers.find()
{ "_id" : ObjectId("52b92fe2b1203730bb61097e"), "BSONTimestamp" : Timestamp(1297396800, 2), "bool" : true, "code" : "", "pattern" : /.*/xy/.*/, "regexpr" : BinData(5,"UkF/b1gAtEp1Wbfe"), "timestampField" : ISODate("2011-03-10T04:00:00Z") }
{ "_id" : ObjectId("52b92fe2b1203730bb61097f"), "BSONTimestamp" : Timestamp(1302408000, 2), "bool" : false, "code" : function () {
      x = 3, y = 5, z = (x * y)+y;
      docuement.write.ln(z);
  }, "pattern" : /.*/xy/.*/m, "regexpr" : BinData(5,"UkF/b1gAtEp1Wbet"), "timestampField" : ISODate("2011-05-10T04:00:00Z") }
{ "_id" : ObjectId("52b92fe4b1203730bb610980"), "BSONTimestamp" : Timestamp(1297396800, 2), "bool" : true, "code" : function () {
  }, "pattern" : /.*ab.*/, "regexpr" : BinData(5,"UkF/b1gAtEp1WbfN"), "timestampField" : ISODate("2011-03-10T04:00:00Z") }
 
 
#
# Fatal error in src/third_party/v8/src/handles-inl.h, line 64
# CHECK(location_ != __null) failed
#
 
 
==== Stack trace ============================================
 
Security context: 0x7f684d06361 <JS Object>#0#
    1: FILTER_KEY [native runtime.js:400] (this=0x8ac65f758d9 <JS Object>#1#,a=0x8ac65f75c19 <String[7]: regexpr>)
    2: tojsonObject [src/mongo/shell/types.js:616] (this=0x7f684d06479 <JS Global Object>#2#,x=0x8ac65f758d9 <JS Object>#1#,indent=0x3f2701d044e1 <String[0]: >,nolint=0x7f684d04141 <true>)
    3: tojson [src/mongo/shell/types.js:564] (this=0x7f684d06479 <JS Global Object>#2#,x=0x8ac65f758d9 <JS Object>#1#,indent=0x3f2701d044e1 <String[0]: >,nolint=0x7f684d04141 <true>)
    4: shellPrint [src/mongo/shell/query.js:352] (this=0x8ac65f6b0a1 <a DBQuery>#3#)
    5: shellPrintHelper [src/mongo/shell/utils.js:392] (this=0x7f684d06479 <JS Global Object>#2#,x=0x8ac65f6b0a1 <a DBQuery>#3#)
    6: /* anonymous */ [(shell2):1] (this=0x7f684d06479 <JS Global Object>#2#)
 
==== Details ================================================
 
[1]: FILTER_KEY [native runtime.js:400] (this=0x8ac65f758d9 <JS Object>#1#,a=0x8ac65f75c19 <String[7]: regexpr>) {
  // stack-allocated locals
  var b = 0x8ac65f75c19 <String[7]: regexpr>
  // expression stack (top to bottom)
  [02] : 0x8ac65f75c19 <String[7]: regexpr>
  [01] : 0x8ac65f758d9 <JS Object>#1#
--------- s o u r c e   c o d e ---------
function FILTER_KEY(a){?var b=%ToString(a);?if(%HasProperty(this,b))return b;?return 0;?}
-----------------------------------------
}
 
[2]: tojsonObject [src/mongo/shell/types.js:616] (this=0x7f684d06479 <JS Global Object>#2#,x=0x8ac65f758d9 <JS Object>#1#,indent=0x3f2701d044e1 <String[0]: >,nolint=0x7f684d04141 <true>) {
  // stack-allocated locals
  var total = 5
  var keys = 0x7f684d04121 <undefined>
  var num = 0x7f684d04121 <undefined>
  var s = 0x8ac65f75a99 <String[2]: { >
  var tabSpace = 0x3f2701d044e1 <String[0]: >
  var val = 0x7f684d04121 <undefined>
  var k = 0x8ac65f75bf9 <String[7]: pattern>
  var lineEnding = 0x3f2701d04ce9 <String[1]:  >
  // expression stack (top to bottom)
  [14] : 0x8ac65f75c19 <String[7]: regexpr>
  [13] : 0x8ac65f758d9 <JS Object>#1#
  [12] : 5
  [11] : 7
  [10] : 0x8ac65f75c81 <FixedArray[7]>#4#
  [09] : 1
  [08] : 0x8ac65f758d9 <JS Object>#1#
--------- s o u r c e   c o d e ---------
function (x, indent, nolint){?    var lineEnding = nolint ? " " : "\n";?    var tabSpace = nolint ? "" : "\t";?    assert.eq((typeof x), "object", "tojsonObject needs object, not [" + (typeof x) + "]");??    if (!indent)?        indent = "";??    if (typeof(x.tojson) == "function" && x.tojson != tojson) {?  ...
 
-----------------------------------------
}
 
[3]: tojson [src/mongo/shell/types.js:564] (this=0x7f684d06479 <JS Global Object>#2#,x=0x8ac65f758d9 <JS Object>#1#,indent=0x3f2701d044e1 <String[0]: >,nolint=0x7f684d04141 <true>) {
  // stack-allocated locals
  var i = 0x7f684d04121 <undefined>
  var s = 0x7f684d04121 <undefined>
  var out = 0x7f684d04121 <undefined>
  var code = 0x7f684d04121 <undefined>
  // expression stack (top to bottom)
  [07] : 0x7f684d04141 <true>
  [06] : 0x3f2701d044e1 <String[0]: >
  [05] : 0x8ac65f758d9 <JS Object>#1#
  [04] : 0x7f684d06479 <JS Global Object>#2#
--------- s o u r c e   c o d e ---------
function (x, indent, nolint){?    if (x === null)?        return "null";??    if (x === undefined)?        return "undefined";??    if (!indent)?        indent = "";??    switch (typeof x) {?    case "string": {?        var out = new Array(x.length+1);?        out[0] = '"';?        for (var i=0; i<x.length; ...
 
-----------------------------------------
}
 
[4]: shellPrint [src/mongo/shell/query.js:352] (this=0x8ac65f6b0a1 <a DBQuery>#3#) {
  // stack-allocated locals
  var start = 0x8ac65f6b629 <Number: 1398710837860>
  var n = 3
  var s = 0x8ac65f75891 <String[252]\: { "_id" : ObjectId("52b92fe4b1203730bb610980"), "BSONTimestamp" : Timestamp(1297396800, 2), "bool" : true, "code" : function () {\n  }, "pattern" : /.*ab.*/, "regexpr" : BinData(5,"UkF/b1gAtEp1WbfN"), "timestampField" : ISODate("2011-03-10T04:00:00Z") }>
  var time = 0x7f684d04121 <undefined>
  // expression stack (top to bottom)
  [12] : 0x7f684d04141 <true>
  [11] : 0x3f2701d044e1 <String[0]: >
  [10] : 0x8ac65f758d9 <JS Object>#1#
  [09] : 0x7f684d06479 <JS Global Object>#2#
--------- s o u r c e   c o d e ---------
function (){?    try {?        var start = new Date().getTime();?        var n = 0;?        while ( this.hasNext() && n < DBQuery.shellBatchSize ){?            var s = this._prettyShell ? tojson( this.next() ) : tojson( this.next() , "" , true );?            print( s );?            n++;?        }?        if ...
 
-----------------------------------------
}
 
[5]: shellPrintHelper [src/mongo/shell/utils.js:392] (this=0x7f684d06479 <JS Global Object>#2#,x=0x8ac65f6b0a1 <a DBQuery>#3#) {
  // stack-allocated locals
  var err = 0x7f684d04121 <undefined>
  var p = 0x7f684d47c99 <JS Function>#5#
  // expression stack (top to bottom)
  [02] : 0x8ac65f6b0a1 <a DBQuery>#3#
--------- s o u r c e   c o d e ---------
function (x) {?    if (typeof (x) == "undefined") {?        // Make sure that we have a db var before we use it?        // TODO: This implicit calling of GLE can cause subtle, hard to track issues - remove??        if (__callLastError && typeof( db ) != "undefined" &&?                db.getMongo &&?         ...
 
-----------------------------------------
}
 
[6]: /* anonymous */ [(shell2):1] (this=0x7f684d06479 <JS Global Object>#2#) {
  // stack-allocated locals
  var .result = 0x7f684d04121 <undefined>
  // expression stack (top to bottom)
  [02] : 0x8ac65f6b0a1 <a DBQuery>#3#
  [01] : 0x7f684d06479 <JS Global Object>#2#
--------- s o u r c e   c o d e ---------
shellPrintHelper( __lastres__ );
-----------------------------------------
}
 
==== Key         ============================================
 
 #0# 0x7f684d06361: 0x7f684d06361 <JS Object>
 #1# 0x8ac65f758d9: 0x8ac65f758d9 <JS Object>
 #2# 0x7f684d06479: 0x7f684d06479 <JS Global Object>
 #3# 0x8ac65f6b0a1: 0x8ac65f6b0a1 <a DBQuery>
             _skip: 0
               _db: 0x8ac65f69791 <a DB>#6#
          _options: 0
        _batchSize: 0
           _cursor: 0x8ac65f6b679 <JS Object>#7#
            _limit: 0
          _special: 0x7f684d04161 <false>
      _numReturned: 4
            _mongo: 0x8ac65f62969 <a Mongo>#8#
       _cursorSeen: 4
       _collection: 0x8ac65f6aa81 <a DBCollection>#9#
           _fields: 0x7f684d04101 <null>
            _query: 0x8ac65f6ae99 <an Object>#10#
               _ns: 0x8ac65f6aa59 <String[14]: local.staffers>
 #4# 0x8ac65f75c81: 0x8ac65f75c81 <FixedArray[7]>
                 0: 0x8ac65f75ad9 <String[3]: _id>
                 1: 0x8ac65f75b91 <String[13]: BSONTimestamp>
                 2: 0x8ac65f75bb9 <String[4]: bool>
                 3: 0x8ac65f75bd9 <String[4]: code>
                 4: 0x8ac65f75bf9 <String[7]: pattern>
                 5: 0x8ac65f75c19 <String[7]: regexpr>
                 6: 0x8ac65f75c39 <String[14]: timestampField>
 #5# 0x7f684d47c99: 0x7f684d47c99 <JS Function>
 #6# 0x8ac65f69791: 0x8ac65f69791 <a DB>
          staffers: 0x8ac65f6aa81 <a DBCollection>#9#
             _name: 0x8ac65f695f1 <String[5]: local>
            _mongo: 0x8ac65f62969 <a Mongo>#8#
 #7# 0x8ac65f6b679: 0x8ac65f6b679 <JS Object>
 #8# 0x8ac65f62969: 0x8ac65f62969 <a Mongo>
        authStatus: 0x8ac65f68709 <an Object>#11#
           slaveOk: 0x7f684d04161 <false>
              host: 0x8ac65f62a79 <String[9]: 127.0.0.1>
 #9# 0x8ac65f6aa81: 0x8ac65f6aa81 <a DBCollection>
               _db: 0x8ac65f69791 <a DB>#6#
        _shortName: 0x57e98b50731 <String[8]: staffers>
            _mongo: 0x8ac65f62969 <a Mongo>#8#
         _fullName: 0x8ac65f6aa59 <String[14]: local.staffers>
 #10# 0x8ac65f6ae99: 0x8ac65f6ae99 <an Object>
 #11# 0x8ac65f68709: 0x8ac65f68709 <an Object>
  replSetGetStatus: 0x7f684d04161 <false>
      authRequired: 0x7f684d04141 <true>
          isMaster: 0x7f684d04141 <true>
=====================
 
Trace/breakpoint trap

Actual contents printed out using the Ruby driver:

{"_id"=>BSON::ObjectId('52b92fe2b1203730bb61097e'),
 "BSONTimestamp"=>seconds: 1297396800, increment: 2,
 "bool"=>true,
 "code"=>"",
 "pattern"=>/.*\/xy\/.*/,
 "regexpr"=><BSON::Binary:8362380>,
 "timestampField"=>2011-03-10 04:00:00 UTC}
{"_id"=>BSON::ObjectId('52b92fe2b1203730bb61097f'),
 "BSONTimestamp"=>seconds: 1302408000, increment: 2,
 "bool"=>false,
 "code"=>
  "\n  function () {\n      x = 3, y = 5, z = (x * y)+y;\n      docuement.write.ln(z);\n  }",
 "pattern"=>/.*\/xy\/.*/m,
 "regexpr"=><BSON::Binary:8361360>,
 "timestampField"=>2011-05-10 04:00:00 UTC}
{"_id"=>BSON::ObjectId('52b92fe4b1203730bb610980'),
 "BSONTimestamp"=>seconds: 1297396800, increment: 2,
 "bool"=>true,
 "code"=>"\n  function () {\n  }\n",
 "pattern"=>/.*ab.*/,
 "regexpr"=><BSON::Binary:8376760>,
 "timestampField"=>2011-03-10 04:00:00 UTC}
{"_id"=>BSON::ObjectId('52b92fe4b1203730bb610981'),
 "BSONTimestamp"=>seconds: 1305000000, increment: 2,
 "bool"=>false,
 "code"=>
  "\n  function () {\n      x = 3, y = 5, z = x + y;\n      docuement.write.ln(z);\n  }",
 "pattern"=>/.*xy.*/,
 "regexpr"=><BSON::Binary:8375780>,
 "timestampField"=>2012-02-10 04:00:00 UTC}
{"_id"=>BSON::ObjectId('52b92fe4b1203730bb610982'),
 "BSONTimestamp"=>seconds: 1297396800, increment: 2,
 "bool"=>true,
 "code"=>
  "\n  function () {\n      x = 3, y = 5, z = x * y;\n      docuement.write.ln(z);\n  }",
 "pattern"=>/.*\/xy\/.*/,
 "regexpr"=><BSON::Binary:8374820>,
 "timestampField"=>2011-03-10 04:00:00 UTC}
{"_id"=>BSON::ObjectId('52b92fe4b1203730bb610983'),
 "BSONTimestamp"=>seconds: 1302408000, increment: 2,
 "bool"=>false,
 "code"=>
  "\n  function () {\n      x = 3, y = 5, z = (x * y)+y;\n      docuement.write.ln(z);\n  }",
 "pattern"=>/.*\/xy\/.*/m,
 "regexpr"=><BSON::Binary:8372860>,
 "timestampField"=>2011-05-10 04:00:00 UTC}
{"_id"=>BSON::ObjectId('52b92fe8b1203730bb610984'),
 "BSONTimestamp"=>seconds: 1297396800, increment: 2,
 "bool"=>true,
 "code"=>"\n  function () {\n  }\n",
 "pattern"=>/.*ab.*/,
 "regexpr"=><BSON::Binary:8370620>,
 "timestampField"=>2011-03-10 04:00:00 UTC}
{"_id"=>BSON::ObjectId('52b92fe8b1203730bb610985'),
 "BSONTimestamp"=>seconds: 1305000000, increment: 2,
 "bool"=>false,
 "code"=>
  "\n  function () {\n      x = 3, y = 5, z = x + y;\n      docuement.write.ln(z);\n  }",
 "pattern"=>/.*xy.*/,
 "regexpr"=><BSON::Binary:8437120>,
 "timestampField"=>2012-02-10 04:00:00 UTC}
{"_id"=>BSON::ObjectId('52b92fe8b1203730bb610986'),
 "BSONTimestamp"=>seconds: 1297396800, increment: 2,
 "bool"=>true,
 "code"=>
  "\n  function () {\n      x = 3, y = 5, z = x * y;\n      docuement.write.ln(z);\n  }",
 "pattern"=>/.*\/xy\/.*/,
 "regexpr"=><BSON::Binary:8435860>,
 "timestampField"=>2011-03-10 04:00:00 UTC}
{"_id"=>BSON::ObjectId('52b92fe8b1203730bb610987'),
 "BSONTimestamp"=>seconds: 1302408000, increment: 2,
 "bool"=>false,
 "code"=>
  "\n  function () {\n      x = 3, y = 5, z = (x * y)+y;\n      docuement.write.ln(z);\n  }",
 "pattern"=>/.*\/xy\/.*/m,
 "regexpr"=><BSON::Binary:8434900>,
 "timestampField"=>2011-05-10 04:00:00 UTC}

Comment by rohit [ 25/Apr/14 ]

Hi ,

There are only 10 records in my Collection. I have attached dump file, please have a look.

Comment by Randolph Tan [ 24/Apr/14 ]

Hi,

How big is the collection? Can you use mongodump to dump the collection and attach it to this ticket?

Thanks!

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