[Openmcl-devel] process-run-function and mach ports usage

mikel evins mevins at me.com
Wed Feb 23 07:55:52 PST 2011

On Feb 23, 2011, at 9:31 AM, Wim Oudshoorn wrote:

>> This stuff escaped from a lab somewhere; the fact that it's been
>> lurching around the countryside frightening villagers as long as it
>> has is pretty sad.
> You don't seem to really like mach. From what I read it seems
> quite ok.  It is a shame I haven't found a very good manual
> with enough detail to know what exactly is going on.

Once upon a time in a previous life, I worked at NeXT maintaining some OS infrastructure stuff. The most difficult issue I had to track down had to do with leaking system resources that were causing certain commercial database products to blow their own brains out in the field.

The eventual fix for that specific problem was a single line of code. I found it by sitting next to the code's original author walking through it line-by-line until we found the place where the resource in question leaked.

However, during the investigation, we ended up talking over the issues with Avie Tevanian, who was the boss of that stuff at NeXT at that time, and who was before that involved in the design and construction of Mach at CMU. What struck me about the conversations was that Avie said Mach was designed to leak certain resources because allowing them to leak avoided some costly houskeeping, and in "normal use" the leaks would not be a problem. Mach's designers simply assumed that systems would be rebooted often enough to prevent any issues arising.

I remember that he seemed slightly put out that NeXT customers would use system calls in a way that violated that assumption.

I'm not sure what my point is, except that, if you're assuming that Mach shouldn't leak resources in "normal" or "correct" use, you may want to rethink that assumption.

More information about the Openmcl-devel mailing list