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

NetworkInterfaceMock hangs at shutdown if currentlyRunning = network

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 3.1.1
    • Replication
    • None
    • Replication
    • ALL
    • Hide

      Throw an exception after calling enterNetwork() in a test fixture run in the unittest framework.

      Show
      Throw an exception after calling enterNetwork() in a test fixture run in the unittest framework.

    Description

      If a unittest ASSERT fails after a call to enterNetwork() but before a call to exitNetwork(), the process may hang. This is because the ReplicationExecutor shutdown logic does not handle the case where all the work and event items are drained with "Cancelled" status, but the state of the NetworkInterfaceMock is still waiting for a simulated network thread to finish running.
      This can be fixed by ensuring exitNetwork() is called via any exit path (using ScopeGuard, for example), but it might be more convenient to make improvements to NetworkInterfaceMock to avoid such hangs.

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: