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 93998 - Endless cycle in dynamically attached application
Summary: Endless cycle in dynamically attached application
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2007-02-02 15:25 UTC by ehucka
Modified: 2007-02-16 11:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
profiled application's threadsdump (20.73 KB, text/plain)
2007-02-02 15:26 UTC, ehucka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2007-02-02 15:25:19 UTC
NetBeans IDE Dev (Build 200701311900)
1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
Windows XP version 5.1 running on x86
Profiler 070202

I reproduced it everytime by these
steps to reproduce:

1. start AnagramGame sample project outside ide using jdk 1.6.0
2. dynamically attach to the application, use CPU profiling all classes, entire
application

Result: instrumentation of the application is started but after a while ide
throws an error the profiled application is not responding. The application is
running and it takes 100% of system resources. I had to "solve" the problem by
hard restart of machine.
Comment 1 ehucka 2007-02-02 15:26:35 UTC
Created attachment 37978 [details]
profiled application's threadsdump
Comment 2 Tomas Hurka 2007-02-02 15:32:59 UTC
I am sorry, it works fine for me. WIndows XP, JDK 1.6.0 b105. Latest profiler.
Comment 3 ehucka 2007-02-02 16:36:49 UTC
Strange, try to reproduce it twice. It seems it doesn't work when other dynamic
profiling was running in the ide before.
Comment 4 Ivan Sidorkin 2007-02-07 09:10:44 UTC
profiler build 070206
NetBeans IDE Dev (Build 200702061900)
1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
Windows XP version 5.1 running on x86

new insllation

1. start AnagramGame sample project outside ide using jdk 1.6.0
2. dynamically attach to the application, use CPU profiling all classes, entire
application

Instrumentation done, but application frozen after it
Comment 5 ehucka 2007-02-13 09:05:33 UTC
I have nothing to add. The reproduction is clear for me and the problem is 100%
reproducible. INCOMPLETE means reporter did not provide all information needed
to reproduce the issue. I guess I cannot provide more now :).
Comment 6 Jiri Sedlacek 2007-02-13 16:31:44 UTC
The important thing making the difference is starting external application 
from .jar file, not from compiled .class files. For .class files dynamic attach 
works fine, for .jar the described problem occurs.
Comment 7 Tomas Hurka 2007-02-13 16:59:02 UTC
and that is not all! You need to run it with java -jar anagrams.jar other variants like
java -jar .\anagrams.jar or java -jar dist\anagrams.jar work OK. Next time please specify your steps in 
more details. This will save us a lot of time. Many thanks to Jirka for discovering correct reproducible 
steps.
Comment 8 ehucka 2007-02-13 19:20:09 UTC
You should ask next time what dou you need to know. I can provide many other
information like my uncle's name etc. :)
The truth is it doesn't work for me with java -jar dist\anagrams.jar, java -jar
anagrams.jar, java -jar .\anagrams.jar nor java -jar <ABSOLUTE_PATH> command
line. So my hypothesis was it can be generalized to "the behaviour does not
depend on the command line format".

BTW
Sometimes (not very often) before the application is blocked there is a message
in application's log:

Exception in thread *** JFluid Monitor Thread ***
Comment 9 ehucka 2007-02-13 20:19:15 UTC
I tried the case with classes (java -cp build\classes
com.toy.anagrams.ui.Anagrams) and it does not work too. I think the problem is
that it occures always in second and another dynamic profiling not in the first
run (as I mentioned).
Comment 10 Tomas Hurka 2007-02-14 11:20:17 UTC
You are right. In some cases I am not able to reproduce it even with java -jar anagrams.jar
It is also not 100% reproducible on your machine  -> lowering priority to P2. It looks like some kind of 
timing issue.
Comment 11 Tomas Hurka 2007-02-15 17:28:46 UTC
Hopefully fixed in trunk. Please verify.
Comment 12 ehucka 2007-02-16 11:34:50 UTC
Cannot reproduce, verified
Comment 13 Tomas Hurka 2007-02-16 11:57:24 UTC
Thanks!