It is observed that RM crashes with heap space OOM in secure cluster(http authentication is kerborse) when RM HA is enabled.
1. Start RM in HA secure mode. Lets say RM1 is active mode.
2. Run many applications so that it uses greater than 50% of heap space configured. Lets say, if heap space is 2GB, then run applications that occupy 1.5GB of heap space.
3. Switch RM to StandBy and bring back to Active! While recovering applications from state store, RM crashes with OOM.
Note : This issue will happen only when RM is started as ACTIVE directly. (not switched from standby to active during start of JVM)
Heap dump shows that RMAuthenticationFilter holds 60% heap space! And other 40% held by RMAppState which is during recovering from state store. This exceeds the heap space and crashes with OOM.