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

mapReduce fails [Error: BSONElement: bad type] when jsMode set to "true"

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.4
    • Component/s: JavaScript, MapReduce
    • None
    • ALL

      When running a mapReduce job, its fails with MongoError: Error: Error: BSONElement: bad type 105 @:1:236, full stacktrace below.

      • Version from your website
      • Homebrew version and
      • Percona version

      OS: macOS 10.12.5
      Mongo version: v3.4.4
      Node Version: v7.10.0
      Node driver: 2.2.26

      I need to get this fixed.... The performance penalty of switching to jsMode false is huge...

      Thanks!

      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"10D01C000","o":"AF34B9","s":"_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE"},{"b":"10D01C000","o":"A80205","s":"_ZN5mongo10logContextEPKc"},{"b":"10D01C000","o":"A6B249","s":"_ZN5mongo23msgassertedWithLocationEiPKcS1_j"},{"b":"10D01C000","o":"2BB3C","s":"_ZNK5mongo11BSONElement4sizeEv"},{"b":"10D01C000","o":"A07C8A","s":"_ZN5mongo5mozjs8BSONInfo9enumerateEP9JSContextN2JS6HandleIP8JSObjectEERNS4_16AutoVectorRooterI4jsidEEb"},{"b":"10D01C000","o":"A21194","s":"_ZN5mongo5mozjs7smUtils9enumerateINS0_8BSONInfoEEEbP9JSContextN2JS6HandleIP8JSObjectEERNS6_16AutoVectorRooterI4jsidEEb"},{"b":"10D01C000","o":"113B3AD","s":"_ZL24EnumerateExtraPropertiesP9JSContextN2JS6HandleIP8JSObjectEEjRN7mozilla5MaybeIN2js7HashSetI4jsid12IdHashPolicyNS8_15TempAllocPolicyEEEEEPNS1_16AutoVectorRooterISA_EE"},{"b":"10D01C000","o":"1132736","s":"_ZL8SnapshotP9JSContextN2JS6HandleIP8JSObjectEEjPNS1_16AutoVectorRooterI4jsidEE"},{"b":"10D01C000","o":"10D9A6C","s":"_Z12JS_EnumerateP9JSContextN2JS6HandleIP8JSObjectEENS1_13MutableHandleIN2js15TraceableVectorI4jsidLm0ENS7_15TempAllocPolicyENS7_15DefaultGCPolicyIS9_EEEEEE"},{"b":"10D01C000","o":"A4D87B","s":"_ZN5mongo5mozjs13ObjectWrapper24WriteFieldRecursionFrameC2EP9JSContextP8JSObjectPNS_14BSONObjBuilderENS_10StringDataE"},{"b":"10D01C000","o":"A5DA72","s":"_ZN5mongo5mozjs11ValueWriter12_writeObjectEPNS_14BSONObjBuilderENS_10StringDataEPNS0_13LifetimeStackINS0_13ObjectWrapper24WriteFieldRecursionFrameELm150EEE"},{"b":"10D01C000","o":"A4D4F5","s":"_ZN5mongo5mozjs13ObjectWrapper11_writeFieldEPNS_14BSONObjBuilderENS1_3KeyEPNS0_13LifetimeStackINS1_24WriteFieldRecursionFrameELm150EEEPNS_7BSONObjE"},{"b":"10D01C000","o":"A4CF55","s":"_ZN5mongo5mozjs13ObjectWrapper6toBSONEv"},{"b":"10D01C000","o":"A41391","s":"_ZN5mongo5mozjs18NativeFunctionInfo4callEP9JSContextN2JS8CallArgsE"},{"b":"10D01C000","o":"A21935","s":"_ZN5mongo5mozjs7smUtils4callINS0_18NativeFunctionInfoEEEbP9JSContextjPN2JS5ValueE"},{"b":"0","o":"1143287D3"},{"b":"0","o":"7FFA7ACD7DA0"}],"processInfo":{ "mongodbVersion" : "3.4.4", "gitVersion" : "888390515874a9debd1b6c5d36559ca86b44babd", "compiledModules" : [], "uname" : { "sysname" : "Darwin", "release" : "16.6.0", "version" : "Darwin Kernel Version 16.6.0: Mon Apr 17 17:15:27 PDT 2017; root:xnu-3789.60.24~21/RELEASE_X86_64", "machine" : "x86_64" }, "somap" : [ { "path" : "/usr/local/bin/mongod", "machType" : 2, "b" : "10D01C000", "vmaddr" : "100000000", "buildId" : "2713B370D6F130278745456A97CDAE8C" }, { "path" : "/usr/local/opt/openssl/lib/libssl.1.0.0.dylib", "machType" : 6, "b" : "1103D4000", "vmaddr" : "0", "buildId" : "767D2AB9C4E63C9B97A972B4C93F6101" }, { "path" : "/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib", "machType" : 6, "b" : "110437000", "vmaddr" : "0", "buildId" : "CD6B7D4F24BD36D5A9441A7ACE70A7BB" }, { "path" : "/usr/lib/libSystem.B.dylib", "machType" : 6, "b" : "7FFFC469D000", "vmaddr" : "7FFF89AEE000", "buildId" : "FC9E9F133B18305CBE0A97C7843652B0" }, { "path" : "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation", "machType" : 6, "b" : "7FFFB0088000", "vmaddr" : "7FFF754D9000", "buildId" : "36385A3A60D332DBBF55C6D8931A7AA6" }, { "path" : "/System/Library/Frameworks/Security.framework/Versions/A/Security", "machType" : 6, "b" : "7FFFB6749000", "vmaddr" : "7FFF7BB9A000", "buildId" : "3F350B5661CD305E98059AF7A6151FA9" }, { "path" : "/usr/lib/libc++.1.dylib", "machType" : 6, "b" : "7FFFC4850000", "vmaddr" : "7FFF89CA1000", "buildId" : "0B43BB5DE6EB34648DE9B41AC8ED9D1C" }, { "path" : "/usr/lib/system/libcache.dylib", "machType" : 6, "b" : "7FFFC5BDE000", "vmaddr" : "7FFF8B02F000", "buildId" : "093A4DAB83853D47A350E20CB7CCF7BF" }, { "path" : "/usr/lib/system/libcommonCrypto.dylib", "machType" : 6, "b" : "7FFFC5BE3000", "vmaddr" : "7FFF8B034000", "buildId" : "BE8380C5C09D3F48A502AEBB58231067" }, { "path" : "/usr/lib/system/libcompiler_rt.dylib", "machType" : 6, "b" : "7FFFC5BEE000", "vmaddr" : "7FFF8B03F000", "buildId" : "55D47421772A32ABB5291A46C2F43B4D" }, { "path" : "/usr/lib/system/libcopyfile.dylib", "machType" : 6, "b" : "7FFFC5BF6000", "vmaddr" : "7FFF8B047000", "buildId" : "819BEA3CDF113E3DA1A15A51C5BF1961" }, { "path" : "/usr/lib/system/libcorecrypto.dylib", "machType" : 6, "b" : "7FFFC5BFF000", "vmaddr" : "7FFF8B050000", "buildId" : "8A39EE06121C3731A9E935847064B3EE" }, { "path" : "/usr/lib/system/libdispatch.dylib", "machType" : 6, "b" : "7FFFC5C83000", "vmaddr" : "7FFF8B0D4000", "buildId" : "D122E712959331CABAC44A54410BF4A0" }, { "path" : "/usr/lib/system/libdyld.dylib", "machType" : 6, "b" : "7FFFC5CB5000", "vmaddr" : "7FFF8B106000", "buildId" : "4AAC8808223A3961A780A39CD7AC9337" }, { "path" : "/usr/lib/system/libkeymgr.dylib", "machType" : 6, "b" : "7FFFC5CBB000", "vmaddr" : "7FFF8B10C000", "buildId" : "7AA011A9DC213488BF733B5B14D1FDD6" }, { "path" : "/usr/lib/system/liblaunch.dylib", "machType" : 6, "b" : "7FFFC5CC9000", "vmaddr" : "7FFF8B11A000", "buildId" : "7B223960C57134768FEC21E2C1892A9F" }, { "path" : "/usr/lib/system/libmacho.dylib", "machType" : 6, "b" : "7FFFC5CCA000", "vmaddr" : "7FFF8B11B000", "buildId" : "17D5D855F6C33B04B680E9BF02EF8AED" }, { "path" : "/usr/lib/system/libquarantine.dylib", "machType" : 6, "b" : "7FFFC5CD0000", "vmaddr" : "7FFF8B121000", "buildId" : "170593233DA23D5DAEA89C26D3D6DD3A" }, { "path" : "/usr/lib/system/libremovefile.dylib", "machType" : 6, "b" : "7FFFC5CD3000", "vmaddr" : "7FFF8B124000", "buildId" : "38D4CB9C10CD30D38B7BA515EC75FE85" }, { "path" : "/usr/lib/system/libsystem_asl.dylib", "machType" : 6, "b" : "7FFFC5CD5000", "vmaddr" : "7FFF8B126000", "buildId" : "096E42283B7C30A68B13EC909A64499A" }, { "path" : "/usr/lib/system/libsystem_blocks.dylib", "machType" : 6, "b" : "7FFFC5CEE000", "vmaddr" : "7FFF8B13F000", "buildId" : "10DC540473AB35B3A277A8AFECB476EB" }, { "path" : "/usr/lib/system/libsystem_c.dylib", "machType" : 6, "b" : "7FFFC5CEF000", "vmaddr" : "7FFF8B140000", "buildId" : "8253DEB9E4B13F7A8054C9AF221AEDC8" }, { "path" : "/usr/lib/system/libsystem_configuration.dylib", "machType" : 6, "b" : "7FFFC5D7D000", "vmaddr" : "7FFF8B1CE000", "buildId" : "D2E062894FE53282B50C60A8392AD9C0" }, { "path" : "/usr/lib/system/libsystem_coreservices.dylib", "machType" : 6, "b" : "7FFFC5D81000", "vmaddr" : "7FFF8B1D2000", "buildId" : "059FBEA2C83B320C9A6BD06D66C97564" }, { "path" : "/usr/lib/system/libsystem_coretls.dylib", "machType" : 6, "b" : "7FFFC5D85000", "vmaddr" : "7FFF8B1D6000", "buildId" : "EC6FCF07DCFB3A039CC96DD3709974C6" }, { "path" : "/usr/lib/system/libsystem_dnssd.dylib", "machType" : 6, "b" : "7FFFC5D9E000", "vmaddr" : "7FFF8B1EF000", "buildId" : "CC9602150B1B3822A13A3DDE96FA796F" }, { "path" : "/usr/lib/system/libsystem_info.dylib", "machType" : 6, "b" : "7FFFC5DA5000", "vmaddr" : "7FFF8B1F6000", "buildId" : "611DB84CBF703F928702B9F28A900920" }, { "path" : "/usr/lib/system/libsystem_kernel.dylib", "machType" : 6, "b" : "7FFFC5DCF000", "vmaddr" : "7FFF8B220000", "buildId" : "48384C6C8CC23153A2B50E290B058313" }, { "path" : "/usr/lib/system/libsystem_m.dylib", "machType" : 6, "b" : "7FFFC5DF2000", "vmaddr" : "7FFF8B243000", "buildId" : "AD4915D19CA93A9FBE862F77E37B6C04" }, { "path" : "/usr/lib/system/libsystem_malloc.dylib", "machType" : 6, "b" : "7FFFC5E3A000", "vmaddr" : "7FFF8B28B000", "buildId" : "2F0A1152C67F38EBB0E6E309F5361907" }, { "path" : "/usr/lib/system/libsystem_network.dylib", "machType" : 6, "b" : "7FFFC5E59000", "vmaddr" : "7FFF8B2AA000", "buildId" : "166C0F6E25893C60BAEA65E1AEFF5BA9" }, { "path" : "/usr/lib/system/libsystem_networkextension.dylib", "machType" : 6, "b" : "7FFFC5EB3000", "vmaddr" : "7FFF8B304000", "buildId" : "73638E906F5F3BC48D5C8054EC0AC7E8" }, { "path" : "/usr/lib/system/libsystem_notify.dylib", "machType" : 6, "b" : "7FFFC5EBD000", "vmaddr" : "7FFF8B30E000", "buildId" : "B8160190A0693B3ABDF62AA408221FAE" }, { "path" : "/usr/lib/system/libsystem_platform.dylib", "machType" : 6, "b" : "7FFFC5EC7000", "vmaddr" : "7FFF8B318000", "buildId" : "5E3EA597D4AF3E0BB459E2FA19B4F819" }, { "path" : "/usr/lib/system/libsystem_pthread.dylib", "machType" : 6, "b" : "7FFFC5ED0000", "vmaddr" : "7FFF8B321000", "buildId" : "BBB20708CD0D371A93AE08A42852EAE0" }, { "path" : "/usr/lib/system/libsystem_sandbox.dylib", "machType" : 6, "b" : "7FFFC5EDB000", "vmaddr" : "7FFF8B32C000", "buildId" : "3AA1CF1EBC7433318CA8FEC888417CBC" }, { "path" : "/usr/lib/system/libsystem_secinit.dylib", "machType" : 6, "b" : "7FFFC5EDF000", "vmaddr" : "7FFF8B330000", "buildId" : "F78B847B35653E4B98A6F7AD40392E2D" }, { "path" : "/usr/lib/system/libsystem_symptoms.dylib", "machType" : 6, "b" : "7FFFC5EE1000", "vmaddr" : "7FFF8B332000", "buildId" : "FA8033C5D78835C5BCC02954AAA7779D" }, { "path" : "/usr/lib/system/libsystem_trace.dylib", "machType" : 6, "b" : "7FFFC5EE9000", "vmaddr" : "7FFF8B33A000", "buildId" : "7D45507855833D56B90D9ED528DE5936" }, { "path" : "/usr/lib/system/libunwind.dylib", "machType" : 6, "b" : "7FFFC5EFD000", "vmaddr" : "7FFF8B34E000", "buildId" : "3D50D8A8C460334DA5192DA841102C6B" }, { "path" : "/usr/lib/system/libxpc.dylib", "machType" : 6, "b" : "7FFFC5F03000", "vmaddr" : "7FFF8B354000", "buildId" : "0ACBDB9135D13568AABF45B22D367E10" }, { "path" : "/usr/lib/libobjc.A.dylib", "machType" : 6, "b" : "7FFFC53C4000", "vmaddr" : "7FFF8A815000", "buildId" : "54CD8D1A5C983559B13A932B3D3DD338" }, { "path" : "/usr/lib/libc++abi.dylib", "machType" : 6, "b" : "7FFFC48A7000", "vmaddr" : "7FFF89CF8000", "buildId" : "3019935288BF30BD8CFF2A4FBE247523" }, { "path" : "/usr/lib/libDiagnosticMessagesClient.dylib", "machType" : 6, "b" : "7FFFC445E000", "vmaddr" : "7FFF898AF000", "buildId" : "84A04D240E603810A8C090A65E2DF61A" }, { "path" : "/usr/lib/libicucore.A.dylib", "machType" : 6, "b" : "7FFFC4E10000", "vmaddr" : "7FFF8A261000", "buildId" : "E1DB723E36603534B6DECC11AF4025FB" }, { "path" : "/usr/lib/libz.1.dylib", "machType" : 6, "b" : "7FFFC5BBE000", "vmaddr" : "7FFF8B00F000", "buildId" : "46E3FFA24328327A8D34A03E20BFFB8E" }, { "path" : "/usr/lib/libcoretls.dylib", "machType" : 6, "b" : "7FFFC48FA000", "vmaddr" : "7FFF89D4B000", "buildId" : "64B1001E10F63542A3B2C4B49F51817F" }, { "path" : "/usr/lib/libcoretls_cfhelpers.dylib", "machType" : 6, "b" : "7FFFC48FB000", "vmaddr" : "7FFF89D4C000", "buildId" : "1A10303E5EB03C7C9165021FCDFD934D" }, { "path" : "/usr/lib/libOpenScriptingUtil.dylib", "machType" : 6, "b" : "7FFFC4697000", "vmaddr" : "7FFF89AE8000", "buildId" : "90743888C1E834E3924E1A754B2B63B9" }, { "path" : "/usr/lib/libauto.dylib", "machType" : 6, "b" : "7FFFC482F000", "vmaddr" : "7FFF89C80000", "buildId" : "34388D0BC5393C1B94082BC152162E43" }, { "path" : "/usr/lib/libbsm.0.dylib", "machType" : 6, "b" : "7FFFC4830000", "vmaddr" : "7FFF89C81000", "buildId" : "20084796B04D3B35A003EA11459557A9" }, { "path" : "/usr/lib/libpam.2.dylib", "machType" : 6, "b" : "7FFFC579C000", "vmaddr" : "7FFF8ABED000", "buildId" : "71EB0D88DE843C8DA2C558AA282BC5BC" }, { "path" : "/usr/lib/libsqlite3.dylib", "machType" : 6, "b" : "7FFFC585B000", "vmaddr" : "7FFF8ACAC000", "buildId" : "5CE503A117E2341F9A621449D54EDF44" }, { "path" : "/usr/lib/libxar.1.dylib", "machType" : 6, "b" : "7FFFC5A96000", "vmaddr" : "7FFF8AEE7000", "buildId" : "69547C64E811326FBBED490C6361BDCB" }, { "path" : "/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit", "machType" : 6, "b" : "7FFFB2082000", "vmaddr" : "7FFF774D3000", "buildId" : "8945545953713641910E16A81094169F" }, { "path" : "/usr/lib/libbz2.1.0.dylib", "machType" : 6, "b" : "7FFFC4841000", "vmaddr" : "7FFF89C92000", "buildId" : "6FD3B63F0F863A25BD5BE243F58792C9" }, { "path" : "/usr/lib/libxml2.2.dylib", "machType" : 6, "b" : "7FFFC5AA4000", "vmaddr" : "7FFF8AEF5000", "buildId" : "D2A6861BD9FA3BFCB664830C3FCE6065" }, { "path" : "/usr/lib/liblzma.5.dylib", "machType" : 6, "b" : "7FFFC503D000", "vmaddr" : "7FFF8A48E000", "buildId" : "44BD027999DD36B58A6EC11432E2098D" }, { "path" : "/usr/lib/libenergytrace.dylib", "machType" : 6, "b" : "7FFFC4D07000", "vmaddr" : "7FFF8A158000", "buildId" : "A1B040A2797730979ADF34FF181EB970" }, { "path" : "/usr/lib/system/libkxld.dylib", "machType" : 6, "b" : "7FFFC5CBC000", "vmaddr" : "7FFF8B10D000", "buildId" : "F2D20015638F3398A96ABBC7630D497B" } ] }}
       mongod(_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE+0x39) [0x10db0f4b9]
       mongod(_ZN5mongo10logContextEPKc+0x185) [0x10da9c205]
       mongod(_ZN5mongo23msgassertedWithLocationEiPKcS1_j+0x2E9) [0x10da87249]
       mongod(_ZNK5mongo11BSONElement4sizeEv+0x30C) [0x10d047b3c]
       mongod(_ZN5mongo5mozjs8BSONInfo9enumerateEP9JSContextN2JS6HandleIP8JSObjectEERNS4_16AutoVectorRooterI4jsidEEb+0x17A) [0x10da23c8a]
       mongod(_ZN5mongo5mozjs7smUtils9enumerateINS0_8BSONInfoEEEbP9JSContextN2JS6HandleIP8JSObjectEERNS6_16AutoVectorRooterI4jsidEEb+0x14) [0x10da3d194]
       mongod(_ZL24EnumerateExtraPropertiesP9JSContextN2JS6HandleIP8JSObjectEEjRN7mozilla5MaybeIN2js7HashSetI4jsid12IdHashPolicyNS8_15TempAllocPolicyEEEEEPNS1_16AutoVectorRooterISA_EE+0x9D) [0x10e1573ad]
       mongod(_ZL8SnapshotP9JSContextN2JS6HandleIP8JSObjectEEjPNS1_16AutoVectorRooterI4jsidEE+0x106) [0x10e14e736]
       mongod(_Z12JS_EnumerateP9JSContextN2JS6HandleIP8JSObjectEENS1_13MutableHandleIN2js15TraceableVectorI4jsidLm0ENS7_15TempAllocPolicyENS7_15DefaultGCPolicyIS9_EEEEEE+0x7C) [0x10e0f5a6c]
       mongod(_ZN5mongo5mozjs13ObjectWrapper24WriteFieldRecursionFrameC2EP9JSContextP8JSObjectPNS_14BSONObjBuilderENS_10StringDataE+0x23B) [0x10da6987b]
       mongod(_ZN5mongo5mozjs11ValueWriter12_writeObjectEPNS_14BSONObjBuilderENS_10StringDataEPNS0_13LifetimeStackINS0_13ObjectWrapper24WriteFieldRecursionFrameELm150EEE+0x992) [0x10da79a72]
       mongod(_ZN5mongo5mozjs13ObjectWrapper11_writeFieldEPNS_14BSONObjBuilderENS1_3KeyEPNS0_13LifetimeStackINS1_24WriteFieldRecursionFrameELm150EEEPNS_7BSONObjE+0x105) [0x10da694f5]
       mongod(_ZN5mongo5mozjs13ObjectWrapper6toBSONEv+0x315) [0x10da68f55]
       mongod(_ZN5mongo5mozjs18NativeFunctionInfo4callEP9JSContextN2JS8CallArgsE+0xA1) [0x10da5d391]
       mongod(_ZN5mongo5mozjs7smUtils4callINS0_18NativeFunctionInfoEEEbP9JSContextjPN2JS5ValueE+0x35) [0x10da3d935]
       ??? [0x1143287d3]
       ??? [0x7ffa7acd7da0]
      -----  END BACKTRACE  -----
      

        1. Screenshot 2017-05-05 22.18.09.png
          Screenshot 2017-05-05 22.18.09.png
          590 kB
        2. error.json
          13 kB

            Assignee:
            mark.agarunov Mark Agarunov
            Reporter:
            sspilleman Sander Spilleman
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: