You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2014/02/03 09:36:11 UTC

[jira] [Resolved] (SLING-3341) [logback] Race condition in configuring Logback

     [ https://issues.apache.org/jira/browse/SLING-3341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chetan Mehrotra resolved SLING-3341.
------------------------------------

    Resolution: Fixed

issue has not surfaced/reported again post this fix. Current fixes looks sufficient. Closing it for now

> [logback] Race condition in configuring Logback
> -----------------------------------------------
>
>                 Key: SLING-3341
>                 URL: https://issues.apache.org/jira/browse/SLING-3341
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>    Affects Versions: Commons Log 4.0.0
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>
> Current way to configure Logback works like as below
> 1. Any change in config finally leads a call to org.apache.sling.commons.log.logback.internal.LogbackManager#configChanged
> 2. The config change is not done in concurrent way. A thread must acquire the {{resetLock}} to trigger  Logback reset. If this lock cannot be acquired then it just sets a flag {{configChanged}} to true. The Logback reset job upon completion checks {{configChanged}} . if found to be true then it reschedules the job to load Logback again
> In current impl there is a small race condition where its possible that Logback reset job does not see the {{configChanged}} flag and hence Logback does not get reinitialized and is configured with stale config



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)