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

Async MockStream's race in unblock

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.1.7
    • 3.1.8
    • Networking
    • None
    • Fully Compatible
    • ALL
    • Hide

      Run network_interface_asio_test with a bunch of background threads (enough to saturate the scheduler)

      Show
      Run network_interface_asio_test with a bunch of background threads (enough to saturate the scheduler)
    • Platform 9 (09/18/15)
    • 0

    Description

      AsyncMockStreamFactor::MockStream::unblock() drops its lock to unblock consuming threads. Then it re-acquires the lock before returning.

      Under enough contention, this can lead simulateServer to attempt to re-acquire a lock that has just gotten deleted if completeOperation finishes within NetworkInterfaceASIO in time.

      The solution is to avoid dropping the lock for the notify.

      Attachments

        Activity

          People

            jason.carey@mongodb.com Jason Carey
            jason.carey@mongodb.com Jason Carey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: