The Hidden Memory Trap in Java Serialization
Details
Topic : The Hidden Memory Trap in Java Serialization
Abstract : In this session, we explore a real-world Java application crash caused by an OutOfMemoryError rooted deep within Java's serialization mechanism. We walk through the full diagnostic journey from high CPU utilization and TCP connection resets, to heap dump analysis that revealed a single ObjectOutputStream instance consuming 99.5% of the heap. The session dives into how Java's internal HandleTable silently accumulates object references during serialization loops, eventually exhausting JVM memory. We demonstrate how to reproduce the issue, confirm the fix using oos.reset(), and discuss when and how to apply it safely without breaking object reference integrity. Attendees will leave with a practical understanding of Java serialization internals, heap dump analysis techniques, and a clear pattern to recognize and resolve this class of memory issue in any Java application.
Speaker Bio : Ravi Patel, is a software developer proficient with Java and C++. He is currently working with IBM Java Runtimes Class Libray team at India software Lab. He has 4+ years of experience in software design and development. His primary focus lies in Java's orb component, alongside analyzing and debugging customer issues. He holds a master's degree in Computer Science and Engineering from IIT Dharwad.
