Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-188

Deadlock possible between BsonDefaultSerializer and BsonClassMap when classes are AutoMapped on the fly

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.1
    • 1.0
    • None
    • None

    Description

      In a heavily multithreaded environment it is possible to get a deadlock between threads when classes are AutoMapped on the fly as needed.

      Sample program to reproduce attached. Must add a 1 second sleep to BsonDefaultSerializer.LookupActualType right after the lock on staticLock is acquired to have high probability of encountering the deadlock (the deadlock can occur without the sleep but with such low probability that it would be harder to reproduce).

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: