Fix the bug there threads that are waiting for state init never stops waiting if there is an exception

RB=188507
a=dhoa