1) Setup a replica set with 5 nodes A, B, C, D, E, primary is A
2) Artificially slaveDelay nodes B and C by 40s, and node D by 80s
3) Artificially introduce network latency such D's ping time to B and C is low but varies, and the latency from D to E is high (so E will never be chosen as a sync source)
4) Symmetrically blackhole connections from A to D, to make sure D doesn't choose the primary as a sync source initially (could be done differently, this was just easiest).
5) Start single-threaded javascript insert load on node A
The idea here is that there are three lagging nodes in the replica set, B, C, and D. Because E is 30s ahead of B and C, D will keep trying to change sync sources. However, since B and C are closer in ping time than E, E will never be chosen and the sync source changes between C and D depending on the stochastic ping delay.
This kind of problem might occur in the wild if three lagging nodes were in a separate data center, for example. Once a node falls too far behind the others, the sync swapping would push the node into permanent recovery mode (until one of the other nodes catches up).