[VISUALVM-503] VisualVM thread timetable don't show threads Created: 02/Apr/12  Updated: 31/Jul/12

Status: Open
Project: VisualVM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: rgonzalezsiguero Assignee: thurka
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7, Windows 2008R2



 Description   

Product Version = NetBeans IDE 7.1 (Build 201112071828)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_02
Runtime = Java HotSpot(TM) 64-Bit Server VM 22.0-b10

I hava a java application that uses threads and i would like to monitor it with
visualvm. I could connect it to visualvm and i see every tab correctly but not
the threads tab.

On it, i can't see any threads working but i can see the number of them
running.

I have also the JConsole plugin "Top threads" and there i also cannot see any
thread.

The Java version is 1.7.2 and the application uses daemon threads.

I've debugged the app and when it starts everything goes fine and i can see
thread timetable. When the first thread starts the timetable hangs and i can't
see anything else.

This is the code to create and start the threads

for (i = 0; i < 10; i++)

{ attenderThreads.add(new Attender(i)); }

for (i = 0; i < attenderThreads.size(); i++)

{ ((Attender) attenderThreads.elementAt(i)).start(); }

And this is the class Attender than extends Thread

public Attender(int _ithread)

{ setDaemon(true); ithread = _ithread; threadSuspended = true; locked = false; super.setName ("Attender "+ _ithread); }

Finally, the application works fine but i need to see the threads because
sometimes the app hangs and i don't know where it's happening.

The app is Java Console and i can make a Thread dump and i see all the threads.



 Comments   
Comment by rgonzalezsiguero [ 02/Apr/12 ]

The setDaemon (true) is mandatory. I removed just to try but the problem is the same.

I compiled with Java 6 and the problem persists.

I forgot to mention that the run method have a call to Object.wait() method and it's the time when the timetable hangs.

Comment by thurka [ 14/Jun/12 ]

I am a little bit confused - why this:

Product Version = NetBeans IDE 7.1 (Build 201112071828)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_02
Runtime = Java HotSpot(TM) 64-Bit Server VM 22.0-b10

is at the top of your description? What this has to do with NetBeans?
Can you attach your application so that we can test it?

Comment by rgonzalezsiguero [ 31/Jul/12 ]

This is what appears on About of my jvisualvm. I don't know why netbeans appears on it because i'm using JDK 7 jvisualvm. You'll find the piece of code on the description. I cannot send the whole application.

Version:

1.7.0_02 (Build 1320-110325); platform 110131-9c8b3bfb3a1e

System:

Windows 7 (6.1) Service Pack 1, amd64 64bit

Java:

1.7.0_02; Java HotSpot(TM) 64-Bit Server VM (22.0-b10, mixed mode)

Vendor:

Oracle Corporation, http://java.oracle.com/

Environment:

Cp1252; es_ES (visualvm)

Clusters:

C:\Program Files\Java\jdk1.7.0_02\lib\visualvm\platform
C:\Program Files\Java\jdk1.7.0_02\lib\visualvm\visualvm
C:\Program Files\Java\jdk1.7.0_02\lib\visualvm\profiler

Visit http://visualvm.java.net for more information. Built on NetBeans Platform.

Generated at Sun May 24 11:26:54 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.