This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 102034 - Time out while trying to profile web app. on Tomcat
Summary: Time out while trying to profile web app. on Tomcat
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-20 23:17 UTC by _ gsporar
Modified: 2007-11-02 02:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE messages.log file (31.80 KB, text/plain)
2007-04-20 23:18 UTC, _ gsporar
Details
thread dump from tomcat (6.65 KB, text/plain)
2007-04-20 23:19 UTC, _ gsporar
Details
NetBeans IDE thread dump (30.06 KB, text/plain)
2007-04-20 23:19 UTC, _ gsporar
Details
sample project (19.92 KB, application/x-compressed)
2007-04-20 23:23 UTC, _ gsporar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gsporar 2007-04-20 23:17:00 UTC
I filed http://www.netbeans.org/issues/show_bug.cgi?id=99600 and we closed it as
a dup. of the problem with the live results window.

I am still seeing the same behavior, even when the live results window is *not*
open (the Profiler's VM Telemetry Overview *is* open, but it does not have focus
- all I can see is its tab).  The problem is difficult to reproduce
consistently, but the series of events is always the same: Tomcat gets started
but then for some reason the Profiler is unable to connect to it and eventually
reports a timeout.  This is from the tab in the Output window of the IDE:

profile-j2ee:
start-profiled-server-noenv:
Starting server Tomcat 5.5 in profile mode
Starting Tomcat in profile mode
Waiting for Tomcat...
Tomcat server started.
Server is ready waiting for profiler to attach...
Profiler attached, waiting for the server to start up...
F:\projects\bof\LeakingWebApplication\nbproject\profiler-build-impl.xml:19: The
following error occurred while executing this line:
F:\projects\bof\LeakingWebApplication\nbproject\profiler-build-impl.xml:31:
Starting of server in profile mode timed-out after 300 secs.
BUILD FAILED (total time: 5 minutes 5 seconds)

-------

Meanwhile, over in the Tomcat 5.5 tab of the Output window, there is this:

Using CATALINA_BASE:  
F:\tools\windows\dev\netbeans\6.0\Milestone\8\userdir\apache-tomcat-5.5.17_base
Using CATALINA_HOME:  
F:\tools\windows\dev\netbeans\6.0\Milestone\8\netbeans\enterprise4\apache-tomcat-5.5.17
Using CATALINA_TMPDIR:
F:\tools\windows\dev\netbeans\6.0\Milestone\8\userdir\apache-tomcat-5.5.17_base\temp
Using JRE_HOME:        C:\tools\dev\java\jdk1.6.0_01
Profiler Agent: Waiting for connection on port 5140 (Protocol version: 6)
Profiler Agent: Established local connection with the tool

--------

The IDE also displays a dialog box that says:

The profiled application does not respond.  Do you want to close the connection
and stop profiling?

------

With the latest daily build (2007-04-19) I am also getting this displayed in the
IDE after I dismiss the "do you want to stop profiling" dialog:

java.lang.IllegalStateException: zip file closed

The stack trace for it is in the message.log file, which I will attach along
with the thread dumps for both Tomcat and NetBeans.

For this particular occurrence, the problem actually happened on the *first*
time I attempted to profile my application.  This was immediately after doing
the following:

1. Restarting Windows
2. Restarting the IDE

This is a bit more painful than usual - usually I am able to profile
successfully at least once before hitting this problem.

I will attach the project.  I can usually get the problem to reproduce if I do
the following:

1. Profile Project - choose memory profiling.  Record stack traces and use
profiling points (I have a reset results point set), track every 10 objects.

2. After the application starts, display the live results and the VM Telemetry
overview.

3. Take a snapshot

4. Stop profiling

5. Close the snapshot and live results windows, but do not close the VM
Telemetry overview.

6. Attempt to repeat, starting at step 1.

Should I try using JDK 5 instead?  Could that be part of the problem?

If you guys cannot reproduce, then we can do a VNC session if you want to see it
in action on my machine.
Comment 1 _ gsporar 2007-04-20 23:18:09 UTC
Created attachment 41379 [details]
IDE messages.log file
Comment 2 _ gsporar 2007-04-20 23:19:21 UTC
Created attachment 41380 [details]
thread dump from tomcat
Comment 3 _ gsporar 2007-04-20 23:19:57 UTC
Created attachment 41381 [details]
NetBeans IDE thread dump
Comment 4 _ gsporar 2007-04-20 23:23:20 UTC
Created attachment 41382 [details]
sample project
Comment 5 Tomas Hurka 2007-04-23 08:42:34 UTC
You are right, there is a bug that live results are refreshed even if it is closed and if there is no Profiling 
Point. 
Comment 6 J Bachorik 2007-04-23 09:24:17 UTC
fixed in trunk - no refreshing takes place when there are no PPs defined
Comment 7 Alexander Kouznetsov 2007-09-13 07:50:56 UTC
Gregg, could you please verify this issue?
Comment 8 _ gsporar 2007-11-02 02:18:00 UTC
Works for me.  Changing to VERIFIED