Predicting deadlock in store-and-forward networks