chewiebug / GCViewer

Fork of tagtraum industries' GCViewer. Tagtraum stopped development in 2008, I aim to improve support for Sun's / Oracle's java 1.6+ garbage collector logs (including G1 collector)
https://github.com/chewiebug/GCViewer/wiki
Other
4.46k stars 978 forks source link

Parse problem for Java 11 Unified GC logging format #251

Open mikrame opened 3 years ago

mikrame commented 3 years ago

Hello, There is obviously a parsing problem for Unified GC logging format. Error occurs at a logfile-line looking completely equal to one already parsed succesfully. Message: INFO [DataReaderFacade]: GCViewer version 1.37-SNAPSHOT (2021-01-10T13:35:38+0000) SEVERE [DataReaderFactory]: Failed to recognize file format. [...] gc_problem.log

WARNING [DataReaderFacade]: Failed to read file. java.io.IOException: Failed to recognize file format. Failed to recognize file format. WARNING [AbstractGCModelLoaderImpl]: Failed to create GCModel from C:\MKData\JIRA\ASR_Server\GC_Logs\gc_problem.log java.util.concurrent.ExecutionException: com.tagtraum.perf.gcviewer.imp.DataReaderException at java.base/java.util.concurrent.FutureTask.report(Unknown Source)

Used environment:

Any help is welcome.

chewiebug commented 3 years ago

Hi,

Ther is obviously someone, who does not read readme files :-)! If you'd read it, it would state "some support" for the unified GC logging format:

For better understanding of "tags" and "decorations", please see https://openjdk.java.net/jeps/158. Tags and level are crucial for the parser, because the wealth of information, that can be logged by a gc implementation is huge. Tags and level allow the parser to easily filter lines, that it does not understand. Before the introduction of the java unified gc logging format, a much harder to understand and implement guessing mechanism had to be used.

GCViewer has a built in file format detection mechanism. That's just where the failure is in your example ("Failed to recognize file format"). For detection of the java unified gc logging format, GCViewer expects the string "][gc" to be present in the log file.

Best regards Jörg