You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have seen situations where my mDNSResponder (765.50.9) seems to be busy (blocking one core) and not responding to a DNSServiceGetProperty(kDNSServiceProperty_DaemonVersion, &uiDaemonVersion, &size);
call.
The high CPU and the blocking of the daemon stopped when I attached the debugger - so this is still a mystery.
But for the first step I wondered why the call is blocked on the client side.
While examining the blocking a stumbled across the following function
static int set_waitlimit(dnssd_sock_t sock, int timeout)
{
int gDaemonErr = kDNSServiceErr_NoError;
// To prevent stack corruption since select does not work with timeout if fds > FD_SETSIZE(1024)
if (!gDaemonErr && sock < FD_SETSIZE)
{
struct timeval tv;
fd_set set;
FD_ZERO(&set);
FD_SET(sock, &set);
tv.tv_sec = timeout;
tv.tv_usec = 0;
IMHO the conditon
sock < FD_SETSIZE
is wrong, as my sockets are larger that FD_SETSIZE (==64) and this limit only describes the number of socket in the fd_set, not the socket handle itself.
Any opinion to this?
Thanks
Tobias
The text was updated successfully, but these errors were encountered:
Hi,
I have seen situations where my mDNSResponder (765.50.9) seems to be busy (blocking one core) and not responding to a
DNSServiceGetProperty(kDNSServiceProperty_DaemonVersion, &uiDaemonVersion, &size);
call.
The high CPU and the blocking of the daemon stopped when I attached the debugger - so this is still a mystery.
But for the first step I wondered why the call is blocked on the client side.
While examining the blocking a stumbled across the following function
IMHO the conditon
sock < FD_SETSIZE
is wrong, as my sockets are larger that FD_SETSIZE (==64) and this limit only describes the number of socket in the fd_set, not the socket handle itself.
Any opinion to this?
Thanks
Tobias
The text was updated successfully, but these errors were encountered: