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

mongoreplay failing with a `panic: runtime error: index out of range`

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: No versions
    • Component/s: None
    • Labels:
      None
    • Case:

      Description

      $ mongoreplay play -vvv -ddd --playback-file xxx.bson --no-preprocess --no-truncate
      ...
      2020/10/15 14:35:41 Socket 0xc0001f61c0 to localhost:27017: sending 1 op(s) (190714 bytes)
      2020/10/15 14:35:41 (Connection 9) op RawOp: query
      2020/10/15 14:35:41 (Connection 10) op RawOp: message
      2020/10/15 14:35:41 (Connection 11) op RawOp: message
      2020/10/15 14:35:41 Socket 0xc0001f60e0 to localhost:27017: serializing op: &mgo.QueryOp{Collection:"admin.$cmd", Query:(*bson.Raw)(0xc001e8d4a0), Skip:0, Limit:-1, Selector:interface {}(nil), Flags:0x0, replyFunc:(mgo.replyFunc)(0x435a9b0), mode:0, Options:mgo.QueryWrapper{Query:interface {}(nil), OrderBy:interface {}(nil), Hint:interface {}(nil), Explain:false, Snapshot:false, ReadPreference:bson.D(nil), MaxScan:0, MaxTimeMS:0, Comment:""}, HasOptions:false, ServerTags:[]bson.D(nil)}
      2020/10/15 14:35:41 Socket 0xc0001f62a0 to localhost:27017: closing: Closed explicitly (abend=false)
      2020/10/15 14:35:41 (Connection 14) op RawOp: message
      panic: runtime error: index out of range
       
      goroutine 139 [running]:
      github.com/mongodb/mongo-tools/mongoreplay.(*MsgOp).getCommandName(0xc0002d0120, 0x0, 0x0, 0x0, 0x1)
      	/data/mci/fe05bde3691836bca0e4a60c44ec1a8a/src/src/mongo/gotools/src/github.com/mongodb/mongo-tools/mongoreplay/msg_op.go:393 +0x31b
      github.com/mongodb/mongo-tools/mongoreplay.(*MsgOp).FromReader(0xc0002d0120, 0x4702580, 0xc00231a210, 0x2840, 0xc0002d0720)
      	/data/mci/fe05bde3691836bca0e4a60c44ec1a8a/src/src/mongo/gotools/src/github.com/mongodb/mongo-tools/mongoreplay/msg_op.go:128 +0x268
      github.com/mongodb/mongo-tools/mongoreplay.(*RawOp).Parse(0xc0004883f0, 0x10e000, 0x36, 0x0, 0x0)
      	/data/mci/fe05bde3691836bca0e4a60c44ec1a8a/src/src/mongo/gotools/src/github.com/mongodb/mongo-tools/mongoreplay/raw_op.go:177 +0x186
      github.com/mongodb/mongo-tools/mongoreplay.(*ExecutionContext).Execute(0xc000358050, 0xc0004883f0, 0xc0001f62a0, 0xc0002e7f60, 0x2, 0x2, 0xe, 0x400767c, 0xc00037c780)
      	/data/mci/fe05bde3691836bca0e4a60c44ec1a8a/src/src/mongo/gotools/src/github.com/mongodb/mongo-tools/mongoreplay/execute.go:229 +0x42
      github.com/mongodb/mongo-tools/mongoreplay.(*ExecutionContext).newExecutionConnection.func1(0xbfda437f0fab710e, 0x1439849d, 0x4ae8f40, 0xc000358050, 0xd, 0xc000084240)
      	/data/mci/fe05bde3691836bca0e4a60c44ec1a8a/src/src/mongo/gotools/src/github.com/mongodb/mongo-tools/mongoreplay/execute.go:204 +0x3ad
      created by github.com/mongodb/mongo-tools/mongoreplay.(*ExecutionContext).newExecutionConnection
      	/data/mci/fe05bde3691836bca0e4a60c44ec1a8a/src/src/mongo/gotools/src/github.com/mongodb/mongo-tools/mongoreplay/execute.go:175 +0xb5
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            alex.bevilacqua Alex Bevilacqua
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: