This is probably a similar problem to that solved with de9de2d, but in the task scheduler instead of HTTP server (e.g. the assumption that threadGroup.join() will be called before StopXXX).
orion@lethe:~/bitcoin$ src/bitcoind
^C
^Cassertion "nThreadsServicingQueue == 0" failed: file "scheduler.cpp", line 19, function "~CScheduler"
Abort trap (core dumped)