Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-18317

Suboptimal locking in CXF

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.11-GA
    • fuse-7.9-GA
    • CXF
    • None
    • False
    • False
    • % %
    • Not applicable

    Description

      An application using Camel/CXF, under high load, shows extensive contention for locks on a `URLClassPath` object. For example, I see one thread holding the lock:

      "qtp1626832672-12036189" #12036189 prio=5 os_prio=0 tid=0x00007f4904009000 nid=0x14497 waiting for monitor entry [0x00007f431ebeb000]
         java.lang.Thread.State: BLOCKED (on object monitor)
              at sun.misc.URLClassPath.getNextLoader(URLClassPath.java:479)
              - locked <0x00000001c0e300b0> (a sun.misc.URLClassPath)
              at sun.misc.URLClassPath.getResource(URLClassPath.java:248)
              ..
             at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.objectFactoryOrIndexAvailable(AbstractJAXBProvider.java:574)
             ...
            at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1283)
            at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
            at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:218)
       

       

      and many, perhaps hundreds, of similar threads all waiting for it:

       

      "qtp1626832672-12036188" #12036188 prio=5 os_prio=0 tid=0x00007f48e0011800 nid=0x14496 waiting for monitor entry [0x00007f4300085000]
         java.lang.Thread.State: BLOCKED (on object monitor)
              at sun.misc.URLClassPath.getLookupCache(URLClassPath.java:406)
              - waiting to lock <0x00000001c0e300b0> (a sun.misc.URLClassPath)
       

       

      This can potentially lead to a bottleneck in throughput.

       

       

       

       

      Attachments

        Activity

          People

            yfang@redhat.com Freeman(Yue) Fang
            rhn-support-kboone Kevin Boone
            Federico Mariani Federico Mariani
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: