BugZero found this defect 86 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
3/8/2024
MongoDB Server
No affected releases provided.
8.0.0-rc0
AsioReactor allows tasks to be scheduled even while/after it is stopped. Tasks scheduled during the dropping will be drained, but those scheduled after draining is complete will just never be executed. NetworkInterfaceTL schedules work on the reactor after making it a GuaranteedExecutor, so if the above case is ever hit, an invariant will be triggered during the destruction, as the submitted task was never scheduled. See BF-31784 for more context. To fix this, we can check to see if the reactor has been stopped in AsioReactor::schedule, and if so execute the task with a cancellation status, rather than posting it to the io_context. This is similar to other existing task executors: https://github.com/10gen/mongo/blob/master/src/mongo/executor/network_interface_thread_pool.cpp#L113-L118
xgen-internal-githook commented on Fri, 8 Mar 2024 19:01:14 +0000: Author: {'name': 'James Bronsted', 'email': '32047428+jpbronsted@users.noreply.github.com', 'username': 'jpbronsted'} Message: SERVER-87037 guard against scheduling additional work after initial drain (#19397) GitOrigin-RevId: 64dca7eaed26da5ee7547e1d62be599a87678327 Branch: master https://github.com/mongodb/mongo/commit/8fc4819689899edbaf30157375b771dab8da86b6