tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
netbsd-5: panic: ureadc: non-positive resid
Under some circumstances, the following panic occurs:
panic: ureadc: non-positive resid
Interestingly, I've been able to reproduce it in the following peculiar
way.
Using a program such as:
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
int main(void)
{
struct iovec iov[1];
char buffer[1024];
iov[0].iov_base = buffer;
iov[0].iov_len = 0;
return preadv(0, iov, 1, 0);
}
which of course, normally fails with EINVAL. Using readv(2) there also
has the same issue in this particular case. I paniced this box often
enough for tonight but don't exactly remember if this also happens with
read(2) and length zero.
I can run the above test on the text console alone as much as I want
without issue, yet if I start screen(1) and then run such a command, it
allows to read from stdin and waits there until I press enter, at
which point the panic occurs.
I yet have to build a debug kernel and test this, as well as to run a
RAM check on this system, but wondered if perhaps someone had a clue
about an actual reason this could occur (i.e. a bug in the pty code or
whatever).
Thanks,
--
Matt
Home |
Main Index |
Thread Index |
Old Index