When one machine power off during running a job ,MRAppMaster find tasks timed out on that host and then call stop container for each container concurrently.
But the IPC layer did it serially, for each call,the connection time out exception toke a few minutes to raise after 45 times reties. And AM hang for many hours to wait for stopContainer to finish.
The jstack output file shows that most threads stuck at Connection.addCall waiting for a lock object hold by Connection.setupIOstreams.
(The setupIOstreams method run slowlly becauseof connection time out during setupconnection.)