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

mongodump against mongos can't send dump to standard output

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.4, 2.7.2
    • Affects Version/s: 2.6.1
    • Component/s: Tools
    • Environment:
      64 bit, wheezy
    • Linux
    • Server 2.7.2

      Issue Status as of Jun 13, 2014

      ISSUE SUMMARY
      When used against mongos, mongodump can't sent the dump data to standard output.

      USER IMPACT
      mongodump will appear to hang waiting for data and the dump will never finish.

      WORKAROUNDS
      Send the dump data to a directory instead:

      mongodump ... --out dump.dir
      

      AFFECTED VERSIONS
      The mongodump tool from MongoDB 2.6 production releases up to version 2.6.3 is affected by this issue.

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

      RESOLUTION DETAILS
      The logic mongodump uses to determine whether to query the database with "exhaust mode" was performing a read from an improperly-initialized variable. The initialization was corrected.

      Original description

      mongodump got stuck without any message. As the dump file didn't grow anymore, I had to kill the mongodump process.

      mongodump --host sx547:27017 -u admin -p XXXX --authenticationDatabase admin --db offerStore --collection offer --query '{_id:{$lte:540867465}}' -vvvvv --out - > chunk01.bson
      

      I had a look into the dumped chunk01.bson file using bsondump, which showed an error at the end. Is it because I killed mongodump or is it the reason that mongodump never terminated?

      2014-05-25T23:37:36.051+0200 Assertion failure amt == (size_t)( size - 4 ) src/mongo/tools/tool.cpp 330
      2014-05-25T23:37:36.056+0200 0x11a8571 0x114bff9 0x112fe3e 0x112234d 0x75c3cb 0x112135d 0x1124497 0x1124f32 0x7f5d905aaead 0x75bad9
       bsondump(_ZN5mongo15printStackTraceERSo+0x21) [0x11a8571]
       bsondump(_ZN5mongo10logContextEPKc+0x159) [0x114bff9]
       bsondump(_ZN5mongo12verifyFailedEPKcS1_j+0x17e) [0x112fe3e]
       bsondump(_ZN5mongo8BSONTool11processFileERKN5boost11filesystem34pathE+0x99d) [0x112234d]
       bsondump(_ZN8BSONDump5doRunEv+0x9b) [0x75c3cb]
       bsondump(_ZN5mongo8BSONTool3runEv+0x10d) [0x112135d]
       bsondump(_ZN5mongo4Tool4mainEiPPcS2_+0xb7) [0x1124497]
       bsondump(main+0x42) [0x1124f32]
       /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f5d905aaead]
       bsondump() [0x75bad9]
      assertion: 0 assertion src/mongo/tools/tool.cpp:330
      

      The same procedure using mongoexport worked well. The json file was finished within seconds:

      mongoexport --host sx547:27017 -u admin -p XXXX --authenticationDatabase admin --db offerStore --collection offer --query '{_id:{$lte:540867465}}' --out - > chunk01.json

            Assignee:
            rassi J Rassi
            Reporter:
            kay.agahd@idealo.de Kay Agahd
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: