fix test_process_group_debug_info flaky test (#31533)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31533
Fixes this test that was flaky and has been disabled (see
https://github.com/pytorch/pytorch/issues/31112)
ghstack-source-id: 96038999
Test Plan: Run the test 1000 times and ensure that it passes.
Differential Revision: D19203366
fbshipit-source-id: 7978cbb8ca0989a0a370a36349cdd4db3bb8345b