Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEVERE [DataReaderFactory]: Failed to recognize file format. #245

Closed
adrixtacy opened this issue Aug 6, 2020 · 5 comments
Closed

SEVERE [DataReaderFactory]: Failed to recognize file format. #245

adrixtacy opened this issue Aug 6, 2020 · 5 comments
Labels

Comments

@adrixtacy
Copy link

Can you help me with this ? I am unable to parse the GC logs with this error :

INFO [DataReaderFacade]: GCViewer version 1.37-SNAPSHOT (2019-12-16T20:29:43+0000)
SEVERE [DataReaderFactory]: Failed to recognize file format.
content:
Contents

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 /Users/adrianstephen/msb/tools/GCViewer.app
java.util.concurrent.ExecutionException: com.tagtraum.perf.gcviewer.imp.DataReaderException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at javax.swing.SwingWorker.get(SwingWorker.java:602)
at com.tagtraum.perf.gcviewer.ctrl.impl.AbstractGCModelLoaderImpl.done(AbstractGCModelLoaderImpl.java:31)
at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.tagtraum.perf.gcviewer.imp.DataReaderException
at com.tagtraum.perf.gcviewer.imp.DataReaderFacade.loadModel(DataReaderFacade.java:61)
at com.tagtraum.perf.gcviewer.ctrl.impl.GCModelLoaderImpl.loadGcModel(GCModelLoaderImpl.java:29)
at com.tagtraum.perf.gcviewer.ctrl.impl.AbstractGCModelLoaderImpl.doInBackground(AbstractGCModelLoaderImpl.java:49)
at com.tagtraum.perf.gcviewer.ctrl.impl.AbstractGCModelLoaderImpl.doInBackground(AbstractGCModelLoaderImpl.java:19)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Failed to recognize file format.
at com.tagtraum.perf.gcviewer.imp.DataReaderFactory.getDataReader(DataReaderFactory.java:92)
at com.tagtraum.perf.gcviewer.imp.DataReaderFacade.readModel(DataReaderFacade.java:132)
at com.tagtraum.perf.gcviewer.imp.DataReaderFacade.loadModel(DataReaderFacade.java:68)
... 9 more

I am already using the latest version ( 1.37)

@ecki
Copy link
Contributor

ecki commented Aug 6, 2020

What JVM has produced thenGClog, what command line settings did you use and can you attach a small sample file?

@adrixtacy
Copy link
Author

Hi Ecki

This is from Jira. Here is the JVM used :

-Xlog:gc*:file=/mycloud/apps/jira/prod/logs/atlassian-jira-gc-%t.log:time,uptime:filecount=5,filesize=20M -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent

Java version :
11.0.7
AdoptOpenJDK

I've also attached a sample GC log
atlassian-jira-gc-2020-06-29_10-31-04.log

@adrixtacy
Copy link
Author

Here is another Jira instance i have locally with this JVM arguments :

<JVM-Input-Arguments>--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Djava.util.logging.config.file=/Users/adrianstephen/jira/atlassian-jira-software-8.5.4-standalone/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms384m -Xmx2048m -XX:InitialCodeCacheSize=32m -XX:ReservedCodeCacheSize=512m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory -XX:-OmitStackTraceInFastThrow -Djava.locale.providers=COMPAT -Djira.home=/Users/adrianstephen/jira-home/atlassian-jira-software-8.5.4 -Datlassian.plugins.startup.options= -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xlog:gc*:file=/Users/adrianstephen/jira/atlassian-jira-software-8.5.4-standalone/logs/atlassian-jira-gc-%t.log:time,uptime:filecount=5,filesize=20M -XX:+ExplicitGCInvokesConcurrent -Dignore.endorsed.dirs= -Dcatalina.base=/Users/adrianstephen/jira/atlassian-jira-software-8.5.4-standalone -Dcatalina.home=/Users/adrianstephen/jira/atlassian-jira-software-8.5.4-standalone -Djava.io.tmpdir=/Users/adrianstephen/jira/atlassian-jira-software-8.5.4-standalone/temp</JVM-Input-Arguments>

and sample GC file :
atlassian-jira-gc-2020-08-07_18-15-45.log

<java.version>11.0.8</java.version>
<java.vendor.version>AdoptOpenJDK</java.vendor.version>

@chewiebug
Copy link
Owner

Hi @adrixtacy

GCViewer relies for performance and complexity reasons on the presence of the "tags" and "level" information in the java unified logs generated by JDK 11 VMs (https://openjdk.java.net/jeps/158). Your logs are missing both (this part of the configuration:
-Xlog:gc*:file=/<path-to-file>:time,uptime:...).

The readme gives examples of configurations, which GCViewer at this time is able to process:

  • -Xlog:gc:file="path-to-file" (uses defaults)
  • -Xlog:gc=info:file="path-to-file":tags,uptime,level (minimum configuration needed)
  • -Xlog:gc*=trace:file="path-to-file":tags,time,uptime,level (maximum configuration supported, additional tags ok, but ignored; additional decorations will break parsing)

If you just add "tags" and "level" to your configuration, GCViewer should be able to parse your log files.

Best regards,
Jörg

PS: The "Contents" you omitted from your initial description of the error was the crucial part of the error message :-).

@adrixtacy
Copy link
Author

Thank you so much Jörg ! I can confirm it works now after adding "tags" and "level"

I have raised a bug in Atlassian's issue tracker here : https://jira.atlassian.com/browse/JRASERVER-71420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants