Re: sleep, poll and select - 100% CPU

On 29 май, 04:22, David Schwartz <dav...@xxxxxxxxxxxxx> wrote:
On May 28, 7:46 am, kkivi <konstantin.k...@xxxxxxxxx> wrote:

We have an application (actually several, using the same framework)
that started to consume 100%CPU. ( Worked for years  normally untill
It starts doing so only after running for several days. It contains
several processes, that mainly
do something like

for (;;) {
sleep or poll or select for 25 seconds;


Make absolutely sure that if you 'select' for something, you can do
that something when 'select' returns. If you don't do whatever it is
'select' told you that you could do, your next call to 'select' won't
block either.

That is not the case.

The problem was in hidden thread created by Oracle after we changed
database connection options.
Then some problem on server ( still unclear) caused that thread to run
at 100%CPU.