This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cygserver 100% CPU

(This is a continuation of previous postings in 
Oct 2004)

In my last trial, I saw cygserver at 100%
for about 20 s, and then back naturally to 0.
Looking at the log, the loops are:
(with one or more sem[x])

return from WaitForMultipleObjects() ..., line 235: Try locking mutex semid, line 235: Locked      mutex semid, line 1118: semop:  good morning
(error=0)!, line 1151: semop:  good morning!, line 1055: semop:  semaptr=A0577D8,
sem_base=A056EF4, semptr=A056F48, sem[7]=0 : op=-1, line 1059: semop:  can't do it now, line 1092: semop:  rollback 0 through -1, line 1115: semop:  good night!, line 187: Unlocked    mutex semid
... call to WaitForMultipleObjects()

Problem is that some other threads are waiting for a
release as well, on the same event. So there is still
at least a handle on the event and CloseHandle(evt)
doesn't destroy it.
CreateEvent (NULL, TRUE, FALSE, name) keeps returning
the same signaled event. As the event is already
signaled, there is no wait, and the loop runs wildly.

At some time, I don't know why, priorities seem to
change, and the return from WaitForMultipleObjects()
appears for another sem[] with a runable op=1 or
This successful semop() releases some resources,
and one of the sem[] involved in the loop is recycled.

This is only my diagnosis. I don't have an idea for a
fix, as I don't know how is managed the priorities
when multiple threads waiting on the same event are
all released at the same time.
Unfortunately, much of the time, the CPU is assigned
to a thread for an operation which can't be performed
at that time, so the thread is sent back to sleep.

Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]