This was originally found by running the bestbuy aggregation workload against a sharded cluster (see attached BF ticket), but also reproduces with a local setup outside of DSI. The consistently reproducing test case does the following:
1. Setup 3-node sharded cluster with a single mongos
2. Presplit the data according to what is done here
2. Shard the collection and move chunks to ensure each shard has at least one chunk
3. Insert 200 documents (exact number probably doesn't matter) near each split point
4. Run an aggregate command with the following pipeline: [{$match: {type: "Music"}}, {$limit: 100}] in a loop
The cursor leak typically occurs within 30 seconds of starting the test. It's important to note that the issue does not reproduce when setting the parameter internalQueryProhibitMergingOnMongoS, thus indicating that it appears to be a regression related to aggregation's merging on mongos.