bug with deadlock to single thread