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

runCommandWithRetries in JS test framework exceeds JS interpreter recursion limit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Backlog
    • Minor - P4
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • Replication
    • ALL
    • Execution Team 2021-11-29, Execution Team 2021-12-13, Execution Team 2022-01-24
    • 173

    Description

      In some of our CI suites, the command invocation in tests is overridden to support retries. For some multi-document passthroughs, when there is a need to retry a transaction, the runCommandWithRetries() logic in implicitly_retry_on_background_op_in_progress.js and network_error_and_txn_override.js implicitly recurses into itself with the following repeating stack of function calls. This has the potential to exceed the internal recursion limit in the JS interpreter, leading to the test terminating early.

      [multi_stmt_txn_passthrough:orp] retryEntireTransaction@jstests/libs/override_methods/network_error_and_txn_override.js:690:15
      [multi_stmt_txn_passthrough:orp] retryWithTxnOverride@jstests/libs/override_methods/network_error_and_txn_override.js:753:15
      [multi_stmt_txn_passthrough:orp] runCommandOverrideBody@jstests/libs/override_methods/network_error_and_txn_override.js:1032:23
      [multi_stmt_txn_passthrough:orp] runCommandOverride@jstests/libs/override_methods/network_error_and_txn_override.js:1101:21
      [multi_stmt_txn_passthrough:orp] overrideRunCommand/Mongo.prototype.runCommand@jstests/libs/override_methods/override_helpers.js:81:20
      [multi_stmt_txn_passthrough:orp] runCommandWithRetries/<@jstests/libs/override_methods/implicitly_retry_on_background_op_in_progress.js:58:19
      [multi_stmt_txn_passthrough:orp] assert.soon@src/mongo/shell/assert.js:366:21
      [multi_stmt_txn_passthrough:orp] runCommandWithRetries@jstests/libs/override_methods/implicitly_retry_on_background_op_in_progress.js:54:5
      [multi_stmt_txn_passthrough:orp] overrideRunCommand/Mongo.prototype.runCommand@jstests/libs/override_methods/override_helpers.js:81:20
      [multi_stmt_txn_passthrough:orp] runClientFunctionWithRetries@src/mongo/shell/session.js:371:27
      [multi_stmt_txn_passthrough:orp] runCommand@src/mongo/shell/session.js:466:25
      [multi_stmt_txn_passthrough:orp] DB.prototype._runCommandImpl@src/mongo/shell/db.js:155:12
      [multi_stmt_txn_passthrough:orp] DB.prototype.runCommand@src/mongo/shell/db.js:170:16
      [multi_stmt_txn_passthrough:orp] retryEntireTransaction@jstests/libs/override_methods/network_error_and_txn_override.js:690:15
      [multi_stmt_txn_passthrough:orp] retryWithTxnOverride@jstests/libs/override_methods/network_error_and_txn_override.js:753:15
      [multi_stmt_txn_passthrough:orp] runCommandOverrideBody@jstests/libs/override_methods/network_error_and_txn_override.js:1032:23
      [multi_stmt_txn_passthrough:orp] runCommandOverride@jstests/libs/override_methods/network_error_and_txn_override.js:1101:21
      [multi_stmt_txn_passthrough:orp] overrideRunCommand/Mongo.prototype.runCommand@jstests/libs/override_methods/override_helpers.js:81:20
      [multi_stmt_txn_passthrough:orp] runCommandWithRetries/<@jstests/libs/override_methods/implicitly_retry_on_background_op_in_progress.js:58:19
      [multi_stmt_txn_passthrough:orp] assert.soon@src/mongo/shell/assert.js:366:21
      [multi_stmt_txn_passthrough:orp] runCommandWithRetries@jstests/libs/override_methods/implicitly_retry_on_background_op_in_progress.js:54:5
      
      

      Attachments

        Issue Links

          Activity

            People

              backlog-server-repl Backlog - Replication Team
              benety.goh@mongodb.com Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: