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

mongobridge data race generating random seeds

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Service Arch 2022-10-17
    • 160

      A pseudorandom number generator is accessed from multiple threads in mongobridge

      Possible fix:

           PseudoRandom makeSeededPRNG() {
               static StaticImmortal g = PseudoRandom{mongoBridgeGlobalParams.seed};
      +        static Mutex m;
      +        stdx::lock_guard lk{m};
               return PseudoRandom{g->nextInt64()};
          }
      

      Caused the BF-26584 TSAN alert.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: