This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
pb with semaphores in 2004-11-03 snapshot
- From: "nicolas at saintmac dot com" <nicolas at saintmac dot com>
- To: pthreads-win32 at sources dot redhat dot com
- Date: Wed, 17 Nov 2004 17:59:14 -0800 (PST)
- Subject: pb with semaphores in 2004-11-03 snapshot
- Reply-to: nicolas at saintmac dot com
Hi list
I have a problem with this snapshot, where as the previous ones were working
fine.
Threads seem to lock up randomly waiting for something to happen, but never
happens.
I tried to recompile the library using VS C++ .net in debug mode (no
optimization at all), but the same problem occurs (except I can give details on
where it's hanging).
Every time I break in my frozen app, I am in a situation similar to this:
* thread A, stuck in a pthread_cond_timedwait
* thread B,C, etc stuck on pthread_mutex_lock for the mutex used in the
condition in A.
The mutex is indeed still taken by A, because A is stuck on this line:
in ptw32_cond_timedwait
/* Thread can be cancelled in sem_wait() but this is OK */
if (sem_wait (&(cv->semBlockLock)) != 0)
and then it's stuck on
result = pthreadCancelableWait (s->sem);
in sem_wait
I can not find who kept the semaphore (the owner field of the semaphore is 0).
Does anyone experienced such problem?
Thanks
Nicolas
=====
------------------------------------------------------------
video meliora proboque deteriora sequor
------------------------------------------------------------