[ 
https://issues.apache.org/jira/browse/KARAF-4073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raffi Basmajian updated KARAF-4073:
-----------------------------------
    Attachment: dump.txt

> Very high cpu caused by executing commands using shell:exec
> -----------------------------------------------------------
>
>                 Key: KARAF-4073
>                 URL: https://issues.apache.org/jira/browse/KARAF-4073
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.4.3
>         Environment: Client - Windows 7 SP1
> Server - Ubuntu 15.04  
>            Reporter: Raffi Basmajian
>            Priority: Minor
>         Attachments: dump.txt
>
>
> Currently building AMQ messaging platform across multiple data centers using 
> standalone AMQ brokers on Jboss Fuse 6.2/Karaf 2.4. We needed a tool for 
> automating diagnostic and configuration commands across many servers with a 
> single command (we're not using Fabric). So we started playing with Karaf's 
> console commands. Most commands work as advertised, except for shell:exec, 
> which appears to cause very high cpu consumption in certain instances; the 
> issue is fairly easy to reproduce. 
> On Ubuntu 15.04/Java 1.8.0_45-b14
> =============================
> 1) Install JBoss Fuse 6.2 (133)
> http://www.jboss.org/download-manager/file/jboss-fuse-6.2.0.GA-full_zip.zip
> 2) Extract, then start using bin/fuse
> 3) Start local or remote console session
> 4) Execute any of these, keep eye on cpu usage
> {quote}
> shell:exec ls
> shell:exec id
> shell:exec df -h
> {quote}
> While cpu was pegged at 99%, we observed what appeared to be high context 
> switching activity in the following threads, which we assume to be threads 
> for streaming command output. I've attached a stack trace showing these 
> threads.
> Input Pump for Commans[ls]
> Error pump for Command[ls]
> Since we observed the issue on Jboss Fuse 6.2, which uses Karaf 2.4, I 
> downloaded and started a standalone instance of Karaf 2.4.3. Using the same 
> steps above, I reproduced the issue on my first attempt, so it appears this 
> issue is rooted with something in Karaf, not Fuse.
> I also reproduced the issue on RHEL 7.1/Java 1.8 (same as above), on both 
> Fuse/Karaf 2.4 and standalone Karaf 2.4.3.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to