Very strange tty-related bug in recent -current

Andrey Chernov ache at nagual.pp.ru
Thu Feb 26 18:36:07 PST 2004


Since too many components involved here (ssh, pty driver, tty driver), I 
can't trace it down well yet. Symptoms are:

After some time (say, 30mins) of normal working ncurses-based programs
(such as less, mutt, lynx) "go mad", i.e. redisplay screen wrongly or 
start to eat input, etc. Restarting program helps only for small (say 
1min) time. Restarting ssh helps permanently or for 30mins, as above.

I trace down one particular situation with mutt and found that stdin 
descriptor flags are changed after poll() with timeout syscall: O_NONBLOCK 
is added there! It sounds almost impossible and I can't find obvious 
places in the kernel code, where it may occurse, but it is so. It explains 
why characters are eated in the mutt: read returns -1 and EAGAIN but 
curses expect waiting for char.

Does somebody else seeng something similar too?

-- 
Andrey Chernov | http://ache.pp.ru/


More information about the freebsd-current mailing list