Yes, we added this log to track code blocks which are trying to release a
lock acquired by some other thread or a lock which was not acquired. The
prefix "System warning!" was used to point that this is a problem in the
system and it should not happen.

On Tue, Feb 24, 2015 at 5:24 PM, Lahiru Sandaruwan <[email protected]> wrote:

>
>
> On Tue, Feb 24, 2015 at 5:21 PM, Isuru Haththotuwa <[email protected]>
> wrote:
>
>>
>>
>> On Tue, Feb 24, 2015 at 5:12 PM, Lahiru Sandaruwan <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> Noticed $subject. Is this something not required or a log that really
>>> meaningful?
>>>
>> Had a look at the code, seems we're checking if the lock is held by the
>> current thread before unlocking, and this warning is printed if a different
>> thread is trying to release the lock. IMHO this condition should not occur.
>> Usually a lock should be acquired and released from the same thread, and we
>> do not need to check whether the lock is being held by the current thread.
>> I'll try to have a look at what is happening.
>>
>
> Great. yah..
>
> That's what i also thought. Ideally it should not happen.
>
> Thanks.
>
>>
>>> Thanks.
>>>
>>> [1]
>>>
>>> [2015-02-24 17:06:01,692]  WARN
>>> {org.apache.stratos.common.concurrent.locks.ReadWriteLock} -  System
>>> warning! Trying to release a lock which has not been taken by the same
>>> thread: [lock-name] application [thread-id] 105 [thread-name]
>>> pool-26-thread-2
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: [email protected] blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>> --
>>> <http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146>
>>> <http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146>
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> <http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146>
>>> +94 716 358 048
>>> <http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146>*
>>> <http://wso2.com/>*
>>>
>>>
>>> * <http://wso2.com/>*
>>>
>>>
>>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: [email protected] blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to