registry team mailing list archive
-
registry team
-
Mailing list archive
-
Message #20687
[Bug 593290] Re: Terminator locks up with 100% CPU, when trying to split panes too many times
I have to sleep now. I will provide more details tomorrow.
I can reproduce this freezing bug consistently and scriptedly in VirtualBox with a clean Ubuntu Lucid install. Hopefully, the ability to script it will help to find a fix. Within the vm, running the script, I get these results:
works: ./tt.sh notitlebars 3
freezes: ./tt.sh notitlebars 4
works, but with maybe 10 second delay: ./tt.sh vanilla 30
Then, ssh to the physical Lucid machine, I can only use low numbers, like 2 or 3, for each. (Details later, if wanted.)
Then, successfully run tests with high numbers, like 40 and 50, for each. Seems like the faster the machine, the less chance of this bug appearing.
Very important to not touch keyboard or click somewhere while script is
running. It injects keystrokes to current window. :) Which reminds me,
you will need to install xdotools, which is very small. sudo aptitude
install xdotools
1. Ubuntu Karmic. python-vte 1:0.22.2-0ubuntu2.1. Terminator 0.95ppa2. Compiz and Gnome
Hardware is certainly not too slow: 4G RAM on AMD Athlon(tm) 64 X2 Dual Core Processor 5600+.
2. Ubuntu Lucid. python-vte 1:0.23.5-0ubuntu1.1. Terminator 0.93-0ubuntu1. Metacity and Gnome
Hardware is somewhere similar, but don't remember details at the moment.
In the meantime, enjoy the script. Let me know of improvements, also.
:)
tt.sh:
#!/bin/bash
CREATED=2010-09-30
MODIFIED=2010-09-30
VERSION=01.000.000
LICENSE="Public Domain"
##########################################
## Use this code at your own risk! ##
## I am not responspible for any ##
## results that come from your using ##
## it! ##
##########################################
# You should definitely make a backup of ~/.config/terminator/config
# This program will erase that file.
# Ignore this terminator PID when killing later. If you want/need this functionality,
# you will have to get the appropriate pid and put it here:
IGNOREPID=
##### A few functions defined
prepconfig() {
local what="$1"
echo "test=$what"
case "$what" in
vanilla)
# We have Titlebars.
echo "" > ~/.config/terminator/config
;;
notitlebars)
# We disable Titlebars.
echo "[profiles]" > ~/.config/terminator/config
echo "[[default]]" >> ~/.config/terminator/config
echo "show_titlebar = False" >> ~/.config/terminator/config
;;
*)
ERR="ERR:prepconfig: Invalid TEST: $what"
return 1
;;
esac
}
xdotest() {
local what="$1"
local count=$2
local i
case "$what" in
vanilla)
for i in $( seq 1 $count ); do
xdotool type $i
xdotool key ctrl+shift+o
xdotool key alt+Up
done
for i in $( seq 1 $count ); do
xdotool key ctrl+shift+w
done
;;
notitlebars)
for i in $( seq 1 $count ); do
xdotool type $i
xdotool key ctrl+shift+o
xdotool key alt+Up
done
for i in $( seq 1 $count ); do
xdotool key ctrl+shift+w
done
;;
*)
ERR="ERR:xdotest: Invalid TEST: $what"
return 1
;;
esac
}
init() {
if [[ "$1" == "" ]] || [[ "$2" == "" ]]; then
echo "Usage:"
echo "tt.sh TEST COUNT"
echo ""
echo "Where TEST is one of these:"
echo " vanilla, titlebars"
echo "and COUNT is the number of times we perform the 'action."
echo "The 'action' is defined depending on which TEST is chosen."
echo "Currently, the basic action is to open new terminals by"
echo "splitting horizontally COUNT times, then close them again."
echo "Be very conservative! When Terminator freezes, the xdotool"
echo "has no way of knowing, and may inject keypresses where they"
echo "are not wanted."
return 1
fi
TEST="$1"
COUNT=$2
# For visual cleanliness; clears and reinitializes the original terminal window.
reset
# Silently kill the highest-numbered pid instance of terminator,
# presumed to be the most recently-executed instance.
THEPID=$( ps a | grep [t]erminator | tail -n 1 | awk '{print $1}' )
if ! [[ "$IGNOREPID" == "$THEPID" ]]; then
echo "Killing $THEPID ... "
kill $THEPID &> /dev/null
# # Did it really die? I haven't seen a problem with this, but it doesn't hurt to check.
# if [[ "" == $( ps a | grep $THEPID ) ]]; then
# echo "Success."
# else
# echo "Fail!"
# ERR="ERR:init: Failed to kill pid $THEPID."
# return 1
# fi
else
echo "Nothing to kill. This is fine."
fi
return 0
}
main() {
if ! init "$@"; then return 1; fi
# Setup ~/.config/terminator/config as appropriate to the test chosen.
prepconfig "$TEST"
# Run Terminator as a background process, so that everything else works.
terminator &
# Wait for the new window to open.
sleep 2
xdotest "$TEST" "$COUNT"
return 0
}
# Program starts here
if ! main "$@"; then
echo "$ERR"
exit
fi
sleep 2
exit 0
** Attachment added: "test for terminator bug 593290"
https://bugs.launchpad.net/terminator/+bug/593290/+attachment/1661115/+files/t.sh
--
Terminator locks up with 100% CPU, when trying to split panes too many times
https://bugs.launchpad.net/bugs/593290
You received this bug notification because you are a member of Registry
Administrators, which is the registrant for Debian.
References