Using eclipse Memory Analyzer(MAT) in batch mode and stuck at a subtask

103 Views Asked by At

I'm using batch mode to analyze an hprof file, but I'm encountering an issue. I am using JDK 8, MAT version 1.11.0 (I have downloaded versions 1.12.0 and later, but they indicate that JDK 8 is not supported), and I am on macOS (Intel).

Initially, MAT reported an error saying "Failed to create the Java Virtual Machine". I added the JDK path to the MemoryAnalyzer.ini file, which allowed it to open successfully. It works fine when I use the GUI to analyze dump files.

However, what I actually need is to use the batch mode. I copied "ParseHeapDump.sh" to "mat.app/Contents/MacOS/" and ran the commands mentioned in the documentation at https://help.eclipse.org/2023-03/index.jsp?topic=/org.eclipse.mat.ui.help/tasks/batch.html. When I use "org.eclipse.mat.api:suspects" or "org.eclipse.mat.api:overview," the output shows that I'm stuck at the subtask "Test 'Biggest Objects (Overview)' of section 'Top Consumers'". Similarly, when I use "org.eclipse.mat.api:top_components," it gets stuck at the subtask "Test 'Distribution' of section 'Overview'". The process cannot be interrupted by Ctrl+C, and I have to kill it or quit the app.

Furthermore, when I use "org.eclipse.mat.api:query," it runs successfully, but I cannot find the retained size in the result. Therefore, I need to find a way to run the aforementioned commands.

Additionally, the size of the dump file is less than 10MB, so it does not seem to be a memory size issue.

Could you please help me solve this problem? Thank you!

0

There are 0 best solutions below