roy@phri.UUCP (Roy Smith) (07/25/86)
Something very strange is going on with pty's on our Sun-3's running Sun 3.0 Unix. I don't know too much about pty's, so some of the assumptions I've made may be wrong. I'll try to stick to describing the symptoms. We've had some other troubles with emacs, so I'm not even 100% sure it's a generic pty problem, a problem with Sun windows or emacs's fault. Hence, this is going to sun, unix, and emacs groups. The first time it happened was a few weeks ago. Somebody called me to say a window had died (or something) on their workstation. When I did an rlogin to their Sun, instead of getting a shell, I got emacs coming at me, sort of. It was asking me "buffer changed since last write to file, save?" like it normally does when you try to exit emacs without saving your file (we run CCA version "164.03 #1 of 5/25/86"). For those of you not familiar with Emacs, if you type anything execpt y, n, ^G, or ^L in response to this question, it beeps at you, you get an error message, and the question repeats. This is what was happening, continuously. Today, somebody logged onto a different workstation and and when one of their default windows came up, there was the same sort of thing. An emacs left over from whoever used the workstation before was still running, doing the "do you want to save?" infinite loop business. When we did a ps, we found the following (I've edited out a lot of random junk, and some of the columns to make it fit on the screen): F UID PID PPID CP PRI NI STAT TT TIME COMMAND 1400200 212 5094 1 0 15 0 IW co 0:01 -csh (csh) 1008001 212 5397 5094 0 1 0 I co 0:03 suntools 1000200 156 5036 1 0 15 0 IW p2 0:01 -bin/csh (csh) 8001 156 5045 5036 45 36 0 R p2776:10 EMACS ddd 1000000 156 5046 5045 0 1 0 IW p2 0:00 EMACS ddd 408001 212 5402 5397 64 41 0 R p2 6:59 shelltool [lots of args...] 1000000 212 5403 5402 0 3 0 IW p2 0:00 -bin/csh (csh) 1000200 156 3796 1 0 15 0 IW p3 0:00 -bin/csh (csh) 1008000 156 3820 3796 0 4 0 IW p32731:11 EMACS dud 1000000 156 3821 3820 0 1 0 IW p3 0:00 EMACS dud 1008000 156 5035 1 0 4 0 IW p3 0:00 shelltool [lots of args] What you baisicly see is 2 emacs's left over from the last person who used the machine. From the huge amount of cpu time they have racked up, these are runaway processes (we've seen emacs do this before on our 4.2bsd vax). Note that ttyp2 is the controlling tty for both the runaway emacs and the new shell running in the window. Likewise for ttyp3. The situation with the rlogin I had a few weeks ago was essentially the same. So, what's going on? Is it emacs's fault or is there something flakey with pty's on the Suns? I've noticed a lot of strange things with emacs on the Suns. In all cases, I can't be sure if it's emacs messing up, or just tickling a bug in the Sun window system. We've tracked down one bug where if you let emacs sit idle for a while (5 minutes or more?), the display gets messed up in all sort of strange and wonderful ways (like it was sending the wrong escape sequences). CCA has been unresponsive to our bug reports, so I'm taking this to the net. -- Roy Smith, {allegra,philabs}!phri!roy System Administrator, Public Health Research Institute 455 First Avenue, New York, NY 10016