Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-434

ConcurrentModificationException when using MDC

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.29
    • Fix Version/s: 0.9.30
    • Component/s: logback-classic
    • Labels:
      None
    • Environment:

      Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)
      Darwin aden 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64 x86_64

      Description

      In some rare cases in multithreaded environment MDC.put throws ConcurrentModificationException.

      java.util.ConcurrentModificationException: null
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) ~[na:1.6.0_26]
      at java.util.HashMap$EntryIterator.next(HashMap.java:834) ~[na:1.6.0_26]
      at java.util.HashMap$EntryIterator.next(HashMap.java:832) ~[na:1.6.0_26]
      at java.util.HashMap.putAll(HashMap.java:523) ~[na:1.6.0_26]
      at ch.qos.logback.classic.util.LogbackMDCAdapter.duplicateAndInsertNewMap(LogbackMDCAdapter.java:69)
      ~[logback-classic-0.9.29.jar:na]
      at ch.qos.logback.classic.util.LogbackMDCAdapter.put(LogbackMDCAdapter.java:95)
      ~[logback-classic-0.9.29.jar:na]
      at org.slf4j.MDC.put(MDC.java:112) ~[slf4j-api-1.6.1.jar:1.6.1]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ceki Ceki Gülcü
                Reporter:
                oddman Josh Oddman
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: