| Michael Corcoran 2004-06-15, 5:56 pm |
| Hello,
I am experiencing a strange deadlocking problem with a program I'm working
on. It is a large and complex multi-process/multi-threaded application. I
am specifically trying to resolve this problem on the Solaris 9/Intel
platform.
Every once in a while (usually after days of running fine), the application
deadlocks on a semaphore. I cannot find anywhere that I am NOT properly
releasing the semaphore after obtaining it, or any other cause to deadlock.
But, the state that it is left in when it is deadlocked suggested that, in
fact, a semaphore wasn't released at some point. The problem may be any
number of other situations, but one hunch that I had was that semop() was
exiting with EINTR while attempting to increment (release) a semaphore....is
this possible??? I was accounting for the possibility of EINTR being
returned while attempting to obtain a semaphore because the thread/process
may be blocked and in a wait state, but I haven't been accounting for the
possibility of EINTR being returned while releasing a semaphore.
Thanks for any help.
-Mike C.
|