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

Profile Editor leaves Reader thread Open Consuming High CPU if Session is Terminated without Exiting Profile Editor

    Details

    • Steps to Reproduce:
      Hide
      • Unpack, configure and start a JBoss Fuse instance
      • Create a fabric
      • In a separate window / terminal, open a client session with the bin/client script
      • Open the resource editor to edit a profile resource, like:
        > profile-edit --resource org.ops4j.pax.web.properties default
      • From another terminal, kill the client session while the editor is still open
      • CPU usage begins to climb
      • Use the high_cpu_linux_jstack.sh script to take a thread dump of the container
      • Note that an orphan thread similar to the one above will be using 90-100% CPU
      Show
      Unpack, configure and start a JBoss Fuse instance Create a fabric In a separate window / terminal, open a client session with the bin/client script Open the resource editor to edit a profile resource, like: > profile-edit --resource org.ops4j.pax.web.properties default From another terminal, kill the client session while the editor is still open CPU usage begins to climb Use the high_cpu_linux_jstack.sh script to take a thread dump of the container Note that an orphan thread similar to the one above will be using 90-100% CPU

      Description

      If a Fuse / Karaf client session is interrupted or killed while the profile editor is open, the reader thread for the resource editor remains RUNNABLE in org.jledit.jline.InputStreamReader.read and CPU usage spikes to nearly 100% - almost all consumed by this thread. The thread does not seem to exit until the container is restarted.

      "Thread-77" #216 prio=5 os_prio=0 tid=0x00007fa40c20cf70 nid=0x5c7e runnable [0x00007fa4017e0000]
         java.lang.Thread.State: RUNNABLE
      	at sun.nio.cs.UTF_8$Decoder.decodeLoop(UTF_8.java:412)
      	at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:579)
      	at org.jledit.jline.InputStreamReader.read(InputStreamReader.java:278)
      	- locked <0x00000000c56da018> (a org.jledit.jline.NonBlockingInputStream)
      	at org.jledit.jline.InputStreamReader.read(InputStreamReader.java:186)
      	- locked <0x00000000c56da018> (a org.jledit.jline.NonBlockingInputStream)
      	at org.jledit.AbstractConsoleEditor.readOperation(AbstractConsoleEditor.java:311)
      	at org.jledit.AbstractConsoleEditor.start(AbstractConsoleEditor.java:125)
      	at io.fabric8.commands.ProfileEditAction.openInEditor(ProfileEditAction.java:477)
      	at io.fabric8.commands.ProfileEditAction.editProfile(ProfileEditAction.java:240)
      	at io.fabric8.commands.ProfileEditAction.doExecute(ProfileEditAction.java:167)
      	at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
      	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
      	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
      	at io.fabric8.commands.$ProfileEdit830735155.execute(Unknown Source)
      	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
      	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
      	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
      	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
      	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
      	at org.apache.karaf.shell.console.jline.Console.run(Console.java:197)
      	at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:173)
      	at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:125)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)
      	at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:123)
      
         Locked ownable synchronizers:
      	- None
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gnodet Guillaume Nodet
                  Reporter:
                  hawkinsds Duane Hawkins
                  Tester:
                  Emil Cervenan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: