[jboss-jira] [JBoss JIRA] (LOGMGR-35) All threads share the same MDC FastCopyHashMap

David Lloyd (Resolved) (JIRA) jira-events at lists.jboss.org
Wed Dec 7 10:04:41 EST 2011


     [ https://issues.jboss.org/browse/LOGMGR-35?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Lloyd resolved LOGMGR-35.
-------------------------------

    Fix Version/s: 1.2.1.GA
                   1.3.0.Beta1
       Resolution: Done


Good catch, thanks.
                
> All threads share the same MDC FastCopyHashMap
> ----------------------------------------------
>
>                 Key: LOGMGR-35
>                 URL: https://issues.jboss.org/browse/LOGMGR-35
>             Project: JBoss Log Manager
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: core
>    Affects Versions: 1.2.0.GA
>            Reporter: Stephan Classen
>            Assignee: David Lloyd
>            Priority: Critical
>             Fix For: 1.2.1.GA, 1.3.0.Beta1
>
>
> All threads share the very same instance of the FastCopyHashMap.
> This causes the use of a MDC command (put/remove/etc) to effect ALL running threads.
> The problem lies in the class org.jboss.logmanager.MDC
> The static inner class Holder has the following method:
> protected FastCopyHashMap<String, String> childValue(final Map<String, String> parentValue) { ... }
> The signature of this method is wrong. Since Holder extends InheritableThreadLocal<FastCopyHashMap<String, String>> the correct signature would be:
> protected FastCopyHashMap<String, String> childValue(final FastCopyHashMap<String, String> parentValue) { ... }
> This can easily be tested by adding the @Override annotation to the method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list