View previous topic :: View next topic |
Author |
Message |
labrador Guru
Joined: 04 Oct 2003 Posts: 316
|
Posted: Sat Mar 26, 2005 6:29 pm Post subject: infinite loop from 'ls -l' running expect kbd translator |
|
|
[ edited - initial report is wrong about it being an X related thing ]
There is an infinite loop of output from ls -l in
large directories when run through a keyboard
translation session of ssh through expect script.
See below for the script.
Last edited by labrador on Tue Mar 29, 2005 2:03 pm; edited 1 time in total |
|
Back to top |
|
|
Weeve Retired Dev
Joined: 30 Oct 2002 Posts: 641
|
Posted: Sun Mar 27, 2005 7:36 pm Post subject: |
|
|
What versions of;
|
|
Back to top |
|
|
labrador Guru
Joined: 04 Oct 2003 Posts: 316
|
Posted: Mon Mar 28, 2005 2:32 am Post subject: Thanks for the follow up... |
|
|
Thanks for the follow up on this issue.
I'm running:
x11-base/xorg-x11-6.8.2-r1
x11-terms/xterm-197
kde-base/kdelibs-3.3.2-r5
kde-base/kde-env-3-r3
kde-base/kdeartwork-3.3.2
kde-base/kdebase-3.3.2-r1
I don't know if it might be connected but I have an error trying to upgrade
to the kdelibs update that is available. It fails at this point:
Code: | /bin/sh ../libtool --silent --mode=link --tag=CXX sparc-unknown-linux-gnu-g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -mcpu=ultrasparc -O2 -pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -o libDCOP.la -rpath /usr/kde/3.3/lib -R /usr/kde/3.3/lib -R /usr/qt/3/lib -R /usr/lib -version-info 6:0:2 -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -L/usr/lib -L/usr/qt/3/lib -L/usr/kde/3.3/lib dcopstub.lo dcopref.lo dcopobject.lo dcopclient.lo KDE-ICE/libkICE.la -lqt-mt -lz -lpng -lz -lm -lXext -lX11 -lSM -lICE -lpthread
grep: /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.5/libstdc++.la: No such file or directory
/bin/sed: can't read /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.5/libstdc++.la: No such file or directory
libtool: link: `/usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.5/libstdc++.la' is not a valid libtool archive
make[4]: *** [libDCOP.la] Error 1
make[4]: Leaving directory `/var/tmp/portage/kdelibs-3.3.2-r7/work/kdelibs-3.3.2/dcop'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/kdelibs-3.3.2-r7/work/kdelibs-3.3.2/dcop'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/kdelibs-3.3.2-r7/work/kdelibs-3.3.2/dcop'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/kdelibs-3.3.2-r7/work/kdelibs-3.3.2'
make: *** [all] Error 2
!!! ERROR: kde-base/kdelibs-3.3.2-r7 failed.
!!! Function kde_src_compile, Line 166, Exitcode 2
|
At first I suspected that a run of fix_libtool_files.sh was required. When I
ran it against gcc 3.2 or perhaps it was 3.1, there were a bunch of hard links
to that version's libraries in many areas, and one of them was within kde libraries.
I tried an emerge again after fix_libtool_files.sh and it failed the same way. |
|
Back to top |
|
|
labrador Guru
Joined: 04 Oct 2003 Posts: 316
|
Posted: Tue Mar 29, 2005 1:37 pm Post subject: Fixed kdelibs compiling error |
|
|
I fixed the kdelibs compiling error.
It was looking for /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.5 and I had
only /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.5-20050130
I made a sym link to satisfy the expectation that /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.5
existed and that solved the kdelibs building error above.
Now I'll need to see if it helps the ls output infinite loop bug.
I also want to test control-Z when that happens. |
|
Back to top |
|
|
labrador Guru
Joined: 04 Oct 2003 Posts: 316
|
Posted: Tue Mar 29, 2005 2:01 pm Post subject: Is related to a keyboard translation |
|
|
I am using a keyboard translation table with my ssh session (to map F keys
to work within a tty style application). For some reason that is the
thing that is triggering the infinite loop from 'ls -l'. If I do the
same commands without the keyboard map, there is no problem.
This runs via 'expect', so maybe the problem is actually there.
Here is the script:
Code: |
#!/usr/bin/expect
eval spawn -noecho $argv
interact {
#\177 {send "\008"}
"\033\[3~" {send "\177"}
#F5
"\033\[15~" {send "\033\[16~"}
#Shift F1
"\033O2P" {send "\033\[31~"}
"\033O2Q" {send "\033\[32~"}
"\033O2R" {send "\033\[33~"}
"\033O2S" {send "\033\[34~"}
"\033\[15;2~" {send "\033\[35~"}
"\033\[17;2~" {send "\033\[36~"}
"\033\[18;2~" {send "\033\[37~"}
"\033\[19;2~" {send "\033\[38~"}
"\033\[20;2~" {send "\033\[39~"}
"\033\[21;2~" {send "\033\[40~"}
"\033\[23;2~" {send "\033\[41~"}
"\033\[24;2~" {send "\033\[42~"}
#Shift F12
}
# usage is kdbfix ssh brokenhost.
|
I was wrong about it being related to X. I can actually
trigger the bug from a Windows ssh client, running a
shell on the Sun machine, but still using the above
kbdfix script.
Is there a better way to evoke expect so that the ls -l output
won't mess up my session? |
|
Back to top |
|
|
Ijo n00b
Joined: 22 Jul 2003 Posts: 68
|
Posted: Fri Jun 10, 2005 7:24 am Post subject: |
|
|
I have the same problem. I'm not mapping any keys in my expect script, and I'm pretty convince that It's related to expect.
running 'telnet remotehost' or 'ssh remotehost' I have NO problems, independence of source host OS (macosx, linux) and terminal type (tried from X, console, diferent TERM's)
However, as soon as I use my simpel expect script to telnet or ssh to remotehost I come into an endless loop as soon as terminal screen has to scroll for a while (easy to reproduce with typical commands with lots of lines as 'ls -al', 'genlop -l', 'ps -ef'). The problem happens randomly, about 1 every 3 commands.
More info. It doesn't matter the client. I've got the same results with Linux(gentoo) and MacOSX clients. It doesn't matter if I do it from within X, MacOSX or even X inside MacOSX.
I'm starting to think that maybe is in my server (remotehost), but I would doubt it. I'm running there linux (gentoo) up to date.
here is the script I'm using
Code: | $ more priv/bin/nr
#!/usr/bin/expect -f
set timeout -1
spawn xhost +
spawn telnet nene
match_max 100000
expect -exact "word: "
send -- "XXXXXXX\r"
expect "ijo"
send -- "su -; exit\r"
expect -exact "word: "
send -- "XXXXXXX\r"
expect "#"
interact
|
I'm suffering this problem since months now, and never could resolve it. Would be great to find finally a solution for it.
Thanks in advance !! |
|
Back to top |
|
|
|