Poco::Data::SessionPool::dead() iterates over _activeSessions list and calls isGood() on sessions. This is both incorrect and bad, as sessions in this list are in use by other threads, leading to potential data races. It should iterate over _idleSessions.