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 55729 - JFluid hangs when both live update and active class unloading happen
Summary: JFluid hangs when both live update and active class unloading happen
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: mishadmitriev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-01 19:26 UTC by vnicolici
Modified: 2007-02-20 18:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE stack trace during the 1 minute freeze (9.30 KB, text/plain)
2005-03-01 19:27 UTC, vnicolici
Details
Application stack trace during the 1 minute freeze (45.44 KB, text/plain)
2005-03-01 19:28 UTC, vnicolici
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vnicolici 2005-03-01 19:26:06 UTC
I'm getting "JFluid wire protocol" error when 
profiling Caucho Resin.

Steps required to reproduce:
        1. Use Windows XP Professional SP2
        2. Install the Java SDK 1.4.2_06 at 
c:\j2sdk1.4.2_06
        3. Install the Netbeans 4.0 IDE
        4. Install the m5 profiler module 
globally
        5. Obtain a copy of Resin from this 
address: http://www.caucho.com/download/resin-
3.0.8.zip .
        6. Decompress the resin-3.0.8.zip file 
to c:\
        7. Create and launch a batch file named 
start_resin_netbeans.bat in the c:\resin-3.0.8
\bin directory. The file should contain:

set PATH=c:\Program Files\NetBeans-4.0\nb4.0
\modules\profiler-ea-libs\deployed\jdk142\windows
"httpd.exe" -java_home "c:\Program 
Files\NetBeans-4.0\nb4.0\modules\profiler-ea-
vm" -Xrunprofilerinterface:"c:\Progra~1\NetBeans-
4.0\nb4.0\modules\profiler-ea-libs",5140

        8. Wait for the "JFluid: waiting for 
connection on port 5140" message, click allow if 
warned by Windows firewall
        9. From Netbeans: Profile -> Attach 
Profiler -> J2EE Web/App Server -> Running on 
Remote Computer, fill Host with localhost, click 
OK, click Analyze Memory Usage, select Record 
both object creation and garbage collection, 
click Attach
       10. Select Profile -> Get Current Results
       11. Click on Update Results Automatically
       12. Wait for the message Application
[http://localhost:8080] starting
       13. Open a web browser and access 
http://localhost:8080/ , then Click on the 
links, until the NetBeans IDE and the profiled 
application freeze
       14. Wait about one minute, then the 
profiled app will display this error:

JFluid: exception when handling command from 
client:
java.io.IOException: JFluid wire protocol error: 
code does not correspond to command or response. 
Value -1
JFluid: connection with agent closed

ide.log will show:

*** JFluid error (Tue Mar 01 21:02:13 EET 2005): 
exception when trying to send a response: 
java.net.SocketException: Socket closed

	After this error, the IDE will recover, 
and the status bar will read: Profiled 
Application Status: Stopped - Instrumentation 
Memory (liveness), xxxx classes instrumented.
Comment 1 vnicolici 2005-03-01 19:27:48 UTC
Created attachment 20599 [details]
IDE stack trace during the 1 minute freeze
Comment 2 vnicolici 2005-03-01 19:28:26 UTC
Created attachment 20601 [details]
Application stack trace during the 1 minute freeze
Comment 3 mishadmitriev 2005-03-02 01:53:49 UTC
Looks like the reason for this problem is a combination of quite a bit
of class unloading that may happen in Resin, plus results auto-update.
As a result, it looks like an equivalent of "distributed deadlock" in
profiler code may happen.

I've identified one possible solution to this problem, will send the
user a patch for testing.
Comment 4 mishadmitriev 2005-03-02 23:44:38 UTC
Fixed in M6.
Comment 5 ehucka 2006-10-09 12:08:58 UTC
Verification of old issues.
Comment 6 Alexander Kouznetsov 2007-02-12 22:59:21 UTC
Closing old issues.
Comment 7 Alexander Kouznetsov 2007-02-12 22:59:37 UTC
Closing old issues.
Comment 8 Alexander Kouznetsov 2007-02-20 18:26:45 UTC
Reverting to the original Target Milestone value changed by mistake. Sorry for
inconvenience.