public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: "nicolas@saintmac.com" <nicolas@saintmac.com>
To: pthreads-win32@sources.redhat.com
Subject: pb with semaphores in 2004-11-03 snapshot
Date: Thu, 18 Nov 2004 01:59:00 -0000	[thread overview]
Message-ID: <20041118015914.114.qmail@web12603.mail.yahoo.com> (raw)

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

                 reply	other threads:[~2004-11-18  1:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041118015914.114.qmail@web12603.mail.yahoo.com \
    --to=nicolas@saintmac.com \
    --cc=pthreads-win32@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).