It occurs when the property "mapreduce.task.userlog.limit.kb" is set non-zero in mapped-site.xml.
AM container syslog remains empty if any exception occurs.
In MRAppMaster.java, the following code snippets show the bug.
In the catch block, we are exiting the JVM. So finally block (therefore LogManager.shutdown()) is never executed.
Make sure LogManager.shutdown() is executed in all cases.