You cannot leave maintenance mode when the "other tasks" counter is not 0.
Calling the setMaintenance mode function will increase/decrease (true/false) that counter.
In certain versions of mongod it will segfault when that counter becomes negative.
In other versions it will simply go back into normal mode right away.
In more recent versions it will return false.