rajeshjangam@gmail.com wrote:
> Basically, the application code calls some non-thread safe
> functions. To implement critical section around this, we use
> pthread_mutex_lock and pthread_mutex_unlock.
> Thought our application is single threaded, we have critical
> sections since, this code is a part of a shared library (used by
> other multithreaded applications)
Are you sure that the other multithreaded applications are making the
same pthread_mutex_lock/unlock calls around their calls (if any) to
the non-thread-safe functions?
If it _always_ hangs after two or three hours you might consider
tuscing the entire run, although that would create a _lot_ of data,
and unless the mutex actually blocks, it won't go through a
system-call path. While I won't rule-out a problem with the pthread
library, my first instinct (naturally, given my position

would be
to wonder if there were a path which slipped a mutex call somewhere.
Perhaps something got nested that wasn't meant to be.
rick jones
--
The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
these opinions are mine, all mine; HP might not want them anyway...

feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...