You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Lahiru Sandaruwan <la...@wso2.com> on 2015/02/24 12:42:04 UTC

Warning log is printed every time Application is deployed

Hi,

Noticed $subject. Is this something not required or a log that really
meaningful?

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: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Warning log is printed every time Application is deployed

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Hi,

Created a minor Jira to track this.

https://issues.apache.org/jira/browse/STRATOS-1213

Thanks.

On Wed, Feb 25, 2015 at 11:04 AM, Imesh Gunaratne <im...@apache.org> wrote:

> 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 <la...@wso2.com>
> wrote:
>
>>
>>
>> On Tue, Feb 24, 2015 at 5:21 PM, Isuru Haththotuwa <is...@apache.org>
>> wrote:
>>
>>>
>>>
>>> On Tue, Feb 24, 2015 at 5:12 PM, Lahiru Sandaruwan <la...@wso2.com>
>>> 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: lahirus@wso2.com 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: lahirus@wso2.com 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
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Warning log is printed every time Application is deployed

Posted by Imesh Gunaratne <im...@apache.org>.
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 <la...@wso2.com> wrote:

>
>
> On Tue, Feb 24, 2015 at 5:21 PM, Isuru Haththotuwa <is...@apache.org>
> wrote:
>
>>
>>
>> On Tue, Feb 24, 2015 at 5:12 PM, Lahiru Sandaruwan <la...@wso2.com>
>> 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: lahirus@wso2.com 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: lahirus@wso2.com 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

Re: Warning log is printed every time Application is deployed

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Tue, Feb 24, 2015 at 5:21 PM, Isuru Haththotuwa <is...@apache.org>
wrote:

>
>
> On Tue, Feb 24, 2015 at 5:12 PM, Lahiru Sandaruwan <la...@wso2.com>
> 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: lahirus@wso2.com 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: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Warning log is printed every time Application is deployed

Posted by Isuru Haththotuwa <is...@apache.org>.
On Tue, Feb 24, 2015 at 5:12 PM, Lahiru Sandaruwan <la...@wso2.com> 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.

>
> 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: lahirus@wso2.com 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/>*
>
>
>

Re: Warning log is printed every time Application is deployed

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Thanks Vishanth.

On Tue, Feb 24, 2015 at 5:21 PM, Vishanth Balasubramaniam <
vishanthb@wso2.com> wrote:

> Hi,
>
> This log was created due to an issue mentioned in mail thread [1]
>
> [1] - [Discuss] [Issue] IllegalMonitorStateException is raised when
> releasing a lock
>
> Thank you,
> Vishanth
>
> On Tue, Feb 24, 2015 at 5:12 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Hi,
>>
>> Noticed $subject. Is this something not required or a log that really
>> meaningful?
>>
>> 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: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> *Vishanth Balasubramaniam*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94771737718*
> about me: *http://about.me/vishanth <http://about.me/vishanth>*
>
>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Warning log is printed every time Application is deployed

Posted by Vishanth Balasubramaniam <vi...@wso2.com>.
Hi,

This log was created due to an issue mentioned in mail thread [1]

[1] - [Discuss] [Issue] IllegalMonitorStateException is raised when
releasing a lock

Thank you,
Vishanth

On Tue, Feb 24, 2015 at 5:12 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Hi,
>
> Noticed $subject. Is this something not required or a log that really
> meaningful?
>
> 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: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
*Vishanth Balasubramaniam*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94771737718*
about me: *http://about.me/vishanth <http://about.me/vishanth>*