Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 36109 - Prolonged heavy CPU usage after start up
Summary: Prolonged heavy CPU usage after start up
Status: RESOLVED DUPLICATE of bug 36698
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux-GTK
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 35872 36677 36925 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-06 04:09 EDT by Xavier Cho CLA
Modified: 2003-07-07 11:29 EDT (History)
3 users (show)

See Also:


Attachments
Stacktrace of java process (4.21 KB, text/plain)
2003-04-07 11:56 EDT, Xavier Cho CLA
no flags Details
Eclipse stack trace (6.37 KB, text/plain)
2003-04-15 21:45 EDT, Dave CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Cho CLA 2003-04-06 04:09:25 EDT
When I launch Eclipse, cpu usage goes up to 99% and never drops. When I change
to other perspectives it drops to 0%, but when changed back to Java perspective
it goes up again. Normally it would drop to 0% after I change perspectives
repeatedly.

I'm using GTK2 version of Eclipse on RedHat beta(phoebe)/GNOME 2.2.

Could you fix this problem please? Thanks.
Comment 1 John Arthorne CLA 2003-04-07 11:44:22 EDT
Can you attach a java dump file from the time when the cpu is busy?  You can
capture this with "kill -3 <pid>" where <pid> is the process of the java VM.
Without a trace we have no idea where the time is going.
Comment 2 Xavier Cho CLA 2003-04-07 11:56:21 EDT
Created attachment 4484 [details]
Stacktrace of java process
Comment 3 John Arthorne CLA 2003-04-08 14:15:29 EDT
Seems to be spinning the event loop.  Moving to SWT for futher investigation. I
noticed you're running on Blackdown... it would be interesting to know if you
get the same behaviour with a Sun or IBM VM.
Comment 4 Xavier Cho CLA 2003-04-08 20:57:06 EDT
I haven't tested with IBM's but have exprienced the same lock ups with Sun's
JVM. However, those lock ups seem to change from version to version(or time to
time) since somethimes it makes IDE completely unusable, and other times it only
eats up CPU cycles.
Comment 5 Luis Alves CLA 2003-04-13 04:43:27 EDT
I have the same problem using sun jdk or ibm jdk.
When in java view sometimes eclipse just use 100% cpu and never stops
until i change view. stop times it just makes eclipse unusable and i kill it.
Comment 6 Felipe Heidrich CLA 2003-04-14 09:34:36 EDT
Which version of Eclipse are you running ?

Please also look: 
Bug#31525, it talks about a bug in GTK in the beta RedHat (phoebe).
Bug#36191, is bug about antialiasing, the description of this bug is similar to 
yours.

Comment 7 Steve Northover CLA 2003-04-14 15:11:47 EDT
FH is tracking this.
Comment 8 Richard Tango-Lowy CLA 2003-04-15 10:07:02 EDT
I get similar behavior using the PHP-Eclipse plugin on Mandrake 9.1 with j2re 1.4.1. I'm 
using Eclipse-gtk 2.1. After Eclipse starts, the processor sits at 99% until I change 
perspectives and then change back. 
Comment 9 Dave CLA 2003-04-15 21:45:33 EDT
Created attachment 4597 [details]
Eclipse stack trace

Same problem here with Mandrake 9.1 and Eclipse 2.1 and RC2. Did not have the
problem with RC2 on Mandrake 9.0.

Problem occurs in two cases:

1) if I try to create a new text file, right clicking on a folder in Package
Explorer. Hitting "finish" does it. Does not happen if I invoke "File | New |
File" from the main menu.

2) Sometimes, after changing preferences, the next time eclipse is started, it
may load and then enter this heavy cpu usage state. Killing eclipse and
renaming the "workspace" folder solves the problem, returning the folder back
causes the problem again. Someting in the setting does it, but have been unable
to detect so far.

When this happens, the java main thread takes ~50% and the X process takes the
other ~50%. In both cases for me Eclipse is unusable and the only way out is
kill.

Including stacktrace for case (1), it is basically the same as the one attached
before.
Comment 10 Felipe Heidrich CLA 2003-04-21 10:22:02 EDT
Xavier:

This problem is likely caused by a bug in GTK, the fix is to update to Redhat 
9.0. If you don't want to update your whole system will need at least update 
the gtk libs.
gtk-2.2.1-1 (which is part to redhat phoebe) has the bug
gtk-2.2.1-4 (which is part to redhat 9.0) does not have the bug

Please, see bug#36698
Comment 11 Felipe Heidrich CLA 2003-04-21 10:37:46 EDT
*** Bug 35872 has been marked as a duplicate of this bug. ***
Comment 12 Felipe Heidrich CLA 2003-04-21 13:06:14 EDT
*** Bug 36677 has been marked as a duplicate of this bug. ***
Comment 13 Marcus Schrattenholzer CLA 2003-04-22 05:05:31 EDT
Felipe,

How would I fix this under Windows? Is GTK used here as well? I observe the same
behaviour as described by Dave in comment #9.
Comment 14 Felipe Heidrich CLA 2003-04-22 09:30:19 EDT
Marcus:

This problem is GTK specific and I don't know how to fix it for Windows, you 
would need to enter a problem report against Component SWT, OS Windows.
Although you see the same behavior the cause of the problem has to be 
completely different.
Comment 15 Dirk Baeumer CLA 2003-05-05 13:21:18 EDT
*** Bug 36925 has been marked as a duplicate of this bug. ***
Comment 16 Felipe Heidrich CLA 2003-05-16 12:59:15 EDT
Xavier, are you still having this problem ? can I close this bug ?
let me know okay. thanks

Comment 17 Frits Jalvingh CLA 2003-05-19 17:31:09 EDT
I had this problem with SuSE 8.2 which has gtk 2.2.1-29. I compiled a GTK+ from the current 
CVS (May 18th 2003) and the problem has gone away. 
Comment 18 Felipe Heidrich CLA 2003-07-07 11:29:24 EDT

*** This bug has been marked as a duplicate of 36698 ***