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 107486 - Profiler failed to take snapshot for Triggered Profiling Point
Summary: Profiler failed to take snapshot for Triggered Profiling Point
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2007-06-20 18:30 UTC by Alexander Kouznetsov
Modified: 2007-09-25 16:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE output (163.08 KB, text/plain)
2007-06-20 18:31 UTC, Alexander Kouznetsov
Details
Profiled application threads dump (9.87 KB, text/plain)
2007-06-20 18:41 UTC, Alexander Kouznetsov
Details
Thread dump of profiled application (8.81 KB, text/plain)
2007-08-21 12:54 UTC, Alexander Kouznetsov
Details
Thread dump of NB (23.80 KB, text/plain)
2007-08-21 12:55 UTC, Alexander Kouznetsov
Details
Exception (945 bytes, text/plain)
2007-08-21 12:55 UTC, Alexander Kouznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kouznetsov 2007-06-20 18:30:40 UTC
Product Version: NetBeans IDE Dev (Build 200706190000, C/C++ Pack 20070619) 
Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)
org.netbeans.modules.profiler/1 [1.1.1 070618]

Performed steps:
- Created Anagram Game project
- Inserted Triggered Take Snapshot Profiling Point: reset results, used heap exceeds 5% of available memory, take every time
- Started Memory Liveness Profiling: track every 1 object allocation, record stack trace for allocation.
- On third PP hit profiled application stopped responding and became frozen.
- There were an exception in IDE output:
Exception in thread "pool-5-thread-30" java.lang.NullPointerException
        at java.io.DataOutputStream.writeUTF(DataOutputStream.java:330)
        at java.io.DataOutputStream.writeUTF(DataOutputStream.java:306)
        at com.sun.tools.profiler.results.memory.MemoryResultsSnapshot.writeToStream(MemoryResultsSnapshot.java:159)
- Confirmed to stop profiling. NetBeans wasn't harmed. Profiled application left frozen. Killed it.
Comment 1 Alexander Kouznetsov 2007-06-20 18:31:23 UTC
Created attachment 44092 [details]
IDE output
Comment 2 Alexander Kouznetsov 2007-06-20 18:41:35 UTC
Created attachment 44095 [details]
Profiled application threads dump
Comment 3 Alexander Kouznetsov 2007-06-20 18:47:10 UTC
Triggered snapshots report:
 1. hit at 19:54:40, open snapshot (hit for 6% heap usage)
 2. hit at 19:57:04, open snapshot (hit for 6% heap usage)
 3. hit at 20:00:18, no data available (hit for 6% heap usage)
Comment 4 Tomas Hurka 2007-07-18 13:12:56 UTC
I cannot reproduce it with NetBeans build 20070716,  org.netbeans.modules.profiler/1 [1.2 070717]
I followed the steps, but I have got only one PP hit. This is correct, since 5% of available memory was exceeded only once.
Comment 5 Alexander Kouznetsov 2007-07-31 14:19:54 UTC
The issue doesn't seem to be reproducible with Profiler 1.3 070725 even there are more than 3 PP hits for each run.
Comment 6 Alexander Kouznetsov 2007-08-21 12:54:04 UTC
Reproduced with 
Product Version: NetBeans IDE Dev (Build 200708200000) 
Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

Performed steps
- Created Anagram Game project
- Inserted Triggered Take Snapshot Profiling Point: reset results, used heap exceeds 5% of available memory, take every time
- Started Memory Liveness Profiling: track every 1 object allocation, record stack trace for allocation.
- Played with application until it became frozen
- IDE asked about to stop non profiled application. Declined
- Took a thread dumps of both applications
- IDE asked about to stop non profiled application second time. Confirmed
- Exception is shown in IDE:
java.util.ConcurrentModificationException
        at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
        at java.util.LinkedList$ListItr.next(LinkedList.java:696)
        at
org.netbeans.modules.profiler.ppoints.GlobalProfilingPointsProcessor.processTriggeredProfilingPoints(GlobalProfilingPointsProcessor.java:176)
- Profiled application left frozen. Killed it
Comment 7 Alexander Kouznetsov 2007-08-21 12:54:49 UTC
Created attachment 46960 [details]
Thread dump of profiled application
Comment 8 Alexander Kouznetsov 2007-08-21 12:55:17 UTC
Created attachment 46961 [details]
Thread dump of NB
Comment 9 Alexander Kouznetsov 2007-08-21 12:55:38 UTC
Created attachment 46962 [details]
Exception
Comment 10 Alexander Kouznetsov 2007-08-21 12:56:35 UTC
Profiling Point report:
  1. hit at 15:47:37, no data available (hit for 6% heap usage)
  2. hit at 15:48:05, no data available (hit for 6% heap usage)
Comment 11 Tomas Hurka 2007-08-22 16:06:57 UTC
There is a deadlock in profiled application and this is the reason why Profiler failed to take snapshot.
Comment 12 Tomas Hurka 2007-08-23 16:51:11 UTC
Deadlock fixed in trunk.
Comment 13 Alexander Kouznetsov 2007-09-25 16:28:33 UTC
Verified with
Product Version: NetBeans IDE Dev (Build 200709200000) 
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)