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

unittest::Test::stopCapturingLogMessages has a sometimes fatal race condition

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.5
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • Fully Compatible
    • ALL
    • Sharding 5 06/26/16
    • 0

      The unittest framework offers a facility for capturing log lines for analysis. That framework is not thread safe. The contract for appenders in the logging system is that they must be internally synchronized, and furthermore, the process of attaching and detaching appenders must be externally synchronized.

      Tests that use this facility and also launch multiple threads can crash if the log capture process is disabled while logging is happening, or if several threads are logging at once. Both of these problems should be mitigated.

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: