NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/45352: pty(4)/tty(4) have a 1024 bytes transfer limit
The following reply was made to PR kern/45352; it has been noted by GNATS.
From: Matthew Mondor <mm_lists%pulsar-zone.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/45352: pty(4)/tty(4) have a 1024 bytes transfer limit
Date: Fri, 23 Sep 2011 09:25:57 -0400
So I wrote a small test program and imported it into my public CVS tree
at:
http://cvs.pulsar-zone.net/cgi-bin/cvsweb.cgi/mmondor/tests/pty-test/pty-test.c?rev=1.3;content-type=text%2Fplain
I would be glad to fix it if there's something I'm missing. However:
NetBSD-5 with -s 512: fine
parent: started; opening PTY and spawning child
parent: sleeping to make sure child is ready
child: started; open "/dev/pts/11"
child: TTY open, starting read loop
child: polling
parent: writing
parent: attempting to write 512 bytes to PTY
child: attempting to read 512 bytes
child: read 512 bytes from TTY
child: attempting to read 512 bytes
child: polling
parent: wrote 512 bytes to PTY
parent: attempting to write 512 bytes to PTY
child: attempting to read 512 bytes
child: read 512 bytes from TTY
child: attempting to read 512 bytes
child: polling
parent: wrote 512 bytes to PTY
parent: waiting for child to exit
child: closing TTY
child: exiting
parent: closing PTY
parent: exiting
NetBSD-5 with -s 1024: reaches a 1022 bytes read limit
parent: started; opening PTY and spawning child
parent: sleeping to make sure child is ready
child: started; open "/dev/pts/11"
child: TTY open, starting read loop
child: polling
parent: writing
parent: attempting to write 1024 bytes to PTY
child: attempting to read 1024 bytes
parent: wrote 1024 bytes to PTY
parent: attempting to write 1024 bytes to PTY
child: read 1022 bytes from TTY
child: attempting to read 1024 bytes
parent: wrote 1024 bytes to PTY
parent: waiting for child to exit
child: read 1022 bytes from TTY
child: attempting to read 1024 bytes
child: polling
child: closing TTY
child: exiting
parent: closing PTY
parent: exiting
NetBSD-5 with -s 2048: still hits the 1022 bytes read limit
parent: started; opening PTY and spawning child
parent: sleeping to make sure child is ready
child: started; open "/dev/pts/11"
child: TTY open, starting read loop
child: polling
parent: writing
parent: attempting to write 2048 bytes to PTY
child: attempting to read 2048 bytes
child: read 1022 bytes from TTY
child: attempting to read 2048 bytes
parent: wrote 2048 bytes to PTY
parent: attempting to write 2048 bytes to PTY
child: read 1022 bytes from TTY
child: attempting to read 2048 bytes
child: read 1022 bytes from TTY
child: attempting to read 2048 bytes
parent: wrote 2048 bytes to PTY
parent: waiting for child to exit
child: read 1022 bytes from TTY
child: attempting to read 2048 bytes
child: polling
child: closing TTY
child: exiting
parent: closing PTY
parent: exiting
Linux with -s 512: fine
parent: started; opening PTY and spawning child
parent: sleeping to make sure child is ready
child: started; open "/dev/pts/8"
child: TTY open, starting read loop
child: polling
parent: writing
parent: attempting to write 512 bytes to PTY
parent: wrote 512 bytes to PTY
parent: attempting to write 512 bytes to PTY
parent: wrote 512 bytes to PTY
parent: waiting for child to exit
child: attempting to read 512 bytes
child: read 512 bytes from TTY
child: attempting to read 512 bytes
child: read 512 bytes from TTY
child: attempting to read 512 bytes
child: polling
child: closing TTY
child: exiting
parent: closing PTY
parent: exiting
Linux with -s 2048: fine
parent: started; opening PTY and spawning child
parent: sleeping to make sure child is ready
child: started; open "/dev/pts/8"
child: TTY open, starting read loop
child: polling
parent: writing
parent: attempting to write 2048 bytes to PTY
parent: wrote 2048 bytes to PTY
parent: attempting to write 2048 bytes to PTY
parent: wrote 2048 bytes to PTY
parent: waiting for child to exit
child: attempting to read 2048 bytes
child: read 2048 bytes from TTY
child: attempting to read 2048 bytes
child: read 2048 bytes from TTY
child: attempting to read 2048 bytes
child: polling
child: closing TTY
child: exiting
parent: closing PTY
parent: exiting
Linux with -s 4096: reaches a 4095 bytes read limit
parent: started; opening PTY and spawning child
parent: sleeping to make sure child is ready
child: started; open "/dev/pts/8"
child: TTY open, starting read loop
child: polling
parent: writing
parent: attempting to write 4096 bytes to PTY
parent: wrote 4096 bytes to PTY
parent: attempting to write 4096 bytes to PTY
parent: wrote 4096 bytes to PTY
parent: waiting for child to exit
child: attempting to read 4096 bytes
child: read 4095 bytes from TTY
child: attempting to read 4096 bytes
child: read 4095 bytes from TTY
child: attempting to read 4096 bytes
child: read 2 bytes from TTY
child: attempting to read 4096 bytes
child: polling
child: closing TTY
child: exiting
parent: closing PTY
parent: exiting
Linux with -s 8192: still hits the 4095 bytes read limit
parent: started; opening PTY and spawning child
parent: sleeping to make sure child is ready
child: started; open "/dev/pts/8"
child: TTY open, starting read loop
child: polling
parent: writing
parent: attempting to write 8192 bytes to PTY
parent: wrote 8192 bytes to PTY
parent: attempting to write 8192 bytes to PTY
parent: wrote 8192 bytes to PTY
parent: waiting for child to exit
child: attempting to read 8192 bytes
child: read 4095 bytes from TTY
child: attempting to read 8192 bytes
child: read 4095 bytes from TTY
child: attempting to read 8192 bytes
child: read 4095 bytes from TTY
child: attempting to read 8192 bytes
child: read 4095 bytes from TTY
child: attempting to read 8192 bytes
child: read 4 bytes from TTY
child: attempting to read 8192 bytes
child: polling
child: closing TTY
child: exiting
parent: closing PTY
parent: exiting
I did not test this program with the patch Christos proposed against
-current yet (although I did test the some days ago using a pty-udp
tunnel without much success, but I yet have to try with 8192 as
suggested by Darren). When I can I'll boot again the -current kernel
and also run this test on it.
Thanks,
--
Matt
Home |
Main Index |
Thread Index |
Old Index