Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Expect script works on SuSE and RedHat but hangs on Debian Linux (problem with multiple spawned procs)

77 views
Skip to first unread message

ne...@mirendom.net

unread,
Sep 9, 2006, 5:24:49 PM9/9/06
to
Hi all,

I've a program (expect script) called 'dish' (see also
http://directory.fsf.org/dish.html), which uses ssh/telnet to execute
commands on multiple hosts, distribute files, change passwords, etc. It
is a GPL-software similar to the ibm's distributed shell. A powerful
feature of the program is that it can process hosts in parallel mode.
This feature is working on all SuSE and RedHat Linux systems I've used,
but unfortunately it is broken on Debian-based Linux/GNU distributions:
parallel mode has been tested without success on various versions of
Debian, Ubuntu, and Knoppix running various tcl and/or expect versions.
It seems that the problem is within spawn (may be tty initialization),
but I couldn't find the real reason. Finally, I can not conclude
whether
the problem is in my script, or in expect/tcl/kernel (or the options
they have been compiled with for a particular distribution).

You can find a tgz-package of dish on
http://gnu.mirendom.net/cgi-bin/download.cgi/gnu/dish/dish.tgz

After a straightforward installation "./install.sh -i -q", or
alternatively, after extracting dish from the archive, you can try:

1) Execute 'uptime' on localhost and 127.0.0.1 (default login via ssh)
(You will be asked for a password; Serial processing works on any
distribution without problem)

dish -e uptime localhost 127.0.0.1

2) The same like 1) but in parallel mode
(Works on SuSE and RedHat, and hangs on hosts with Debian-based
Linux
- this is the trouble)

dish -f -e uptime localhost 127.0.0.1

Remark: you need to process at least two different hosts in order to
use parallel mode - that's why the trick of executing the command on
"localhost" and "127.0.0.1"

Thanks
Dimitar

---
I wanted to include also traces (~ 3900 lines) from my debian at home
but the google's web-interface told me there is an server error on
posting. Hence if somebody is interested to see traces, let me know
and I'll send them per e-mail.

Jeff Hobbs

unread,
Sep 22, 2006, 11:38:12 AM9/22/06
to
ne...@mirendom.net wrote:
...

> It seems that the problem is within spawn (may be tty initialization),
> but I couldn't find the real reason. Finally, I can not conclude
> whether
> the problem is in my script, or in expect/tcl/kernel (or the options
> they have been compiled with for a particular distribution).
>
> You can find a tgz-package of dish on
> http://gnu.mirendom.net/cgi-bin/download.cgi/gnu/dish/dish.tgz
>
> After a straightforward installation "./install.sh -i -q", or
> alternatively, after extracting dish from the archive, you can try:
>
> 1) Execute 'uptime' on localhost and 127.0.0.1 (default login via ssh)
> (You will be asked for a password; Serial processing works on any
> distribution without problem)
>
> dish -e uptime localhost 127.0.0.1
>
> 2) The same like 1) but in parallel mode
> (Works on SuSE and RedHat, and hangs on hosts with Debian-based
> Linux
> - this is the trouble)

Is the issue perhaps that one of those tclsh is built with threads, and
that is causing the problems?

--

Jeff Hobbs, The Tcl Guy, http://www.activestate.com/

ne...@mirendom.net

unread,
Sep 26, 2006, 12:30:35 PM9/26/06
to
Jeff Hobbs schrieb:

> >
> > 1) Execute 'uptime' on localhost and 127.0.0.1 (default login via ssh)
> > (You will be asked for a password; Serial processing works on any
> > distribution without problem)
> >
> > dish -e uptime localhost 127.0.0.1
> >
> > 2) The same like 1) but in parallel mode
> > (Works on SuSE and RedHat, and hangs on hosts with Debian-based
> > Linux
> > - this is the trouble)
>
> Is the issue perhaps that one of those tclsh is built with threads, and
> that is causing the problems?
>
> --
>
> Jeff Hobbs, The Tcl Guy, http://www.activestate.com/

Hi Jeff,

this was a great hint! On Ubuntu, I just installed the source package
of tcl-8.4, cd to the source dir and removed in file "debian/rules" ,
section "build-stamp", the '--enable-threads' string. After
recompiling (= building debian packages) cleanly by
'dpkg-buildpackage -rfakeroot', and installing the new tcl-package, the
problem was solved.

Now, my program can run on Debian/Ubuntu in parallel mode without
trouble. In fact, this means that all Debian-based distributions are
using default multi-threaded tcl-builds which can cause headaches..

regards,
Dimitar

0 new messages