Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-1114

High CPU utilization because of Mina-core jar

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.1.2
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      Hi,

      We are have our own product  through which we are trying to communicate with LDAP server by using the mina-core-2.1.2.jar and api-all-1.0.3.jar jars. When we have invalid connection parameter, and tried to get the connection, CPU core utilization is 100%.
      Then we have seen in JVisualVM and in Jprofiler that "org.apache.mina.transport.socket.nio.NioSocketConnector" is in CPU more time.

      We can see below in thread dump-

      "NioSocketConnector-3" #152 prio=5 os_prio=0 tid=0x00007f95940d4000 nid=0x77fb runnable [0x00007f956f1fe000]
         java.lang.Thread.State: RUNNABLE
      at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
      at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
      at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
      at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)

      • locked <0x00000000ebdf89e8> (a sun.nio.ch.Util$3)
      • locked <0x00000000ebdf89d8> (a java.util.Collections$UnmodifiableSet)
      • locked <0x00000000ebdf88c0> (a sun.nio.ch.EPollSelectorImpl)
        at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
        at org.apache.mina.transport.socket.nio.NioSocketConnector.select(NioSocketConnector.java:292)
        at org.apache.mina.core.polling.AbstractPollingIoConnector$Connector.run(AbstractPollingIoConnector.java:433)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

      We can see same issue with standalone java class and try to get the ldap connection. Attaching couple of snapshot to understand the issue. 
      Please note this happens in Ubuntu and Centos. Also found same issue with 2.0.21, 2.0.18 mina core jar.
      Can someone please help me on this.
       
      Thanks,
      Hrushi
       
       
       

        Attachments

        1. CPUAnalysys.zip
          4.25 MB
          Hrushikesh Agrawal
        2. threaddump_06_05_20191557137156089.log
          127 kB
          Hrushikesh Agrawal
        3. threaddump_06_05_20191557137173951.log
          127 kB
          Hrushikesh Agrawal
        4. htop.png
          106 kB
          Hrushikesh Agrawal
        5. step1_flamegraph.txt
          1 kB
          Hrushikesh Agrawal
        6. flamerelated.zip
          3.06 MB
          Hrushikesh Agrawal
        7. 29thMay.zip
          1.37 MB
          Hrushikesh Agrawal
        8. graph1_color.svg
          116 kB
          Hrushikesh Agrawal
        9. htop.png
          1.45 MB
          Hrushikesh Agrawal
        10. nio-metal-example.svg
          423 kB
          Jonathan Valliere
        11. 0531.zip
          1.81 MB
          Hrushikesh Agrawal

          Activity

            People

            • Assignee:
              johnnyv Jonathan Valliere
              Reporter:
              hagrawal Hrushikesh Agrawal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: