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 96459 - netbeans IDE hangs and cpu usage is high
Summary: netbeans IDE hangs and cpu usage is high
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-02-23 15:56 UTC by vijaybr
Modified: 2008-12-22 12:02 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread Dump file (6.80 KB, application/octet-stream)
2007-02-26 08:10 UTC, vijaybr
Details
/var/log/messages.log - Compressed file (.Z) (133.18 KB, application/x-compressed)
2007-02-26 13:10 UTC, vijaybr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vijaybr 2007-02-23 15:56:21 UTC
when I launch Netbeans IDE from solaris system (5.10)) it hangs after 1 or 2
minutes. netbeans editor hangs doesnt respond to any clicks or scroll of files etc..

what i see from 'prstat' is  java process which starts with Netbeans uses lot of
cpu . below see ouput of prstat command

19111 vijaybr  409M  274M sleep   59    0   0:02:12  48% java/25

here cpu usage is 48%. i observed after load file in editor (alt-shift-O) and do
scroll or search etc cpu usage is increasing drastically..

,
my environment is 
I export display to my  SUN ray terminal from solaris server (sun fire v240) .

and i see 
 Exception in thread "AWT-Motif" Exception in thread "AWT-Motif" on shell where
netbeans is launched.

can anyone help on this?
i am not running any java apps. on server where netbeans runs. and
this is happening so frequently i have to kill all netbeans process each time
and start again.



net
Comment 1 Jan Lahoda 2007-02-23 16:46:07 UTC
Hi,
    could you please generate a few thread dumps when this situation occurs and
attach them altogether with your $userdir/var/log/messages.log to this issue?

How big is your project and your source files?

How to generate thread dump:
http://qa.netbeans.org/bugzilla/generating-thread-dumps.html

Thanks.
Comment 2 vijaybr 2007-02-26 08:10:14 UTC
Created attachment 38894 [details]
Thread Dump file
Comment 3 vijaybr 2007-02-26 08:21:01 UTC
hi
i have attached thread dump for java process of Netbeans.

my application have seven projects each around 350 files.


thanks
Comment 4 _ rkubacki 2007-02-26 09:43:32 UTC
This is the first released version of JDK1.5.0 and according to thread dump it
is possible that the runtime is waiting in code performing clipboard
synchronization.
I suggest to upgrade to latest update release of JDK.

Is it really NetBeans 5.5? Can you attach message.log file too (preffereably as
text rather than octet-stream).
Comment 5 vijaybr 2007-02-26 11:33:35 UTC
rkubacki,
i am using Netbeans 5.5 . I will upgrade to latest of JDK1.5 pack and check .
where can I find message.log in solaris 10?
you mean syslog under /var/log?


Thanks

Comment 6 vijaybr 2007-02-26 13:10:27 UTC
Created attachment 38903 [details]
/var/log/messages.log - Compressed file (.Z)
Comment 7 vijaybr 2007-02-26 13:13:36 UTC
hi,
 found messages.log file ($home/.netbeans/var/log) .
the file is too big to attach even after doing compress.(its 5mb after compress)
i have split the file and compressed and attached last one.
please let me know if this is ok.

thanks,
Vijaybr
Comment 8 _ rkubacki 2007-02-27 09:51:30 UTC
Thanks, this can be enough. It seems that the IDE gets into bad state where
visualization of some error causes another errors leading to high CPU usage and
also causing some memory leak (the end of attached log file shows some
OutOfMemoryErrors).

*********** Exception occurred ************ at 1:13 PM on Feb 26, 2007
java.lang.IllegalStateException: Timer already cancelled.
 java.util.Timer.sched(Timer.java:354)
 java.util.Timer.schedule(Timer.java:170)
 org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:559)
 org.netbeans.core.FlashingIcon$Timer.run(FlashingIcon.java:201)
 org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
 org.netbeans.core.FlashingIcon.startFlashing(FlashingIcon.java:85)
 org.netbeans.core.NotifyException$2.run(NotifyException.java:240)
 java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
 java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
[catch]
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
 java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
 java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
 java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
 java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 9 Stanislav Aubrecht 2007-02-27 10:27:47 UTC
fixed in trunk

/cvs/core/src/org/netbeans/core/FlashingIcon.java,v  <--  FlashingIcon.java
new revision: 1.6; previous revision: 1.5
Comment 10 vijaybr 2007-02-28 12:12:04 UTC
hi,
After upgrading to JDK 1.5.0_11 . I didnt see this issue.
CPU usage less than 1%

Thanks