Issue 1122 in qsb-mac: QSB and mDNSResponder Interaction (Hangs Machine)

17 views
Skip to first unread message

qsb...@googlecode.com

unread,
Apr 7, 2011, 12:48:35 PM4/7/11
to qsb-mac...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect OpSys-All Priority-Medium

New issue 1122 by marczak....@gmail.com: QSB and mDNSResponder Interaction
(Hangs Machine)
http://code.google.com/p/qsb-mac/issues/detail?id=1122

What steps will reproduce the problem?
1.Run QSB


What is the expected output? What do you see instead?
We're seeing machines running 10.6.5 through 10.6.7 and QSB grind to a
halt. Upon investigation, system.log contains thousands of entries like the
following:

Mar 30 13:03:35 mymac /Applications/Quick Search
Box.app/Contents/MacOS/Quick Search Box[385]: dnssd_clientstub
deliver_request: socketpair failed 23 (Too many open files in system)
Mar 30 13:03:35 mymac mDNSResponder[40]: ERROR: accept: 23 (Too many open
files in system)
Mar 30 13:03:35: --- last message repeated 1 time ---
Mar 30 13:03:35 mymac /Applications/Quick Search
Box.app/Contents/MacOS/Quick Search Box[385]: dnssd_clientstub
deliver_request: socketpair failed 23 (Too many open files in system)
Mar 30 13:03:35 mymac mDNSResponder[40]: ERROR: accept: 23 (Too many open
files in system)
Mar 30 13:03:35: --- last message repeated 1 time ---
Mar 30 13:03:35 mymac /Applications/Quick Search
Box.app/Contents/MacOS/Quick Search Box[385]: dnssd_clientstub
deliver_request: socketpair failed 23 (Too many open files in system)
Mar 30 13:03:35 mymac mDNSResponder[40]: ERROR: accept: 23 (Too many open
files in system)
Mar 30 13:03:35: --- last message repeated 1 time ---
Mar 30 13:03:35 mymac /Applications/Quick Search
Box.app/Contents/MacOS/Quick Search Box[385]: dnssd_clientstub
deliver_request: socketpair failed 23 (Too many open files in system)
Mar 30 13:03:35 mymac mDNSResponder[40]: ERROR: accept: 23 (Too many open
files in system)
Mar 30 13:03:35: --- last message repeated 1 time ---
Mar 30 13:03:35 mymac /Applications/Quick Search
Box.app/Contents/MacOS/Quick Search Box[385]: dnssd_clientstub
deliver_request: socketpair failed 23 (Too many open files in system)
Mar 30 13:03:35 mymac mDNSResponder[40]: ERROR: accept: 23 (Too many open
files in system)
Mar 30 13:03:35: --- last message repeated 1 time ---
Mar 30 13:03:35 mymac /Applications/Quick Search
Box.app/Contents/MacOS/Quick Search Box[385]: dnssd_clientstub
deliver_request: socketpair failed 23 (Too many open files in system)
Mar 30 13:03:35 mymac mDNSResponder[40]: ERROR: accept: 23 (Too many open
files in system)
Mar 30 13:03:35: --- last message repeated 1 time ---
Mar 30 13:03:35 mymac /Applications/Quick Search
Box.app/Contents/MacOS/Quick Search Box[385]: dnssd_clientstub
deliver_request: socketpair failed 23 (Too many open files in system)


