I'm posting this message because we faced a strange problem using res_failover module on asterisk 1.4.42 on a Centos 6.3.
The problem is that for some reason (maybe thread related), the usleep() call most of the times returns -1 (error).
Since that call is used also in the kick loop this causes the module to send the "running" message without any delay, consuming system resources.
Now, I don't know why usleep() is not working correctly, but I found out that if you call usleep() a second time it works correctly, so i patched the loop like this: