Community
Participate
Working Groups
Build Identifier: Eclipse Memory Analyzer - RCP feature Version: 1.1.1.201108240735 Build id: 1.1.1 on HPUX JVM it is possible to have more than one Finalizer Thread. To enable multi Finalizer Threads we are using the jvm option -Djava.finalizer.threadCount=5 where "5" is the number of finalizer threads. When having more than one finalizer thread MAT, "Finalizer Overview" does not work any more. The exception is : Error: Snapshot contains multiple instances of java.lang.ref.Finalizer$FinalizerThread class. (java.lang.Exception) java.lang.Exception: Error: Snapshot contains multiple instances of java.lang.ref.Finalizer$FinalizerThread class. at org.eclipse.mat.inspections.finalizer.FinalizerThreadQuery.getFinalizerThreads1(FinalizerThreadQuery.java:80) at org.eclipse.mat.inspections.finalizer.FinalizerThreadQuery.getFinalizerThreads(FinalizerThreadQuery.java:57) at org.eclipse.mat.inspections.finalizer.FinalizerInProcessingQuery.execute(FinalizerInProcessingQuery.java:68) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.snapshot.query.SnapshotQuery.execute(SnapshotQuery.java:192) at org.eclipse.mat.inspections.finalizer.FinalizerQuery.execute(FinalizerQuery.java:38) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.ui.QueryExecution$ExecutionJob.run(QueryExecution.java:174) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Reproducible: Always Steps to Reproduce: 1. Generate a HeapDump on HPUX where the java process was running with the option -Djava.finalizer.threadCount=5 2. Open the HeapDump in MAT 3. Go to Java Basics -> Finalizer Overview
The fix is probably just to remove that check - the code does cope with multiple threads.
Created attachment 205605 [details] heap dump to reproduce the bug
First fix is to remove the check for exactly one finalizer thread. I'll also display the threads using the thread_overview query.
Fix is now available in snapshot builds.
I will test it next thursday and give you some feed back. Thank you.