fix 'thread recovery' race with sync() by not abusing m_state.