What version of the product are you using? On what operating system?
2.0.0.3789, on Mac OS X 10.6.5, 10.6.6 and 10.6.7. This happens across Mac
models as well (tested on 13" MBA and 13" and 15" MBP).

Please provide any additional information below.
Just prior to QSB complaining in the logs, there are hundreds of lines like:

Mar 30 16:56:29 mymac mDNSResponder[40]: Client application bug:
DNSServiceResolve(somemac-macbookpro._ssh._tcp.local.) active for over two
minutes. This places considerable burden on the network.

...which results in messages like this:


Mar 30 17:07:44 mymac mDNSResponder[40]: 740: Could not write data to
client because of error - aborting connection
Mar 30 17:07:44 mymac mDNSResponder[40]: 740: DNSServiceCreateConnection: 0
registered records, 3 kDNSServiceFlagsShareConnection operations
Mar 30 17:07:44 mymac mDNSResponder[40]: -> DNSServiceResolve
somemac._rfb._tcp.local.
Mar 30 17:07:44 mymac mDNSResponder[40]: -> DNSServiceQueryRecord
somemac-2.local. (Addr)
Mar 30 17:07:44 mymac mDNSResponder[40]: -> DNSServiceQueryRecord
somemac-2.local. (AAAA)


All machines affected by this problem run fine when QSB is simply taken out
of the equation (uninstalled, in all cases).

qsb...@googlecode.com

unread,
Apr 19, 2011, 5:28:43 PM4/19/11
to qsb-mac...@googlegroups.com

Comment #1 on issue 1122 by j...@haitas.com: QSB and mDNSResponder

Is network service discovery part of QSB's core or is it part of a plugin?

If it is part of a plugin - disabling said plugin should work as a
temporary work-around.

This should also help identifying the responsible code.

qsb...@googlecode.com

unread,
Apr 19, 2011, 6:30:53 PM4/19/11
to qsb-mac...@googlegroups.com

Comment #2 on issue 1122 by j...@haitas.com: QSB and mDNSResponder

As a followup to the above comment:

I have disabled the 'Mount' plugin - so far this is working

Thank you to 'frogor' in #macosx on freenode for his assistance:

According to frogor - all bonjour/mdns related code is in
to 'MountSearchSource.m'

qsb...@googlecode.com

unread,
Apr 19, 2011, 6:36:59 PM4/19/11
to qsb-mac...@googlegroups.com

Comment #3 on issue 1122 by j...@haitas.com: QSB and mDNSResponder

Another followup: more credit to frogor in #macosx on freenode

in 'MountSearchSource.m' lines 170-172 iterates without any delay
-> on a large subnet this might require more sockets than system limits
will permit

qsb...@googlecode.com

unread,
Apr 19, 2011, 6:53:18 PM4/19/11
to qsb-mac...@googlegroups.com

Comment #4 on issue 1122 by mikel...@gmail.com: QSB and mDNSResponder

*chuckle* frogor/#macosx@freenode checking in - that last bit was just a
guess.

From what I understand about the problem, the number of open sockets/files
showing up in lsof matches, within a few, for both mDNSResponder and QSB.
It doesn't appear to be a recursion issue - it's just QSB driving mDNS.

The effect of this bug was that other applications, like Safari and such,
were unable to resolve anything every so often - so it appears to be
causing a backlog in mDNS / name resolution until it passes or completes,
at which point Safari and the like pick right back up.

Personally I would hope that Apple's implementation of mDNS handles calls
to resolveWithTimeout: and queues the callbacks in a sane enough fashion
that a delay isn't necessary.

Maybe the real issue is that the results are hitting QSB too hard / too
fast?

qsb...@googlecode.com

unread,
Nov 8, 2011, 6:34:47 PM11/8/11
to qsb-mac...@googlegroups.com

Comment #5 on issue 1122 by adambyr...@google.com: QSB and mDNSResponder

I'm not sure if this is the same bug, but QSB is causing depletion of file
descriptors on my machine. I used lsof to list open files and I see
hundreds of lines like that in the output:

[...]
Quick\x20 909 adambyrtek 469u unix 0x0b0f3b00 0t0
->0x0b0f39e0
Quick\x20 909 adambyrtek 470u unix 0x0b10bbe0 0t0
->0x0b0f37a0
Quick\x20 909 adambyrtek 471u unix 0x0b0f38c0 0t0
->0x0b0f3680
Quick\x20 909 adambyrtek 472u unix 0x0b10bac0 0t0
->0x0b0f3560
Quick\x20 909 adambyrtek 473u unix 0x0b0f3710 0t0
->0x0b0f2f30
Quick\x20 909 adambyrtek 474u unix 0x0b10b880 0t0
->0x0b0f3320
Quick\x20 909 adambyrtek 475u unix 0x0b0f3440 0t0
->0x0b0f3200
Quick\x20 909 adambyrtek 476u unix 0x0b12abe0 0t0
->0x0b1193b0
Quick\x20 909 adambyrtek 477u unix 0x0b10b520 0t0
->0x0b10b2e0
[...]

Reply all
Reply to author
Forward
0 new messages