Consider two threads, one calling into NetworkInterfaceTL::cancelCommand and the other calling into NetworkInterfaceTL::shutdown.
- cancelCommand finds an inProgress command to cancel and arrives strongly at the command's finish line.
- shutdown performs the atomic exchange clearing the inProgress queue and proceeds to shut down the ASIO reactor.
- cancelCommand calls into fulfillFinalPromise for the command being cancelled, which attempts to schedule on the ASIOReactor in the future's continuation.
As a result, because of SERVER-87037, the ASIOReactor rejects the work, which hits an invariant if the work happens to be a GuaranteedExecutor (before SERVER-87037, the work would be scheduled on the ASIOReactor and either silently ignored until process end or destroyed on NITL destruction which also hits an invariant). Using GuaranteedExecutor is commonly the case with NetworkInterfaceTL.
Have NITL correctly guarantee that commands will have their final promise fulfilled prior to shutdown (as the code seems to be attempting, but failing to do today).