Properly shutdown RPC even in the case of `clean_shutdown=False`. (#29148)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29148
We would skip rpc.join_rpc() in the case of `clean_shutdown=False`.
This would exit the process without properly cleaning up the local RPCAgent
resulting in a crash.
As a result, to fix this we still call rpc.join_rpc() even in an unclean
shutdown. Note that, rpc.join_rpc() needs to be replaced with a local
`shutdown` call eventually since we need a way to shutdown the local RPC agent
properly.
Test Plan: waitforbuildbot
Reviewed By: xush6528
Differential Revision: D18306941
fbshipit-source-id: 2685db3924f7aa4516f3b28f58d6c127bcd55ba9