You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2015/03/21 18:01:38 UTC

[jira] [Comment Edited] (LOG4J2-981) Incorrect unlock in ProviderUtil

    [ https://issues.apache.org/jira/browse/LOG4J2-981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14372892#comment-14372892 ] 

Gary Gregory edited comment on LOG4J2-981 at 3/21/15 5:00 PM:
--------------------------------------------------------------

Mikhail,

Thank you for the report. I've applied a patch inspired by the patch you provided. You may wish to study it. In particular, it keeps the {{LogDelay}} class private and reuses the {{Long.compare(long, long)}} method.

Thank you again and keep the patches coming :-)

Please review and close.

Gary


was (Author: garydgregory):
Mikhail,

Thank you for the report. I've applied a patch inspired by the patch you provided. You may wish to study it. In particular, it keeps the {{LogDelay}} class private and reuses the {{Long.compare(long, long)}} method.

Thank you again and keep the patches coming :-)

Gary

> Incorrect unlock in ProviderUtil
> --------------------------------
>
>                 Key: LOG4J2-981
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-981
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2
>            Reporter: Mikhail Mazurskiy
>            Priority: Trivial
>             Fix For: 2.3
>
>         Attachments: LOG4J2-981.patch
>
>
> {{org.apache.logging.log4j.util.ProviderUtil#lazyInit}} call can result in {{IllegalMonitorStateException}} if thread is in interrupted state because code in the finally block will try to unlock the lock that is not held by the current thread ({{InterruptedException}} thrown before the lock is acquired).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org