psi: introduce state_mask to represent stalled psi states