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

tools with direct db access can produce corrupted output when dumping to stdout in "offline" mode (with --dbpath)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.5
    • Affects Version/s: 2.4.6
    • Component/s: Logging, Tools
    • None
    • Environment:
      Ubuntu 12.04.3 x86_64
    • ALL
    • Hide

      (see description)

      Show
      (see description)

      Some logging leaks into the dump when using mongodump with "--dbpath" and "--out -" options. For example:

      $ sudo service mongodb stop
      mongodb stop/waiting
      $ sudo -u mongodb mongodump --dbpath /var/lib/mongodb/ -d datahub -c users --out - | dd bs=1M count=10 iflag=fullblock of=users.bson
      10+0 records in
      10+0 records out
      10485760 bytes (10 MB) copied, 2.66285 s, 3.9 MB/s
      $ grep -a -F 'Wed Sep 25' users.bson 
      # here grep outputs some logging statements intermixed with bson data
      

      File users.bson is attached (it is a bunch of public data from one social network), so you can inspect it yourselves.

        1. users.bson
          10.00 MB
          Roman Kozlov

            Assignee:
            sverch Shaun Verch
            Reporter:
            power Roman Kozlov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: