[SERVER-33413] nia countdownlatch misuses condvars Created: 20/Feb/18 Updated: 08/Jan/24 Resolved: 09/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mira Carey | Assignee: | Mira Carey |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Platforms 2018-03-26, Platforms 2018-04-09, Platforms 2018-04-23 |
| Participants: |
| Description |
|
Part of the testing code in network_interface_asio_test_utils.h is a countdown latch. The latch relies on releasing writes alongside a condvar by writing to an atomic and calling notify (rather than sync'ing on the mutex the condvar is waiting on). This isn't the right way to use condvars and can be re-ordered to hang forever. We should drop the atomic and always take the mutex when writing to a non-atomic |
| Comments |
| Comment by Githook User [ 09/Apr/18 ] |
|
Author: {'email': 'jcarey@argv.me', 'name': 'Jason Carey', 'username': 'hanumantmk'}Message: You have to hold the mutex that a condvar is waiting on while modifying |