Crude Linux kernel patch to detect any attempt to select(2) on a blocking 
socket. Make sure your syslogd is fixed first, it's one of the culprits!

- Colin Phipps <cph@moria.org.uk>

--- fs/select.c~orig	2004-02-18 03:57:12.000000000 +0000
+++ fs/select.c	2004-10-08 23:48:12.000000000 +0100
@@ -168,6 +168,26 @@ get_max:
 	return max;
 }
 
+#include <linux/net.h>
+
+static void warn_blocking_sock(int sfd) {
+        struct socket *sock;
+	int err;
+	if ((sock = sockfd_lookup(sfd, &err))!=NULL) {
+		int fam = sock->sk_family;
+		sockfd_put(sock);
+		/* exclude UNIX sockets for now, far too many */
+		if (fam != 1) {
+			struct file* filp = fget(sfd);
+			int r = !(filp->f_flags & O_NONBLOCK);
+			fput(filp);
+			if (r) {
+				printk("[%d] read select on blocking socket %d\n",current->pid,sfd);
+			}
+		}
+	} // Not interested in non-sockets
+}
+
 #define BIT(i)		(1UL << ((i)&(__NFDBITS-1)))
 #define MEM(i,m)	((m)+(unsigned)(i)/__NFDBITS)
 #define ISSET(i,m)	(((i)&*(m)) != 0)
@@ -183,6 +203,7 @@ int do_select(int n, fd_set_bits *fds, l
 	poll_table *wait;
 	int retval, i;
 	long __timeout = *timeout;
+	int recheck = 0;
 
  	spin_lock(&current->files->file_lock);
 	retval = max_select_fd(n, fds);
@@ -197,7 +218,7 @@ int do_select(int n, fd_set_bits *fds, l
 	if (!__timeout)
 		wait = NULL;
 	retval = 0;
-	for (;;) {
+	for (;;recheck++) {
 		unsigned long *rinp, *routp, *rexp, *inp, *outp, *exp;
 
 		set_current_state(TASK_INTERRUPTIBLE);
@@ -223,6 +244,7 @@ int do_select(int n, fd_set_bits *fds, l
 					break;
 				if (!(bit & all_bits))
 					continue;
+				if ((in & bit) && !recheck) warn_blocking_sock(i);
 				file = fget(i);
 				if (file) {
 					f_op = file->f_op;
