Strange hangups with post-1.1.4 Cygwin
Andrej Borsenkow
Andrej.Borsenkow@mow.siemens.ru
Mon Aug 14 04:19:00 GMT 2000
I noted it because Zsh regression tests suddenly started to hang. Finally I
was able to reproduce it (but still not to debug) using very simple case.
Small explanation: Zsh supports multiple IO redirectins; "foo > bar > baz"
redirects stdout into two files bar and baz. This is done by piping output of
foo to intermediate zsh process that writes it as appropriate. If foo is
builtin, the whole is actually handled internally. What happens with
post-1.1.4 Cygwin (last update today) is following:
Case 1:
zsh% print xxx > foo > bar
correctly writes both foo and bar and terminates. This happens because zsh
executes command internally as builtin.
Case 2:
zsh% ( print yyy > foo > bar )
In this case zsh is forced to run the whole in subprocess (because of parens).
Both foo and bar get correctly written to - BUT command mostly never
terminates. CPU load goes very high - judging by my CPU fan, PC is going to
fly :-) I am unable to use ^C - but ^Break magically kills running command.
Case 3:
zsh% print zzz > foo | cat > bar
In this case zsh should write into foo and pipe it's output to cat that writes
it into bar. Both files ARE correctly written, but again as in Case 2 the
whole never terminates. And again ^C does not work.
Case 4:
zsh% ( print aaa > foo | cat > bar )
In this case foo is written; bar is empty (it is created by the parent zsh
when redirection first is done) so I suspect `cat' is never even run. Again
high CPU load; again ^C does not work.
SOMETIMES at least case 2 worked. Mostly second attempt. In cases 2 and 4 I
several times got very intersting ps output (in another window):
Case 2:
mw1g017@MW1G17C ~
$ ps -l
PID PPID PGID WINPID UID TTY STIME COMMAND
1884 1 1884 1884 1006 0 14:55:34 /usr/bin/zsh
2400 1 2400 2400 1006 1 14:55:47 /usr/bin/bash
2108 1884 2108 2108 1006 0 14:56:57 /usr/bin/zsh
2000 2400 2000 2276 1006 1 14:57:13 /usr/bin/ps
2000 2400 2000 2276 1006 1 14:57:13 /usr/bin/ps
2000 2400 2000 2276 1006 1 14:57:13 /usr/bin/ps
2000 2400 2000 2276 1006 1 14:57:13 /usr/bin/ps
2000 2400 2000 2276 1006 1 14:57:13 /usr/bin/ps
... I had to kill it, it is actually much longer ...
In this case I have one top-level zsh, one zsh executing the whole (...)
command, bash and a single :) ps.
Case 4:
mw1g017@MW1G17C ~
$ ps -l
PID PPID PGID WINPID UID TTY STIME COMMAND
1884 1 1884 1884 1006 0 14:55:34 /usr/bin/zsh
2400 1 2400 2400 1006 1 14:55:47 /usr/bin/bash
2084 1884 2084 2084 1006 0 14:58:36 /usr/bin/cat
1804 1 2084 1804 1006 0 14:58:36 /usr/bin/zsh
2028 2400 2028 1972 1006 1 14:59:06 /usr/bin/ps
2028 2400 2028 1972 1006 1 14:59:06 /usr/bin/ps
2028 2400 2028 1972 1006 1 14:59:06 /usr/bin/ps
2028 2400 2028 1972 1006 1 14:59:06 /usr/bin/ps
2028 2400 2028 1972 1006 1 14:59:06 /usr/bin/ps
2028 2400 2028 1972 1006 1 14:59:06 /usr/bin/ps
2028 2400 2028 1972 1006 1 14:59:06 /usr/bin/ps
... again cut down ...
-andrej
All the above seamlessly works if I exchange cygwin1.dll with that of version
1.1.4 so it looks very much like cygwin problem. Looking into ChangeLog it
seems, that the main change was exactly in process table handling. The main
reason to compile from CVS was to test some things that needed pseudo-tty
support (and did not work).
I am ready to provide any information that may be needed to debug it.
Have a nice DOS!
B >>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list