Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: bootstrap_look_up again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bootstrap_look_up again



On Sunday, April 22, 2001, at 05:49 PM, Giuliano Gavazzi wrote:

2) bootstrap_look_up failures as in:

bootstrap_look_up() failed (ipc/send) invalid destination port

This seems to be responsible for more odd behaviours (but could sometimes cause the ones at point (1)), if I knew what bootstrap_look_up does I would be happier.. I can only suppose that it starts the connection between the user of lookupd and lookupd itself (via UNIX sockets?).
We had different reports seemingly due to bootstrap_look_up failing:
sendmail not recognising local users (it happened to me), project builder hanging on startup (Eric), certain shell cgi's not executing properly (someone on the MacOSX admin list).

Could someone shed more light on what this bootstap_look_up does and how can we isolate the cause of its failure please?

The bootstrap_look_up() API sends a message to a task's bootstrap server (almost always provided by the mach_init daemon), and asks for a service to be looked up - by name. What is returned is a Mach message queue port which can then be used to access that service.

To get the error you are seeing above, somebody either A) de-
allocated/destroyed the task's mach port that connects it to mach_init, B) the mach_init daemon died, or C) daemon's are left running in a "user" bootstrap context after the user has logged off the console.

I would assume the last problem is what you are seeing. Basically, when you log in as a user a new bootstrap context is established for that login session with mach_init. This per-session bootstrap port is returned as the bootstrap port for any process that is associated with that login session. It allows things to register as "MyFooServer," etc... without fear of conflict or being snooped/trojan-horsed by other users. At some point in the logout process the per-user daemons are un-registered and this per-user bootstrap port is invalidated. All processes that are using it are no longer able to look things up.

So, be leery of starting long-lived daemons under Terminal (which inherits its bootstrap port in the above manner). This doesn't affect most things, because the "looked-up" ports are cached over an indefinite period. But things that need to re-attach to servers over time may experience trouble. If you must start them interactively, telnet or ssh into your own machine so that you pick up the default "system" bootstrap context.

Just a guess,
--Jim


References: 
 >bootstrap_look_up again (From: Giuliano Gavazzi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.