chromaterm icon indicating copy to clipboard operation
chromaterm copied to clipboard

Too much output too fast causes the terminal to lock up

Open bbbco opened this issue 9 years ago • 9 comments

I have been using Chromaterm to colorize Java based logging output from a ssh'd server. Usually this is just standard tailing which works fairly well. However, from time to time I find that when too much output gets rendered to quickly, the text output stops randomly and the whole terminal gets locked up.

I am using updated Linux Mint 17 on my workstation, and "C H R O M A T E R M 0.01.0" (looks like it is the latest version).

Here is my config:

$ cat ~/.chromatermrc 
#config regex on
#event {SESSION CONNECTED} {#session ssh}
#event {SESSION DISCONNECTED} {#end}

#highlight {{\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}}} {bold yellow}
#highlight {{[a-zA-Z0-9-._]*\.(com|net|org)}} {bold yellow}

#highlight { any } {white}
#highlight {{permit(ted)*}} {bold green}
#highlight {{(d|D)eny}} {bold red}
#highlight {{ (E|e)rr..}} {bold white}
#highlight {INSIDE} {bold blue}
#highlight {OUTSIDE} {bold green}
#highlight {DMZ} {bold magenta}

#substitute {^Cisco %1 Version %2, %3} {Cisco %1 <134>Version %2<088>, %3}
#substitute {%1pkts encaps: %d, %3} {%1pkts encaps: <150>%2<088>, %3}
#substitute {%1pkts decaps: %d, %3} {%1pkts decaps: <120>%2<088>, %3}
#substitute {%1 uptime is %2} {%1 uptime is <150>%2<088>}

#highlight {{.*INFO .*}} {green}
#highlight {{.*WARN .*}} {yellow}
#highlight {{.*ERROR .*}} {red}

#highlight {{^20\d\d-\d\d-\d\d \d\d:\d\d:\d\d,\d\d\d}} {blue}
#highlight {{^\d\d/\d\d/\d\d \d\d:\d\d:\d\d}} {blue}

#highlight {{.*(Except(ion)?|Error).*}} {red}
#highlight {{\W*at [^(]*\([^)]*\)}} {red}
#highlight {{^Caused by: .*$}} {red}
#highlight {{\W*... \d* more$}} {red}
  • Use the following command to ssh: ct -Ge "#run {ssh} {ssh <server>}"
  • On the server, cat a really large file
  • Notice that eventually the output stops, and the terminal freezes and is unresponsive

bbbco avatar Sep 15 '14 21:09 bbbco

What is the terminal you're running? Putty? SecureCRT? TerraTerm? or just the command line of linux itself? Can you try a different terminal and see if there's any change?

tunnelsup avatar Sep 15 '14 21:09 tunnelsup

I use the standard command line terminal.

bbbco avatar Sep 15 '14 21:09 bbbco

Let me clarify: I am not using Windows O/S. I am using the standard GNOME Terminal in Linux Mint 17. If you would like, I can check with an alternative linux terminal (i.e Terminator).

bbbco avatar Sep 15 '14 21:09 bbbco

Yes, this happens as well when using an alternative terminal (i.e. Terminator). The file I was cat-ing is 10MB in size.

bbbco avatar Sep 15 '14 22:09 bbbco

Hi all, did you solved/found a solution for the issue ? I'm facing the same issue (the terminal hangs after few data). I'm working on linux too (Ubuntu 17.04).

teicors avatar Dec 12 '17 14:12 teicors

Similar issue here, running Fedora 26, xmonad, and using urxvt (rxvt-unicode). I use chromaterm mostly with Cisco devices, and occasionally paging through a very long config, or cat'ing a long log file causes the terminal to hang, and also pegs a CPU at about 99%.

Most of the time (over a slightly laggy ssh session) there is no issue. However, I can cat a local log file or config file in CT and trigger this bug at any time.

jbobspants avatar Jan 30 '18 18:01 jbobspants

I've created a pull request that fixes this issue (d7aec550b57727f48bcf0d9bb585610e7560224c). Hopefully the devs of ChromaTerm accept it soon. Until then, you can manually install the patched version:

git clone https://github.com/hSaria/chromaterm.git
cd chromaterm/src
./configure
make
make install

For those interested, I'm maintaining my own version, called ChromaTerm--. There's info about what's different at the project page.

hSaria avatar Apr 29 '18 10:04 hSaria

@hSaria Just tried out your fix on centos 7 and terminal doesn't freeze anymore when catting a large file. The only problem I noticed is that it's impossible to interrupt the process using ctrl-c. This seemed to be possible before the patch (if the signal was sent before terminal froze). Still, this is better than the frozen terminal, so thanks for your work so far!

Oh and the instructions for manual installation missed a step, people should do the following for it to work:

git clone https://github.com/hSaria/chromaterm.git
cd chromaterm/src
git checkout patch-1
./configure
make
make install

mkuurstra avatar May 14 '18 15:05 mkuurstra

Oops. Forgot to do the commits on my master branch of the fork. Thanks @marvink87. You can now use the install commands as I've specified originally.

Also, I've already patched the bug you reported. You can download with:

git clone https://github.com/hSaria/chromaterm.git
cd chromaterm/src
./configure
make
make install

(Dont' worry; this time I checked to make sure this is the correct branch :) )

hSaria avatar May 14 '18 16:05 hSaria