apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkatnv <venka...@yahoo.com>
Subject Re: Posix sems still not recommended?
Date Fri, 24 Apr 2009 18:10:28 GMT

Well ... i think we found the root cause, in one of the libraries being used,
the mutex was not being initialized. Thanks!


venkatnv wrote:
> 
> We are observing issues with pthread Mutexes on Apache22/Solaris10. Not
> sure if this is relevant to this thread, but would appreciate any  inputs.
> 
> - We are running Apache22 in Worker mode. Apache22 is compiled with gcc346
> on Solaris10
> - We are having a custom module (DSO) loaded with Apache.
> 
> On stress test, we see that a mutex is not working as intended.
> (pthread_mutex_lock)
> To be precise, we are seeing core dumps and further investigation revealed
> that there are two threads that have acquired a lock using
> pthread_mutex_lock, a the same time. 
> 
> Please note that we do not see this behavior on Apache2. This occurs only
> with Apache22. Has anyone come across a similar situation. Any help in
> narrowing down the cause would be greatly appreciated!
> 
> Regards,
> Venkat.
> 
> 
> Rainer Jung-3 wrote:
>> 
>> On 30.03.2009 20:58, Jeff Trawick wrote:
>>> On Mon, Mar 30, 2009 at 2:33 PM, Jeff Trawick <trawick@gmail.com
>>> <mailto:trawick@gmail.com>> wrote:
>>>
>>>
>>>
>>> On Mon, Mar 30, 2009 at 2:07 PM, Jim Jagielski <jim@jagunet.com
>>> <mailto:jim@jagunet.com>> wrote:
>>>
>>> Anyone know if:
>>>
>>> # POSIX semaphores and cross-process pthread mutexes are not # used
>>> by default since they have less desirable behaviour when # e.g. a
>>> process holding the mutex segfaults.
>>>
>>> is still applicable, at least for posix sems?
>>>
>>>
>>> AFAIK, the Solaris-specific recovery logic for cross-process pthread
>>> mutexes has been working reliably for a long time, but with the
>>> current wind direction APR is choosing fcntl(), which has sysdef
>>> implementations on that
>>>
>>>
>>> ugh; "sysdef implications"
>> 
>> and quite often shows EDEADLOCK, even when you can prove there can't be
>> one. Especially when starting to use more than one lock of that type
>> (e.g. when SSL comes into the game).
>> 
>>> platform.
>>>
>>> no clues here about the POSIX semaphores
>> 
>> I would be much interested in an answer as well. Because of the
>> EDEADLOCK problems I did suggest using the pthread based mutex on
>> Solaris for a while to people and got no problem reports. But what
>> experience do others have?
>> 
>> In a related thread on the Tomcat users list about mod_jk I wrote in
>> February:
>> 
>>    I now did some searching and it turns out that the implementation of
>>    pthread mutexes for Solaris 10 has very recently changed quite a bit.
>>    So all speculations about improved pthread mutex behaviour
>>    (especially for "robust" mutexes) in the last years might have become
>>    obsolete.
>> 
>>    The new implementation is contained in Solaris kernel patch 137137-09
>>    and most likely also in Solaris 10 Update 6 (10/08). I didn't check,
>>    whether that update simply contains the kernel patch or the fix is
>>    included independently.
>> 
>>    Some detail is logged in Sunsolve under the bug IDs
>> 
>>    6296770 2160259 6664275 6697344 6729759 6564706
>> 
>> Regards,
>> 
>> Rainer
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Posix-sems-still-not-recommended--tp22789262p23222108.html
Sent from the APR Dev (Apache Portable Runtime) mailing list archive at Nabble.com.


Mime
View raw message