This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 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]

pb with semaphores in 2004-11-03 snapshot


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


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