Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java solutions to record / replay executed code in a JVM

Tags:

java

jvm

recorder

We have a bug we're trying to find that happens non-deterministically (well, it's deterministic, but we just don't know what's actually causing it) and it only happens once every couple hours.

We read a lot of network data, and we have many threads, so there's a likelihood it's from an input, race condition, or combination of both, but for the most part, unreproducible.

I'm wondering if there are any JVM recorders / replayers out there that can store everything that happened in a JVM so we can then go through it step by step and recreate the steps to the exception.

I've found one. (I'm not going to post it so people don't think I'm trying to advertise a product.), but I'm wondering if there are others, and more importantly, others that people have used, and can report that work well.

Edit to add:

I've found Replay Solutions. I've never used it, and I've never heard of it, so I don't know how good it actually is.

We use JProfiler, but I don't think it actually has support to record/replay everything.

like image 834
Reverend Gonzo Avatar asked Jul 14 '11 13:07

Reverend Gonzo


People also ask

What is JVM in Java?

JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed. JVMs are available for many hardware and software platforms (i.e. JVM is platform dependent).

What is compilation and execution in Java?

Compilation and Execution of a Java Program. Java, being a platform independent programming language, doesn’t work on one-step-compilation. Instead, it involves a two-step execution, first through an OS independent compiler; and second, in a virtual machine (JVM) which is custom-built for every operating system.

How does the JVM run the main class?

To run, the main class file (the class that contains the method main) is passed to the JVM and then goes through three main stages before the final machine code is executed. These stages are: Let us discuss all 3 stages.

What is an abstract JVM?

JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed. JVMs are available for many hardware and software platforms (i.e. JVM is platform dependent). A specification where working of Java Virtual Machine is specified.


1 Answers

I would suggest using Chronon it worked well for me, but I haven't used it extensively yet.

like image 67
Leonard Brünings Avatar answered Sep 22 '22 07:09

Leonard Brünings