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

CollectionClonerRenamedBeforeStartTest should not reference client object that has already been destroyed

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Replication
    • ALL
    • 13

      In the CollectionClonerRenamedBeforeStartTest tests, we will initially call the setUpVerifyCollectionWasDroppedTest method. This method will first set an error code to return for the initial collection cloner query. Later on, it then resumes the query which was initially paused. This just lets the query inside the collection cloner continue (and, in this case, return an error). If runQuery receives an error on its initial request, it will then try to start up the collection drop verifier. We start up the verifier but don't wait on it to finish, so we will then just return. This causes us to execute this ON_BLOCK_EXIT block and destroy the client. This is a problem, since this client object is the same one we hold a reference to in the test fixture. If we subsequently try to call waitForResumedQuery on that client object, it will have been destroyed by that point i.e. we are referencing freed memory.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            william.schultz@mongodb.com William Schultz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: