[Buildbot-devel] OS X slave: could not lookup DNS configuration info service: (ipc/send) invalid destination port

Greg Ward greg at gerg.ca
Fri May 7 13:10:14 UTC 2010


On Fri, May 7, 2010 at 8:50 AM, Ben Hearsum <bhearsum at mozilla.com> wrote:
> On 10-05-07 8:38 AM, Greg Ward wrote:
>>
>> Oh yeah: I'm unable to reproduce this failure running builds manually
>> at the command line.  It only happens when a build is run by BuildBot
>> (daemon process, no controlling terminal, etc.).
>
> This right here is your problem :). I don't know all the details, but once a
> process like Buildbot loses its controlling Terminal it loses access to DNS
> and some other things. The fix is to run it through launchd, or start it in
> a Terminal.app -- and keep the Terminal open.

Thank you!  How incredibly non-obvious.

Incidentally, it's either not *quite* as simple as not having a
controlling terminal.  Either that, or I don't understand precisely
what it means to have a controlling terminal.  Specifically, I'm
running BuildBot by SSH'ing to the Mac and running "buildbot start
testslave".  BuildBot being a well-behaved Unix daemon, it detaches
from the controlling terminal as part of its startup.  So ps shows
this:

  UID   PID  PPID   C     STIME TTY           TIME CMD
[...]
  502  7088     1   0   0:00.14 ??         0:00.89 /usr/bin/python
/usr/local/bin/buildbot restart testslave/

ie. BuildBot's TTY is "??".  Also, file descriptors 0, 1, and 2 are
all connected to /dev/null.  No controlling terminal, right?

Now as long as I keep my SSH session open, builds run just fine.  As
soon as I logout, builds start to fail with that weird DNS error.  So
1) I can now easily reproduce the problem and 2) it is most certainly
related to the continued existence of the pseudo-tty that BuildBot was
originally connected to.  Bizarre.

Looks like I need to follow the instructions in
http://buildbot.net/trac/wiki/UsingLaunchd.  Thank you Ben, and thank
you to whoever wrote that wiki page.

Greg




More information about the devel mailing list