Buggy App is a simple java application that simulates different performance problems like Memory Leak, OutOfMemoryError, CPU spike, thread leak, StackOverflowError, deadlock, unresponsiveness, …

Using this application, you can simulate various performance problems in your environment. Here are a few use cases where Buggy App can be used: 

a. You can configure and launch Buggy App to consume high memory on the same server where your application is running. You can study under this circumstance whether your application’s SLA (Service Level Agreement) is impacted.

b. You can configure and launch Buggy App in a docker container to consume high CPU and see whether other containers on the same host are impacted or not.

c. If you are building performance tools or monitoring tools, you can simulate various performance degradations using Buggy App and see whether your tools address those performance probelms. (Infact we developed this BuggyApp to validate our root cause analysis tool yCrash behaviour.)

Download

You can download

1. Buggy App from this location
2. Source code (if it’s of interest) from this location

To run Buggy App, you will need Java 8 or above version installed.

Performance Problems 

Here are the performance problems that you can simulate through Buggy App:

1. OutOfMemoryError: Java heap space

 To generate ‘java.lang.OutOfMemoryError: Java heap space’ launch Buggy App with following arguments:

java -Xmx512m -jar buggyApp.jar PROBLEM_OOM

2. Memory Leak

 If you would like to simulate a memory leak without experiencing OutOfMemoryError, then launch Buggy App with the following arguments. 

 java -jar buggyApp.jar PROBLEM_MEMORY

 When you launch the Buggy App with these arguments, 80% – 90% of the allocated memory will be consumed. But it will not result in OutOfMemoryError.

3. CPU spike

 If you would like the CPU consumption to go up to 80 – 90% then launch the Buggy App with following arguments:

 java -jar buggyApp.jar PROBLEM_CPU

4. Thread Leak

 If you would like the application to keep slowly spawning new threads, then launch the Buggy App with the following arguments.

java -jar buggyApp.jar PROBLEM_THREADLEAK

When you launch the Buggy App with these arguments eventually  ‘java.lang.OutOfMemoryError: Unable to create new native thread’ will be generated.

5. Deadlock

 If you would like the application to experience Deadlock, then launch the Buggy App with the following arguments.

 java -jar buggyApp.jar PROBLEM_DEADLOCK

6. Stackoverflow Error

 If you would like the application to experience ‘java.lang.StackOverflowError’, then launch the Buggy App with the following arguments.

 java -jar buggyApp.jar PROBLEM_STACKOVERFLOW

7. Blocked Threads

 If you would like to put multiple threads in BLOCKED state, then launch the Buggy App with the following arguments.

 java -jar buggyApp.jar PROBLEM_BLOCKED

Processing…
Success! You're on the list.