The file descriptor passed to a syscall was out of range, or was not open, or is invalid for the function requested.
This is usually a programming bug.
40 pages link to EBADF: