This is the mail archive of the
mailing list for the Cygwin project.
Cygserver 100% CPU
- From: Patrick Samson <p_samson at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 19 Nov 2004 01:09:51 -0800 (PST)
- Subject: Cygserver 100% CPU
(This is a continuation of previous postings in
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() ...
bsd_mutex.cc, line 235: Try locking mutex semid
bsd_mutex.cc, line 235: Locked mutex semid
sysv_sem.cc, line 1118: semop: good morning
sysv_sem.cc, line 1151: semop: good morning!
sysv_sem.cc, line 1055: semop: semaptr=A0577D8,
sem_base=A056EF4, semptr=A056F48, sem=0 : op=-1
sysv_sem.cc, line 1059: semop: can't do it now
sysv_sem.cc, line 1092: semop: rollback 0 through -1
sysv_sem.cc, line 1115: semop: good night!
bsd_mutex.cc, 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: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html