Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1902

Make Assertion failure JS_EncodeCharacters more verbose on log

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.2
    • Affects Version/s: 1.7.1
    • Component/s: None
    • None
    • Environment:
      Ubuntu 64 bits, MongoDB 1.7.1 from official repos, XEN Vps

      Sometimes I get an JS_EncodeCharacters error, but I can't figure out wheres the prob, I tried using printjson, but no luck.

      If the next first line could give objectid, it would help a lot.

      Wed Oct 6 15:31:42 [conn91] Aggregation.Averages Assertion failure JS_EncodeCharacters( _context , s , srclen , dst , &len) scripting/engine_spidermonkey.cpp 205
      0x538061 0x54602f 0x5fe1db 0x5f5db5 0x8ec443 0x8ff43d 0x8ec4d0 0x8ec919 0x8aa2a2 0x60732c 0x7725c9 0x7a9be8 0x7ab06a 0x609755 0x60e7cd 0x713bfa 0x71ac08 0x83f789 0x851aa0 0x7f4a0611d9ca
      /usr/bin/mongod(_ZN5mongo12sayDbContextEPKc+0xb1) [0x538061]
      /usr/bin/mongod(_ZN5mongo8assertedEPKcS1_j+0x10f) [0x54602f]
      /usr/bin/mongod(_ZN5mongo9Convertor8toStringEP8JSString+0x14b) [0x5fe1db]
      /usr/bin/mongod(ZN5mongo12native_printEP9JSContextP8JSObjectjPlS4+0x85) [0x5f5db5]
      /usr/bin/mongod(js_Invoke+0xe65) [0x8ec443]
      /usr/bin/mongod(js_Interpret+0x11433) [0x8ff43d]
      /usr/bin/mongod(js_Invoke+0xef2) [0x8ec4d0]
      /usr/bin/mongod(js_InternalInvoke+0x189) [0x8ec919]
      /usr/bin/mongod(JS_CallFunction+0x56) [0x8aa2a2]
      /usr/bin/mongod(_ZN5mongo7SMScope6invokeEP10JSFunctionRKNS_7BSONObjEib+0x2ec) [0x60732c]
      /usr/bin/mongod(_ZN5mongo2mr16MapReduceCommand3runERKSsRNS_7BSONObjERSsRNS_14BSONObjBuilderEb+0x6b9) [0x7725c9]
      /usr/bin/mongod(_ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x598) [0x7a9be8]
      /usr/bin/mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_10BufBuilderERNS_14BSONObjBuilderEbi+0x7ca) [0x7ab06a]
      /usr/bin/mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_10BufBuilderERNS_14BSONObjBuilderEbi+0x35) [0x609755]
      /usr/bin/mongod(ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1+0x2ddd) [0x60e7cd]
      /usr/bin/mongod() [0x713bfa]
      /usr/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_8SockAddrE+0x1368) [0x71ac08]
      /usr/bin/mongod(_ZN5mongo10connThreadEPNS_13MessagingPortE+0x299) [0x83f789]
      /usr/bin/mongod(thread_proxy+0x80) [0x851aa0]
      /lib/libpthread.so.0(+0x69ca) [0x7f4a0611d9ca]
      Wed Oct 6 15:31:42 [conn91] mr failed, removing collection
      Wed Oct 6 15:31:42 [conn91] run command Aggregation.$cmd

      { drop: "tmp.mr.mapreduce_1286371749_32" }

      Wed Oct 6 15:31:42 [conn91] CMD: drop Aggregation.tmp.mr.mapreduce_1286371749_32
      Wed Oct 6 15:31:42 [conn91] query Aggregation.$cmd ntoreturn:1 command:

      { drop: "tmp.mr.mapreduce_1286371749_32" }

      reslen:78 0ms
      Wed Oct 6 15:31:42 [conn91] run command Aggregation.$cmd

      { drop: "tmp.mr.mapreduce_1286371749_32_inc" }

      Wed Oct 6 15:31:42 [conn91] CMD: drop Aggregation.tmp.mr.mapreduce_1286371749_32_inc
      Wed Oct 6 15:31:42 [conn91] dropCollection: Aggregation.tmp.mr.mapreduce_1286371749_32_inc
      Wed Oct 6 15:31:42 [conn91] dropIndexes done
      Wed Oct 6 15:31:42 [conn91] query Aggergation.$cmd ntoreturn:1 command:

      { drop: "tmp.mr.mapreduce_1286371749_32_inc" }

      reslen:109 0ms
      Wed Oct 6 15:31:42 [conn91] query Aggregation.$cmd ntoreturn:1 assertion command: { mapreduce: "Averages", map: CodeWScope( function () { printjson(this); emit(this.keyword,

      { count:this.count, pos:this.pos, recs: 1 }

      ); }, {}), reduce: CodeWScope(
      function (key, values) {
      var ret =

      { count:0, pos:0,recs:0 }

      ;
      for ( var i = 0; i < values.length; i ++ )

      { ret.count+= values[i].count; ret.pos += values[i].pos; ret.recs += values[i].recs }

      return ret;
      }
      , {}), finalize: CodeWScope( function (key, out)

      { out.pos = out.pos / out.recs; return out; }

      , {}), query: [ { country: "ES", date:

      { $gte: "2010-09-15", $lte: "2010-09-16" }

      } ] } reslen:149 152328ms
      Wed Oct 6 15:31:42 [conn91] end connection 109.123.107.237:60076
      Wed Oct 6 15:31:50 [conn38] running multiple plans

            Assignee:
            tonyh Tony Hannan
            Reporter:
            amesas@gmail.com Alberto
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: