OutOfMemoryError: Kill process or sacrifice child – causes & solutions

The 'Kill Process or sacrifice child' OutOfMemoryError occurs when memory usage exceeds available RAM, prompting the OS to terminate certain processes. A simulation using an AWS EC2 instance demonstrated this error, where a Java application and a chaotic BuggyApp exceeded memory limits. Potential solutions include increasing RAM, reducing processes, and optimizing memory use.

Chaos Engineering – Blocked Threads

This article discusses simulating thread BLOCKED states in chaos engineering using a sample program from BuggyApp. It describes how threads are blocked when attempting to acquire a lock on a synchronized method still held by another thread. It also explains diagnosing blocked threads through manual and automated approaches, including using tools like yCrash for analysis.

Chaos Engineering – Stackoverflow Error

This article discusses how to simulate and diagnose StackOverflow errors in Java. It introduces a sample program that triggers a StackOverflowError due to infinite recursion in the start() method of the StackOverflowDemo class. Both manual and automated approaches for diagnosing the error are outlined, highlighting the effectiveness of the yCrash tool for root cause analysis.

Chaos Engineering – Thread Leak

This article discusses simulating thread leaks in applications, leading to the 'java.lang.OutOfMemoryError: unable to create new native thread' error. It demonstrates a sample program that creates infinite threads, preventing them from exiting. The article also outlines manual and automated approaches to diagnose and analyze these memory issues effectively.

Chaos Engineering – Deadlock

The article discusses deadlock in multi-threaded applications, defining it as a situation where processes are blocked, each waiting for a resource held by another. It provides an analogy using trains on a shared track that can't proceed due to overlapping resource needs. Sample Java code illustrates deadlock, while troubleshooting methods are described.

Memory Leak in Java executor

The article discusses an unexpected memory leak issue caused by Java's ThreadPoolExecutor, which results in "java.lang.OutOfMemoryError". Despite executing 10 jobs with 5 worker threads, the threads remain in memory instead of being garbage collected. The solution is to call the executor's shutdown() method to properly terminate the threads after job execution.

Chaos Engineering – Simulating OutOfMemoryError

This article explores the simulation of the 'java.lang.OutOfMemoryError: Java Heap space' in Java applications. It presents a sample program that continuously adds records to a HashMap until the heap size is exceeded, causing the error. The post discusses both manual and automated approaches to troubleshoot this issue effectively.