100%CPU when using ScheduledThreadPoolExecutor only with GCJ

Lon Palmer <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
GCJ 4.3

I have an application that makes use of several instances of ScheduledThreadPoolExecutor.  

When running as a Jar, this application uses very little CPU.  However, when running as a Linux compile (using gcj-4.3) classes using the ScheduledThreadPoolExecutor can use 100% CPU under no load.

I've only found one situation that will reliably cause the cpu spike in my application.

Class A has a private member which is a ScheduledThreadPoolExecutor.
Class A assigns one task to it's S.T.P.E (15 ms rate).
Class A has a private member Class B.
Class B has a private member which is a ScheduledThreadPoolExecutor.
Class B assigns one task to it's S.T.P.E. (60 ms rate).

When class A is instantiated in my application, the CPU usage jumps to 100%.  If I make class B reference the same S.T.P.E as is used in class A, the CPU usage doesn't seem to jump.

However, there are other places in my code in which classes want to use a S.T.P.E and I'm seeing CPU spikes to 100% that I'm not getting in the Jar.

Any help is appreciated.  I did a search in the Bugzilla DB for ScheduledThreadPoolExecutor and didn't find any entries.  

If this sounds like a bug instead of a mis-use of the class please let me know and I'll try to write a demonstration app this weekend.

Thanks!

Lon Palmer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.