We've seen this happen in this particular ON_BLOCK_EXIT, but there may be other spots in this file as well. In one observed failure, there is an initial exception being thrown during the command execution within a try/catch, and the subsequent ON_BLOCK_EXIT method throws again which results in two active exceptions. Certainly the server shouldn't crash but there's no obvious way to remove the temp collection now that the node is no longer the primary.
- is duplicated by
SERVER-35749 MapReduce throws exception within ON_BLOCK_EXIT, crashes server
SERVER-35772 Stepdown under ScopeGuard causes MapReduce to terminate when attempting to clean up temporary collections