When I inspect the reason why emacs always hangs,I got this command ssh -o ControlPath=%C host.does.not.exist called by emacs.
Anyone who has Linux experiences may guess the reason why emacs hangs.
ssh will try to connect to host.does.not.exist,and host.does.not.exist is a valid site!!
Because this site is not running ssh server service,ssh will wait until time out.
Since emacs called ssh,it'll wait (hangs).
Tears in the debugging process,laugh in the end.
Anyone who has similar experiences may share in the comments.