Mail Archives: cygwin/2006/08/28/08:28:44
On Aug 25 11:21, Ethan Tira-Thompson wrote:
> [Slightly modified from version previously sent on cygwin-developers,
> who suggest this is a better forum for discussion]
>
> I've discovered what I believe to be a internal deadlock issue in
> cygserver.
>
> I have a piece of code:
> void SemaphoreManager::setValue(semid_t id, int x) const {
> semun params;
> params.val=x;
> cout << "SEMCTL..." << flush;
> if(semctl(semid,id,SETVAL,params)<0) {
> perror("ERROR: SemaphoreManager::setValue (semctl)");
> exit(EXIT_FAILURE);
> }
> cout << "done" << endl;
> }
>
> This is part of a function which gets called a number of times
> throughout the life of the program. It works just fine up until one
> particular call (with x=0) which reliably causes it to block between
> the two cout's. Not just my program either -- all IPC is blocked at
> this point. [...]
> Our code can be checked out from CVS, but before running you'll need
> to increase the semmns and semmsl parameters as described in step 5:
> http://www.cs.cmu.edu/~tekkotsu/cygwin-install.html
> [...]
This sounds pretty strange since from the source code I can't see any
chance that semctl(SETVAL) could hang indefinitly. However, as
mentioned on cygwin-developers, please provide a simple, short, concise,
standalone testcase, possibly in plain C, which builds and shows the
problem OOTB. The problem should be isolated to the minimum of code
necessary to get the hang, if possible. I really don't have time nor
exactly fun to dive into a foreign complex project.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
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/
- Raw text -