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

bsondump reports ambigous error for document size 0

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 3.0.0
    • Affects Version/s: Legacy C++ Implementation
    • Component/s: bsondump
    • None
    • Environment:
      Linux tabitha 4.1.6-201.fc22.x86_64 #1 SMP Fri Sep 4 17:49:24 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    • v2.6

      bsondump -vvvvv report.bson
      file size: 32770
      INVALID OBJECT - going to try and print out
      size: 32770
      error: bson length doesn't match what we found in object with unknown _id
      ...
      object up to error: { iwrite: 1, database: [ 0 ], sections: { groups:
      assertion: 10334 BSONObj size: 0 (0x0) is invalid. Size must be between 0 and 16793600(16MB) First element: EOO

      Assertion about says size must be between 0 and 16MB. The size of the
      document is 0. So, if 0 is not valid, then the message is invalid. Otherwise, there is a bug in parsing the BSON.

      Workaround was not to dump object to file if it is 0.

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

              Created:
              Updated:
              Resolved: