fix service deadlock after failed build setup (#4506)