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() ...
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
(error=0)!
sysv_sem.cc, line 1151: semop:  good morning!
sysv_sem.cc, line 1055: semop:  semaptr=A0577D8,
sem_base=A056EF4, semptr=A056F48, sem[7]=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
op=-1.
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! 
http://my.yahoo.com 
 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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