tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Kern/41566, Problem with pty(4) handling under NetBSD-5 filed.
Hello. Further investigation reveals a definite problem with the
pty(4) code in NetBSD-5. I've filed kern/41566 which contains a test
program which demonstrates the problem. The test program runs flawlessly
under NetBSD-4 and earlier, but hangs the pty it uses very reliably under
NetBSD-5. I've tried this using the I386 platform; I've not yet tested
other platforms to see if the problem is machine independent.
IF someone could look at this and shed some light on what might be
going on, that would be great.
Here's what the test output looks like, for those who are curious.
-thanks
-Brian
Script started on Wed Jun 10 00:25:44 2009
%./ptytest&
[1] 1756
%./ptytest: Master process(1756) is writing to slave process (3339)
./ptytest: Using pty /dev/ttyp2
3339: Read 26 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 28 bytes to master pty
3339: Read 26 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 52 bytes to master pty
3339: Read 50 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 76 bytes to master pty
3339: Read 74 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 100 bytes to master pty
3339: Read 98 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 124 bytes to master pty
3339: Read 122 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 148 bytes to master pty
3339: Read 146 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 172 bytes to master pty
3339: Read 170 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 196 bytes to master pty
3339: Read 194 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 220 bytes to master pty
3339: Read 218 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 244 bytes to master pty
3339: Read 242 bytes from pty
3339: Read 2 bytes from pty
1756: Wrote 268 bytes to master pty
3339: Read 266 bytes from pty
1756: Wrote 28 bytes to master pty
1756: Wrote 52 bytes to master pty
1756: Wrote 76 bytes to master pty
1756: Wrote 100 bytes to master pty
1756: Wrote 124 bytes to master pty
1756: Wrote 148 bytes to master pty
1756: Wrote 172 bytes to master pty
1756: Wrote 196 bytes to master pty
3339: Read 2 bytes from pty
3339: Read 26 bytes from pty
3339: Read 2 bytes from pty
3339: Read 50 bytes from pty
3339: Read 2 bytes from pty
3339: Read 74 bytes from pty
3339: Read 2 bytes from pty
3339: Read 98 bytes from pty
3339: Read 2 bytes from pty
3339: Read 122 bytes from pty
3339: Read 2 bytes from pty
3339: Read 146 bytes from pty
3339: Read 2 bytes from pty
3339: Read 170 bytes from pty
3339: Read 2 bytes from pty
3339: Read 194 bytes from pty
3339: Read 2 bytes from pty
[Processes hang here, doing nothing]
ps -l1756
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND
100 1756 3460 0 85 0 2896 776 ttyraw S ttyp1 0:00.01 ./ptytest
%ps -l3339
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND
100 3339 1756 0 85 0 2896 644 ttyraw S ttyp1 0:00.00 ./ptytest
%
%pstat -t |grep 'ttyp2'
ttyp2 124 0 1024 1248 256 82 OC 0 0 termios
%fg
./ptytest
^C
%exit
%exit
Script done on Wed Jun 10 00:27:23 2009
Home |
Main Index |
Thread Index |
Old Index