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

Add check to testInternalTransactions to handle invalid input

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None
    • Cluster Scalability
    • ALL
    • 14

    Description

      A jstestfuzz generated a testInternalTransactions command that triggered a debug-only assertions (e.g. if (kDebugBuild) {crash();} ) on invalid input because lsid was improperly defined.

      {
       testInternalTransactions: 1,    
       commandInfos: [{
             dbName: dbName,
             command: {insert: collName, lsid: [{$undefined: true}]}     
       }]
      } 

      testInternalTransactions gets a commandInfos object that specifies the command to be run inside the transaction. In the processing of the command, the transaction code primes the transaction, appends relevant fields to the commandInfo(clientsession, lsid, txnNumber, etc.) and attempts to serialize the opMsg. This debug-only fassert fails while serializing the opMsg complaining of a duplicate fieldname: lsid.

      Add a check in testInternalTransactions to ensure lsid is properly defined(if present in the commandInfo) before attempting to serialize the opMsg to avoid hitting the fassert.

      Attachments

        Activity

          People

            backlog-server-cluster-scalability Backlog - Cluster Scalability
            kruti.shah@mongodb.com Kruti Shah
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: