Dist.init_process_group get stuck after dist.destroy_process_group()

Hi, everyone. I found dist.init_process_group() hang after dist.destroy_process_group().

How to solve this problem?

Here is my test code:

world_size = int(os.environ.get("WORLD_SIZE", "1"))
rank = int(os.environ.get("RANK", "0"))
dist.init_process_group(
    backend="nccl",
    init_method="env://",
    world_size=world_size,
    rank=rank,
)
dist.destroy_process_group()
print("destroy finish")
dist.init_process_group(    ## get stuck here
    backend="nccl",
    init_method="env://",
    world_size=world_size,
    rank=rank,
)
dist.destroy_process_group()