Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
test for interrupted stdio
Hi,
I am running tests/lib/libc/stdio/t_intr on NetBSD 9.99.88/amd64 inside
VirtualBox. The test fails spuriously.
Since I didn't want to dive into the internals of bin/dd, I modified
t_intr by replacing dd with cat. The test still fails spuriously.
I find this surprising since cat uses raw I/O. Or is it maybe h_intr
that exposes the bug? It took me some time to get the test to fail, but
then ktrace shows:
9535 9535 cat GIO fd 0 read 32 bytes
"12769\n12770\n12771\n12772\n12773\n12"
9535 9535 cat RET read 16384/0x4000
...
9535 9535 cat CALL read(0,0x7126f1f1a480,0x4000)
9535 9535 cat GIO fd 0 read 4088 bytes
"87185\n87186\n..."
Between these calls to read(0), there are no other reads. This looks to
me as if h_intr would contain a bug. If wr_fn(ofp, buf, n) is ever
interrupted, it does not try to resubmit the data but simply skips the
block. Due to that, cat receives only the partial input.
I think h_intr should be more robust when it comes to interrupted system
calls. Thoughts?
Roland
Home |
Main Index |
Thread Index |
Old Index