Messages in this thread | | | Date | Wed, 6 Oct 2004 11:09:50 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: UDP recvmsg blocks after select(), 2.6 bug? |
| |
On Wed, 6 Oct 2004, Joris van Rantwijk wrote:
> Hello, > > I have a problem where the sequence of events is as follows: > - application does select() on a UDP socket descriptor > - select returns success with descriptor ready for reading > - application does recvfrom() on this descriptor and this recvfrom() > blocks forever > > My understanding of POSIX is limited, but it seems to me that a read call > must never block after select just said that it's ok to read from the > descriptor. So any such behaviour would be a kernel bug. >
Can you check to see if you have an exception at the same time? Also, please make sure that the first parameter to select() is the file-descriptor value + 1. There are things like out-of-band data that could show up ( MSG_OOB ) under select(). Also, recvfom() takes a lot of parameters that need to be correct. There is a buffer length plus a pointer to a socklen_t variable. I've seen people mess these up and have everything "work" except sometimes...
Cheers, Dick Johnson Penguin : Linux version 2.6.5-1.358-noreg on an i686 machine (5537.79 BogoMips). Note 96.31% of all statistics are fiction.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |