[SERVER-48346] Fix lifetime issues for barriers captured by reference Created: 21/May/20 Updated: 29/Oct/23 Resolved: 02/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.8, 4.4.0-rc8, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Amirsaman Memaripour | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.4, v4.2
|
||||||||
| Sprint: | Service arch 2020-06-01, Service arch 2020-06-15 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
We have instances in unit-tests, where we create a barrier, create a lambda that captures the barrier by reference, and then move the lambda to be executed by a separate thread (e.g., this one). In some cases, the barrier can go out of scope and freed, while the other thread is yet to finish the execution of the lambda. This incidents could sporadically cause access violation failures in unit-tests. |
| Comments |
| Comment by Githook User [ 02/Jun/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: Extends the lifetime of barriers that are referenced by background (cherry picked from commit 3b7bc03a8f8b964769ff708674163b67ddd1a450) |
| Comment by Githook User [ 02/Jun/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: Extends the lifetime of barriers that are referenced by background (cherry picked from commit 3b7bc03a8f8b964769ff708674163b67ddd1a450) |
| Comment by Githook User [ 02/Jun/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: Extends the lifetime of barriers that are referenced by background |