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

metrics.interim file has garbage after the bson object

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Diagnostics
    • Fully Compatible
    • ALL
    • Platform A (10/09/15)

      This causes tools that process bson files such as bsondump and support tooling to fail due to malformed bson file, best case with a sanity check error, worst case with a crash.

      > bsondump /ssd/db/r0/diagnostic.data/metrics.interim
      2015-09-15T15:07:11.098-0400	1 objects found
      2015-09-15T15:07:11.098-0400	invalid BSONSize: 138771735 bytes
      
      > bsondump /ssd/db/r0/diagnostic.data/metrics.interim
      panic: runtime error: slice bounds out of range
      
      goroutine 1 [running]:
      github.com/mongodb/mongo-tools/common/db.(*BSONSource).LoadNextInto(0xc20800a160, 0xc2080ae000, 0x1000000, 0x1000000, 0xc208038008)
      	/srv/10gen/mci-exec/mci/src/src/mongo-tools-repo/.gopath/src/github.com/mongodb/mongo-tools/common/db/bson_stream.go:98 +0x689
      github.com/mongodb/mongo-tools/common/db.(*DecodedBSONSource).Next(0xc208054040, 0x594680, 0xc20800a040, 0x8)
      	/srv/10gen/mci-exec/mci/src/src/mongo-tools-repo/.gopath/src/github.com/mongodb/mongo-tools/common/db/bson_stream.go:56 +0x59
      github.com/mongodb/mongo-tools/bsondump.(*BSONDump).JSON(0xc208054080, 0x0, 0x0, 0x0)
      	/srv/10gen/mci-exec/mci/src/src/mongo-tools-repo/.gopath/src/github.com/mongodb/mongo-tools/bsondump/bsondump.go:87 +0x281
      main.main()
      	/srv/10gen/mci-exec/mci/src/src/mongo-tools-repo/bsondump/main/bsondump.go:74 +0x8c2
      
      goroutine 5 [syscall]:
      os/signal.loop()
      	/usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
      created by os/signal.init·1
      	/usr/local/go/src/os/signal/signal_unix.go:27 +0x35
      
      goroutine 6 [chan receive]:
      github.com/mongodb/mongo-tools/common/signals.Handle()
      	/srv/10gen/mci-exec/mci/src/src/mongo-tools-repo/.gopath/src/github.com/mongodb/mongo-tools/common/signals/signals_unix.go:16 +0x209
      created by main.main
      	/srv/10gen/mci-exec/mci/src/src/mongo-tools-repo/bsondump/main/bsondump.go:14 +0x34
      

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: