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 205287

Summary: [EDT] UI becomes unresponsive when a profiled application generates significant amount of profiling data
Product: profiler Reporter: Petr Cyhelsky <cyhelsky>
Component: BaseAssignee: J Bachorik <yardus>
Status: VERIFIED FIXED    
Severity: normal CC: mmirilovic
Priority: P1    
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 183007
Attachments: stacktrace

Description Petr Cyhelsky 2011-11-18 12:04:32 UTC
Build: NetBeans IDE 7.1 RC1 (Build 201111171527)
VM: Java HotSpot(TM) Client VM, 21.0-b18, Java(TM) SE Runtime Environment, 1.7.0-b148
OS: Windows 7

Stacktrace: 
org.netbeans.lib.profiler.client.ClientUtils$TargetAppOrVMTerminated: Target JVM inactive
   at org.netbeans.lib.profiler.ProfilerClient.checkForTargetVMAlive(ProfilerClient.java:1521)
   at org.netbeans.lib.profiler.ProfilerClient.getCPUProfilingResultsSnapshot(ProfilerClient.java:492)
   at org.netbeans.modules.profiler.ResultsManager.prepareSnapshot(ResultsManager.java:694)
   at org.netbeans.modules.profiler.ResultsManager.prepareSnapshot(ResultsManager.java:669)
   at org.netbeans.modules.profiler.ResultsManager.takeSnapshot(ResultsManager.java:837)
   at org.netbeans.modules.profiler.ProfilerControlPanel2$ResultsSnippetPanel$2.run(ProfilerControlPanel2.java:771)
Comment 1 Petr Cyhelsky 2011-11-18 12:04:35 UTC
Created attachment 113312 [details]
stacktrace
Comment 2 J Bachorik 2011-11-21 14:47:04 UTC
This is a side-effect of EDT being completely hogged by the profiler CPU flat data generation. 

The profiled application generates a significant amount of profiling data and is sending it to the client for processing. A huge amount of the processing is done on EDT (mistake, but not easily fixed now) and, additionally, locks some resources required for receiving the profiling data from the target application leading to even more "data bursts" resulting in completely dead "UI".
Comment 3 J Bachorik 2011-11-21 15:02:40 UTC
Fixing the processing logic to ignore non-requested data batches for creating CPU CCT flat data.

http://hg.netbeans.org/profiler-main/rev/f48cfb1b89c5
http://hg.netbeans.org/profiler-main/rev/306357f1525c
Comment 4 Quality Engineering 2011-11-22 15:50:51 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/f48cfb1b89c5
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #205287: CPU CCT flat profile must be generated only for the requested profiling data
Comment 5 Petr Cyhelsky 2011-11-24 09:06:21 UTC
verified on:
Product Version: NetBeans IDE Dev (Build 201111230600)
Java: 1.7.0_02; Java HotSpot(TM) 64-Bit Server VM 22.0-b10
System: Linux version 2.6.38-12-generic running on amd64; UTF-8; en_US (nb)
Comment 6 Tomas Hurka 2011-11-24 10:35:54 UTC
Fix reviewed. It can be merged to release71 branch.
Comment 8 Quality Engineering 2011-11-25 06:17:33 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/243bf872ba13
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #205287: CPU CCT flat profile must be generated only for the requested profiling data
(transplanted from f48cfb1b89c5dae09367d2d4498809585621ee7f)