Very much so. If the state of a session is not CON_IDLE, it means an active thread is using it as its session context. If we delete such a session, the thread that is holding it will segfault.
So what we're looking at here, if we are seeing a surplus of sessions that have kill_me set and are not in CON_IDLE, is one of two things:
1. We missed a setting somewhere and it's not cleaning up properly; or
2. (more likely) A session is stuck waiting for some network event to complete
So for those sessions, the question to ask is "What thread is attached to this session, and what is it waiting for?"
As you've undoubtedly seen, worker_thread() in session.c is the lifeblood of the server. If there's a problem in there, it's quite fundamental and we should absolutely fix it.
