I noticed while debugging another problem that eviction worker threads created on startup are often exiting immediately, and the WiredTiger doesn't notice.
The problem is that the threads are starting before WT_CONN_EVICTION_RUN is set, and the __wt_thread_create call returns success, since the thread is started and exits cleanly.
- Stop creating workers before the cache is setup.
- Update how we track running eviction workers, to be based on currently running threads, rather than the number of threads that have been started.
Reproduce this by running:
Turning on evict-server verbose logging and looking for: cache eviction thread exiting at the start of the run.