Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-966

mongorestore fails with: BSONObj size: XXX is invalid.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 3.0.7, 3.1.9
    • Component/s: mongorestore
    • Labels:
      None
    • Environment:
      ubuntu 15.10 x64
    • v3.0

      Guys, I've seen similar issue reported in TOOLS-421 and TOOLS-435

      mongorestore fails with `Failed: restore error: medstream.articles: error restoring from dump/medstream/articles.bson: insertion error: EOF`

      In mongod log I see following message

      `2015-10-28T21:58:13.646+0000 I - [conn15] Assertion: 10334:BSONObj size: 33438546 (0x1FE3B52) is invalid. Size must be between 0 and 16793600(16MB) First element: insert: "articles"
      2015-10-28T21:58:13.690+0000 I CONTROL [conn15]
      0x1266732 0x1204cf4 0x11f08e8 0x11f099c 0x90ddab 0xb162f8 0x9638fd 0xc18b25 0xc1b340 0x8ea11d 0x12117e5 0x7f27cf35bb50 0x7f27cf0a595d
      ----- BEGIN BACKTRACE -----
      {"backtrace":[

      {"b":"400000","o":"E66732"}

      ,

      {"b":"400000","o":"E04CF4"}

      ,

      {"b":"400000","o":"DF08E8"}

      ,

      {"b":"400000","o":"DF099C"}

      ,

      {"b":"400000","o":"50DDAB"}

      ,

      {"b":"400000","o":"7162F8"}

      ,

      {"b":"400000","o":"5638FD"}

      ,

      {"b":"400000","o":"818B25"}

      ,

      {"b":"400000","o":"81B340"}

      ,

      {"b":"400000","o":"4EA11D"}

      ,

      {"b":"400000","o":"E117E5"}

      ,

      {"b":"7F27CF355000","o":"6B50"}

      ,

      {"b":"7F27CEFCA000","o":"DB95D"}

      ],"processInfo":{ "mongodbVersion" : "3.1.9", "gitVersion" : "9c317d92145a77ab582acb215b3ed41af2f1b33c", "compiledModules" : [], "uname" :

      { "sysname" : "Linux", "release" : "4.2.0-16-generic", "version" : "#19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015", "machine" : "x86_64" }

      , "somap" : [

      { "elfType" : 2, "b" : "400000", "buildId" : "E9CC1D749C51FEC578E46BC8D0223CEBCEFC2BD8" }

      ,

      { "b" : "7FFCAC196000", "elfType" : 3, "buildId" : "BC784BEAA199A23C0D47D6AC888C3DAEA5EEAA0C" }

      ,

      { "b" : "7F27D0514000", "path" : "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0", "elfType" : 3, "buildId" : "ED2B7FC51D2E7ADD0D4F1A3667E2B6ED7257663F" }

      ,

      { "b" : "7F27D011C000", "path" : "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0", "elfType" : 3, "buildId" : "7C7F328E0814F339D251A8F8C9459E50978EC254" }

      ,

      { "b" : "7F27CFF14000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3, "buildId" : "F58D5DE3E7A2989E915422BA4203FE53DBA449A0" }

      ,

      { "b" : "7F27CFD10000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3, "buildId" : "5D1CA3A3D93ED5B6C6462FFA03E787FDBE4013A3" }

      ,

      { "b" : "7F27CFA09000", "path" : "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType" : 3, "buildId" : "8711429397A5AF8B6269B867D830EDF6E0225B8D" }

      ,

      { "b" : "7F27CF787000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "buildId" : "7F58D6664571941C86B2D969701A572AD4D7BF1D" }

      ,

      { "b" : "7F27CF571000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "buildId" : "F980B1188708F8D8B5C35D185444AF4CB939AA1E" }

      ,

      { "b" : "7F27CF355000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3, "buildId" : "FEF281218797AD6AE726DD5FCEDECADD9E9F51DC" }

      ,

      { "b" : "7F27CEFCA000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "buildId" : "A745EBA2C16BA80AE1EF1A7A7B70740C2CF1B363" }

      ,

      { "b" : "7F27D0775000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "9B23F2A44CC8CA6175CBD8D64584B1C7EA5FD18C" }

      ,

      { "b" : "7F27CEDB3000", "path" : "/lib/x86_64-linux-gnu/libz.so.1", "elfType" : 3, "buildId" : "1EFEB71FD4999C2307570D673A724EA4E1D85267" }

      ] }}
      mongod(_ZN5mongo15printStackTraceERSo+0x32) [0x1266732]
      mongod(_ZN5mongo10logContextEPKc+0x134) [0x1204cf4]
      mongod(_ZN5mongo11msgassertedEiPKc+0x88) [0x11f08e8]
      mongod(+0xDF099C) [0x11f099c]
      mongod(_ZNK5mongo7BSONObj14_assertInvalidEv+0x3BB) [0x90ddab]
      mongod(_ZN5mongo9DbMessage9nextJsObjEv+0x118) [0xb162f8]
      mongod(_ZN5mongo12QueryMessageC2ERNS_9DbMessageE+0x5D) [0x9638fd]
      mongod(+0x818B25) [0xc18b25]
      mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x880) [0xc1b340]
      mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortE+0xDD) [0x8ea11d]
      mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x265) [0x12117e5]
      libpthread.so.0(+0x6B50) [0x7f27cf35bb50]
      libc.so.6(clone+0x6D) [0x7f27cf0a595d]
      ----- END BACKTRACE -----
      2015-10-28T21:58:13.693+0000 I NETWORK [conn15] AssertionException handling request, closing client connection: 10334 BSONObj size: 33438546 (0x1FE3B52) is invalid. Size must be between 0 and 16793600(16MB) First element: insert: "articles"`

      It blocks me completely form using database. I'd love to try changing `batchSize` but I cannot find where I can set while using mongorestore.

      Could you please help me ?

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            ruslan@telly.com ruslan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: