errorcode EINVAL returned by select

The errorcode EINVAL is returned by the select call. In the documentation this code can be caused by an invalid argument, or operation or out-of-band data. How can I find out exactly what caused this error code?