zsh-users
 help / color / mirror / code / Atom feed
* Terminal problem with linux-2.0.34
@ 1999-02-14  9:26 vherva
  1999-02-14 13:15 ` Bart Schaefer
  1999-02-15 15:20 ` Larry P . Schrof
  0 siblings, 2 replies; 12+ messages in thread
From: vherva @ 1999-02-14  9:26 UTC (permalink / raw)
  To: zsh-users; +Cc: skarkkai

I have been using zsh on a linux-2.0.34 machine without any problems.
However, when the uptime exceeded 250 days, the zsh began having problems
with the terminal. Of course, the uptime should have nothing to do with
this, but on the other hand, there where no software updates that I could 
imagine having affect to zsh's terminal handling. Zsh, termcap, libc or 
anything like that was not updated.

The flaw in the terminal handling appears as follows: when I type text
on the command line, only the first two characters are echoed. The line
does show up, if erase a character. Also, the command line is only
executed after I press return twice.

I tried updating to 3.0.7 and 3.1.5, and the bug still appeared.

Needless to say, bash and other shell and tools are unaffected.

I have not experienced this problem on any other machine. Since the 
problem only appeared after 250 days of uptime its rather hard to trace 
down on other machines. However, I would appreciate any clues on where 
to look. For now, I forced to use bash -- which is clearly not satisfactory 
-- so I am keen to find fix or workaround for this.


 
-- v --

--
Ville Herva   Ville.Herva@netspan.fi   +358-50-5164500
Netspan Oy    netspan@netspan.fi       PL 65  FIN-02151 Espoo    
              http://www.netspan.fi
For my PGP key, finger vherva@netspan.fi.


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Terminal problem with linux-2.0.34
@ 1999-02-17 15:37 Ville Herva
  0 siblings, 0 replies; 12+ messages in thread
From: Ville Herva @ 1999-02-17 15:37 UTC (permalink / raw)
  To: zsh-users; +Cc: sak


First off, I just noticed that although the problem appears with 3.1.5 and
zsh-3.1.5-pws-8, it is a bit different (better) compared to 3.0.5: 
everything I type gets echoed just fine, but pressing backspace works only
once, after that, the edits won't be echoed. Also moving on the command
line with arrow keys loses the cursor. To execute the command line, two
returns are needed. 

> Peter Stephenson <pws@ibmth.df.unipi.it> wrote:
>
> "Larry P . Schrof" wrote:
>
> > - Any time the user runs a program that makes a stat() call, the
> > shell hangs forever, until the user breaks out of it. Even after sending
> > the process, say ls -l, a signal, it takes awhile to get the shell prompt
> > back.
>
>Something this weird suggests zsh is tickling something in Linux, and
>also
>suggests the only way to find out what is just painfully to comment bits
>of
>code out until it goes away; it's probably not just zle.  (Does the
>stat()
>problem go away if you run zsh without zle?)

Today, I came across a very interesting problem with tha same linux
machine: the clock() function would always return -1! A little
sample prog:

vherva@turing:/home/vherva/zsh-3.1.5-pws-8/Src>cat ../../c.c
#include <time.h>
#include <stdio.h>

int main(int argc, char* argv[]) 
{
   int i;
   int timer = clock();
   for (i = 1000000; i; i--);  
   printf("timer: %i\nclock(): %i\nCLK_TCK: %i\n"
          "CLOCKS_PER_SEC: %i\n%3.2f 3.2f secs.\n", 
          timer, clock(), CLK_TCK, CLOCKS_PER_SEC,
          (float)(clock() - timer) / (float)CLK_TCK / 10000.0,
          (float)(clock() - timer) / (float)CLOCKS_PER_SEC);

   return 1;
}
vherva@turing:/home/vherva/zsh-3.1.5-pws-8/Src>gcc ../../c.c -o ../../c
vherva@turing:/home/vherva/zsh-3.1.5-pws-8/Src>../../c
timer: -1
clock(): -1
CLK_TCK: 100
CLOCKS_PER_SEC: 1000000
0.00 3.2f secs.

Now, making little heuristic guess I figured that

vherva@turing:/home/vherva/zsh-3.1.5-pws-8/Src>perl -e '$CLK_TCK = 100;
print 2**31 / $CLK_TCK / 60 / 60 / 24, " days\n"'
248.551348148148 days

which is quite accurately the uptime, zsh became not to work.

This, of course won't explain why zsh messes the command line, while other
shells do not. Is clock() or any similar function used in zle? (There is a
possibility that other timing functions fail, also - it seems that a
counter in the kernel has wrapped around, and libc goes nuts, or something
like that.)

Also, this might explain the other problems Larry Schrof had.

I'll be forwarding this problem to linux-kernel list.

>Also, it would be worth making sure it isn't in the latest development
>version
>http://www.ifh.de/~pws/computing/zsh-3.1.5-pws-8.tar.gz
>since the stuff that opens the terminal has changed a bit.

Zsh-3.1.5-pws-8 seems to behave exactly like zsh-3.1.5.
 

-- v --

v@iki.fi


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

end of thread, other threads:[~1999-02-17 15:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-14  9:26 Terminal problem with linux-2.0.34 vherva
1999-02-14 13:15 ` Bart Schaefer
1999-02-14 13:50   ` Ville Herva
1999-02-14 17:46     ` Bart Schaefer
1999-02-14 21:48       ` Ville Herva
1999-02-14 23:59         ` Bart Schaefer
1999-02-15  5:38           ` Ville Herva
1999-02-15 15:20 ` Larry P . Schrof
1999-02-15 17:56   ` Thomas Köhler
1999-02-15 18:22     ` Larry P . Schrof
1999-02-17  9:06       ` Thomas Köhler
1999-02-17 15:37 Ville Herva

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).