pb with semaphores in 2004-11-03 snapshot

nicolas@saintmac.com nicolas@saintmac.com
Thu Nov 18 01:59:00 GMT 2004


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
------------------------------------------------------------



More information about the Pthreads-win32 mailing list