Re: Interface for communicating from kernel to user mode
Peter Skvarka <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.kernel |
|---|---|
| Organization | Soft in Engines |
| Message-ID | <[email protected]> |
> Could you break into ddb? A stack trace of the freeze might be useful. Two things: 1. I have NetBSD 10.1. I found crash dump: crash> bt __kernel_end() at 0 kern_reboot() at sys_reboot vpanic() at vpanic+0x192 panic() at device_printf trap() at startlwp --- trap (number 6) --- uiomove() at uiomove+0x4e soreceive() at soreceive+0x7d7 __kernel_end() at ffffffff81de012a crash dump tells about uiomove() IMHO on uipc_socket.c#1488 (inside of soreceive() function. 2. soo_recv() in my code calls (*s->so_receive)(...) and it is the same like in your older code. Function soreceive() is set as member of s->so_receive (s is struct socket*) My struct uio my_iovec is initialized: char baf[64]; memset(baf, 0, sizeof(baf)); memset(&my_uio, 0, sizeof(my_uio)); my_iovec.iov_base = baf; my_iovec.iov_len = sizeof(baf); my_uio.uio_rw = UIO_READ; my_uio.uio_iovcnt = 1; my_uio.uio_iov = &my_iovec; my_uio.uio_resid = my_iovec.iov_len; Member uio_segflg (which can contain UIO_SYSSPACE) does not exist in this version. I call s->so_receive() by this way: struct mbuf* mbuf1 = NULL; (*s->so_receive)(so, &mbuf1, &my_uio, NULL, NULL, NULL); Cannot be problem that I am using separate kernel thread for receiving data on socket ? Peter