[CDRIVER-2923] bson_oid_init returns same oid after fork() Created: 11/Jan/19 Updated: 28/Oct/23 Resolved: 31/Jan/19 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.14.0 |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Henrik Edin | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||
| Description |
|
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: |
| Comments |
| Comment by Githook User [ 31/Jan/19 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message: |
| Comment by Githook User [ 15/Jan/19 ] |
|
Author: {'username': 'kevinAlbs', 'email': 'kevin.albertson@mongodb.com', 'name': 'Kevin Albertson'}Message: |
| Comment by Githook User [ 15/Jan/19 ] |
|
Author: {'username': 'kevinAlbs', 'email': 'kevin.albertson@mongodb.com', 'name': 'Kevin Albertson'}Message: |
| Comment by Githook User [ 15/Jan/19 ] |
|
Author: {'username': 'kevinAlbs', 'email': 'kevin.albertson@mongodb.com', 'name': 'Kevin Albertson'}Message: The random five bytes in oid generation should be machine and |