spurious wakeup and infinite waiting on condvar