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 82842 - Stop of Profile Main Project kills container for Web and J2ee projects
Summary: Stop of Profile Main Project kills container for Web and J2ee projects
Status: VERIFIED INVALID
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 5.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-16 22:23 UTC by Vince Kraemer
Modified: 2007-09-04 14:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vince Kraemer 2006-08-16 22:23:53 UTC
SJSAS 8.2 PE, Solaris 10, JDK 1.5.0_08

NB 5.5 daily + Profiler 5.5 Beta 2

I am doing exercise two from the profiler tutorial.

After I say Profile Main Project, the server starts and the browser opens on the
"front-page".

If I go to the run-time tab... all is well.

If I start the admin console... all is well.

Then I execute the Stop action from the Profile menu...

The AS stops responding.  The run-time tab starts showing waiting nodes.

The admin console stops working.

The web server (port 8080) stops responding....

Shouldn't "Stop" behave like Finish?

This may also be related to 74259.
Comment 1 Jiri Sedlacek 2006-08-17 09:11:33 UTC
Stopping profiling of any profiled application (not just j2ee server) is done by
calling System.exit() by profiler agent in profiled application. This is not a
"clean way" for stopping the servers and we understand that it should be done by
standard stop server action instead. However, currently there is no API for that
on the j2eeserver module side and we can't do that.

On the other side stopping the server using System.exit() worked fine till now.
For the SJSAS/GlassFish the stopping lasts ~20secs on my system. When watching
the appserv.exe process in Task Manager (Windows), it is idle for a long time
after System.exit() and after then its activity raises to ~80% CPU and the
server is then stopped in about 5secs.

When stopping the server, a modal dialog is shown telling that profiled
application finished or asking if you want to take a snapshot before finishing
it. While the dialog is opened, server JVM is still alive, Runtime tab shows
waiting nodes and console stops working (whole IDE should be inacessible due to
the modal dialog). Just for case, isn't the problem the dialog hidden somewhere
behind other window?

If the above is not the problem, please provide us IDE and server logfiles to be
able investigate more.
Comment 2 Vince Kraemer 2006-08-17 17:29:06 UTC
The user told the IDE to 'Profile Main Project', not 'Profile Server Instance'....

When I stop profiling my Main Project, I do not expect the server to System.stop().

The Profiler should un-attach and leave the server running.
Comment 3 Jiri Sedlacek 2007-01-08 13:57:36 UTC
Starting the server in profiling mode is a required part of profiling a project 
using Profile (Main) Project action, every 'Profile Main Project' means 
also 'Start server instance in profiling mode'.

The above also means that the server needs to be stopped after profiling 
session. If the profiler detaches from server and leaves it running, you won't 
be able to start profiling session again after eventual fixes unless you 
explicitely stop the server.

Note that the above behavior is not the same as for Run Project where the 
project is just compiled and deployed to already running server (and 
eventually - not necessarily - the server is started if not running).

So currently you have two possibilities:
 1/ Use Profile (Main) Project action where starting and stopping the server is 
a required part of profiling session
 2/ Use dynamic attach (Profiler 6.0 Milestone 4 and above, JDK 1.6) on already 
running server, where a detach action is available which behaves exactly as 
you've described.

Closing this issue, please create a RFE if you still think that Profile (Main) 
Project shouldn't stop the server when stopping profiling.
Comment 4 Alexander Kouznetsov 2007-09-04 14:13:25 UTC
Verified as invalid