Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2923

bson_oid_init returns same oid after fork()

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 1.14.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Minor Change

      An application that calls fork() in a loop and then the forked processes call bson_oid_init() will end up with the same oid if called within the same second because the implementation of bson_oid_init() uses a cached per-process random even if BSON_CONTEXT_DISABLE_PID_CACHE is set.

      Introduced by:
      https://github.com/mongodb/mongo-c-driver/commit/8130e791c2a101a38fe5551c253c7b0dda894d3a

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: