zsh-workers
 help / color / mirror / code / Atom feed
* Re: (Revisited): zsh + less == hard hang of tty.
       [not found] <20060926142946.GA1608@lucien.blight.com>
@ 2006-09-26 17:00 ` Peter Stephenson
  2006-09-26 17:26   ` Larry P. Schrof
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2006-09-26 17:00 UTC (permalink / raw)
  To: Larry P. Schrof, Zsh hackers list

"Larry P. Schrof" wrote:
> When in zsh, if I do: less <some_file>, the terminal HARD HANGS.

It sounds like this is reproducible in your case.  Since this doesn't
seem to be a general problem, we need to find out what's different.

Does the same happen with

  zsh -c 'less <file>'

or, if not, with

  zsh -ic 'less <file>'

(which has interactive handling turned on)?  If so, the last few entries
you get with "strace" in front of the appropriate one might be
interesting.  You might get a huge amount of output in the second case
owing to initialisation files.

Otherwise, use gdb to attach to the hung process in question.  This is
most useful if zsh was compiled with debugging (configure
--enable-zsh-debug does that).

% gdb zsh
(gdb) attach 14183
(gdb) bt

However, it might actually be hung in less and zsh is simply waiting for
that to finish.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (Revisited): zsh + less == hard hang of tty.
  2006-09-26 17:00 ` (Revisited): zsh + less == hard hang of tty Peter Stephenson
@ 2006-09-26 17:26   ` Larry P. Schrof
  2006-09-26 17:50     ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Larry P. Schrof @ 2006-09-26 17:26 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

I apologize - I do not have strace output yet.

Potentially useful info, however:

- zsh -c 'less <FILE>' DOES HANG

- When I get a Linux tty to hang by doing this, log in on another tty,
  and kill the *less* process, it terminates, and any I/O that was in
  the buffer (from my extra keystrokes while less was hung) get
  interpreted by the shell. zsh becomes responsive again.

  (For example, once I hang the tty, I press enter three times, then
  type 'asdf'. Then, I kill less from another tty, and zsh spits out several
  new prompts, and 'asdf' is waiting there on the command-line. Everything
  I type while less is hung eventually gets passed to zsh once I kill less.)

- I can't reproduce this on an old RedHat 7.2 box with zsh 4.0.2 and
  less 358+iso248 (version string from 'less --version')

strace output soon.

- Larry

On Tue, Sep 26, 2006 at 06:00:39PM +0100, Peter Stephenson wrote:
> "Larry P. Schrof" wrote:
> > When in zsh, if I do: less <some_file>, the terminal HARD HANGS.
> 
> It sounds like this is reproducible in your case.  Since this doesn't
> seem to be a general problem, we need to find out what's different.
> 
> Does the same happen with
> 
>   zsh -c 'less <file>'
> 
> or, if not, with
> 
>   zsh -ic 'less <file>'
> 
> (which has interactive handling turned on)?  If so, the last few entries
> you get with "strace" in front of the appropriate one might be
> interesting.  You might get a huge amount of output in the second case
> owing to initialisation files.
> 
> Otherwise, use gdb to attach to the hung process in question.  This is
> most useful if zsh was compiled with debugging (configure
> --enable-zsh-debug does that).
> 
> % gdb zsh
> (gdb) attach 14183
> (gdb) bt
> 
> However, it might actually be hung in less and zsh is simply waiting for
> that to finish.
> 
> -- 
> Peter Stephenson <pws@csr.com>                  Software Engineer
> CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
> Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070
> 
> 
> To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (Revisited): zsh + less == hard hang of tty.
  2006-09-26 17:26   ` Larry P. Schrof
@ 2006-09-26 17:50     ` Peter Stephenson
  2006-09-26 18:15       ` Andrey Borzenkov
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2006-09-26 17:50 UTC (permalink / raw)
  To: Larry P. Schrof; +Cc: Zsh hackers list

"Larry P. Schrof" wrote:
> - When I get a Linux tty to hang by doing this, log in on another tty,
>   and kill the *less* process, it terminates, and any I/O that was in
>   the buffer (from my extra keystrokes while less was hung) get
>   interpreted by the shell. zsh becomes responsive again.

Sounds from this you may need to run strace on the less inside
the zsh -c (or just do it interactively), since zsh appears to be
just blithely waiting.  We'll probably find less is trying to
grab the terminal and failing, or something like that... quite
what we do if that's the case, I'm not sure.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (Revisited): zsh + less == hard hang of tty.
  2006-09-26 17:50     ` Peter Stephenson
@ 2006-09-26 18:15       ` Andrey Borzenkov
  2006-09-26 19:05         ` Larry P. Schrof
  0 siblings, 1 reply; 6+ messages in thread
From: Andrey Borzenkov @ 2006-09-26 18:15 UTC (permalink / raw)
  To: zsh-workers; +Cc: Larry P. Schrof

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 26 September 2006 21:50, Peter Stephenson wrote:
> "Larry P. Schrof" wrote:
> > - When I get a Linux tty to hang by doing this, log in on another tty,
> >   and kill the *less* process, it terminates, and any I/O that was in
> >   the buffer (from my extra keystrokes while less was hung) get
> >   interpreted by the shell. zsh becomes responsive again.
>
> Sounds from this you may need to run strace on the less inside
> the zsh -c (or just do it interactively), since zsh appears to be
> just blithely waiting.  We'll probably find less is trying to
> grab the terminal and failing, or something like that... quite
> what we do if that's the case, I'm not sure.

I have been running the same versions for quite some time without any problem 
(nor do I now have problem with zsh CVS).  One thing to check is what 
LESSPIPE (or other LESSxxxx) environments set to and try with all of them 
unset first.

The only other thing that comes in mind is some weird interaction with job 
control. 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFGW48R6LMutpd94wRAoVkAJ9lxLqhk565YT2ttHqdBwjt0OtlQACgnJdx
Zn4+97A0rtI16apU0XSkQak=
=RUyL
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (Revisited): zsh + less == hard hang of tty.
  2006-09-26 18:15       ` Andrey Borzenkov
@ 2006-09-26 19:05         ` Larry P. Schrof
  2006-09-27  2:43           ` Andrey Borzenkov
  0 siblings, 1 reply; 6+ messages in thread
From: Larry P. Schrof @ 2006-09-26 19:05 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: zsh-workers

Good call.

There was one env variable set - LESSOPEN.
It was set to: |/usr/bin/lesspipe.sh %s

As soon as I did 'unset LESSOPEN', less ceased to hang.

I apologize if this is falling too far out of the jurisdiction
of zsh development, but I can't reproduce the problem in any other
shells.

I swear, I'll get strace output soon.

- Larry

On Tue, Sep 26, 2006 at 10:15:24PM +0400, Andrey Borzenkov wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tuesday 26 September 2006 21:50, Peter Stephenson wrote:
> > "Larry P. Schrof" wrote:
> > > - When I get a Linux tty to hang by doing this, log in on another tty,
> > >   and kill the *less* process, it terminates, and any I/O that was in
> > >   the buffer (from my extra keystrokes while less was hung) get
> > >   interpreted by the shell. zsh becomes responsive again.
> >
> > Sounds from this you may need to run strace on the less inside
> > the zsh -c (or just do it interactively), since zsh appears to be
> > just blithely waiting.  We'll probably find less is trying to
> > grab the terminal and failing, or something like that... quite
> > what we do if that's the case, I'm not sure.
> 
> I have been running the same versions for quite some time without any problem 
> (nor do I now have problem with zsh CVS).  One thing to check is what 
> LESSPIPE (or other LESSxxxx) environments set to and try with all of them 
> unset first.
> 
> The only other thing that comes in mind is some weird interaction with job 
> control. 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> 
> iD8DBQFFGW48R6LMutpd94wRAoVkAJ9lxLqhk565YT2ttHqdBwjt0OtlQACgnJdx
> Zn4+97A0rtI16apU0XSkQak=
> =RUyL
> -----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (Revisited): zsh + less == hard hang of tty.
  2006-09-26 19:05         ` Larry P. Schrof
@ 2006-09-27  2:43           ` Andrey Borzenkov
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2006-09-27  2:43 UTC (permalink / raw)
  To: zsh-workers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 26 September 2006 23:05, Larry P. Schrof wrote:
> Good call.
>
> There was one env variable set - LESSOPEN.
> It was set to: |/usr/bin/lesspipe.sh %s
>
> As soon as I did 'unset LESSOPEN', less ceased to hang.
>

and what is the contents of lesspipe.sh (better attachment)? It is interesting 
if this can be reproduced using the same lesspipe.sh on another system.

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFGeVMR6LMutpd94wRAhoGAKDCCKzeTv1q3nQWXca8vZj49O5qvACgjE8U
IuSHZN3dKyYPRZ4f6WUcefU=
=T3NS
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-10-01 16:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20060926142946.GA1608@lucien.blight.com>
2006-09-26 17:00 ` (Revisited): zsh + less == hard hang of tty Peter Stephenson
2006-09-26 17:26   ` Larry P. Schrof
2006-09-26 17:50     ` Peter Stephenson
2006-09-26 18:15       ` Andrey Borzenkov
2006-09-26 19:05         ` Larry P. Schrof
2006-09-27  2:43           ` Andrey Borzenkov

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).