0

We are experiencing random freezes in our java client program. The reproduction of the freeze has been elusive, but I have been able to attach visualVM to a running instance in that condition. Unfortunately that version was obsfucated but the stacktrace gave enough information to see that the AWT-Thread was waiting for unreasonably long time on the method call for PrintStream.write() after a call to log4j. We do not observe overly large logfiles that would suggest that there is too much output, and the output that makes it to the file or console is not helpful.

The following image shows the call hierarchy up to the point where the EDT-Thread is locked. I have searched the interwebs for deadlock-bugs regarding log4j. Most of the known issues seem to have been resolved in earlier versions of java (I use JAVA_VERSION="11.0.16.1").

I ask for any hints as to what may cause an error like this or any method of how to identify the issue further.

Simple debugging has not helped me narrow the problem down. I usually rely on debugging and log outputs, both methods seem to be ill fitted to find the underlying error.

call hierarchy up to locked position of EDT thread (visualVM)

MPIchael
  • 176
  • 7
  • Only the `ConsoleAppender` uses `CloseShieldOutputStream` and `PrintStream`. You should look into that. Check also [this question](https://stackoverflow.com/q/16983372/11748454). – Piotr P. Karwasz Oct 21 '22 at 15:02

0 Answers0