glassfish
  1. glassfish
  2. GLASSFISH-14455

[Perf] Thread contention in orb code during

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_ms07
    • Component/s: orb
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      14,455
    • Tags:

      Description

      I had a chance to run Trade2 benchmark again after bug
      https://glassfish.dev.java.net/issues/show_bug.cgi?id=14348 got fixed. Now I see
      threads block in following code path many times,

      java.lang.Thread.State: BLOCKED (on object monitor)
      at
      com.sun.corba.ee.impl.orbutil.copyobject.ClassCopierFactoryPipelineImpl.getClassCopier(ClassCopierFactoryPipelineImpl.java:231)

      • waiting to lock <0x00002aaac35cd6a0> (a
        com.sun.corba.ee.impl.orbutil.copyobject.ClassCopierFactoryPipelineImpl)
        at
        com.sun.corba.ee.impl.copyobject.ReflectObjectCopierImpl.copy(ReflectObjectCopierImpl.java:197)
        at
        com.sun.corba.ee.impl.orbutil.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:66)
        at
        com.sun.corba.ee.impl.orbutil.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:59)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:771)
        at
        com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:473)
        at
        com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:243)
        at
        com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
        at
        com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:227)
        at trade._TradeHome_DynamicStub.create(trade/_TradeHome_DynamicStub.java)
        at trade.TradeAccessBean.instantiateEJB(TradeAccessBean.java:86)
        at trade.TradeAccessBean.login(TradeAccessBean.java:181)
        at trade_client.TradeAction.doLogin(TradeAction.java:311)
        at trade_client.TradeServletAction.doLogin(TradeServletAction.java:595

      And I sometimes do notice that execution blocks at following call sequence as
      reported in https://glassfish.dev.java.net/issues/show_bug.cgi?id=14269

      java.lang.Thread.State: BLOCKED (on object monitor)
      at
      com.sun.corba.ee.impl.osgi.loader.OSGIListener.getBundleForClass(OSGIListener.java:329)

      • waiting to lock <0x00002aaab4201c50> (a java.lang.Class for
        com.sun.corba.ee.impl.osgi.loader.OSGIListener)
        at
        com.sun.corba.ee.impl.osgi.loader.OSGIListener.access$000(OSGIListener.java:77)
        at
        com.sun.corba.ee.impl.osgi.loader.OSGIListener$ClassCodeBaseHandlerImpl.loadClass(OSGIListener.java:221)
        at
        com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.getClassFromString(CDRInputStream_1_0.java:2256)
        at
        com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1095)
        at
        com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:935)
        at
        com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:525)
        at
        com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:78)
        at
        com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:65)
        at
        com.sun.corba.ee.impl.orbutil.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:69)
        at
        com.sun.corba.ee.impl.orbutil.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:59)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:771)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObjects(Util.java:742)
        at
        com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyArguments(DynamicMethodMarshallerImpl.java:439)
        at
        com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:227)
        at
        com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
        at
        com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:227)

        Issue Links

          Activity

          Hide
          Ken Cavanaugh added a comment -

          These should be fixed with the integration of ORB version 3.1.0-b013 in
          GF rev 42572. Both issues were fixed by replacing synchronization with
          read/write locks.

          Show
          Ken Cavanaugh added a comment - These should be fixed with the integration of ORB version 3.1.0-b013 in GF rev 42572. Both issues were fixed by replacing synchronization with read/write locks.

            People

            • Assignee:
              Ken Cavanaugh
              Reporter:
              amitagarwal
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: