<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Real Developers and Kernel Source</title>
	<atom:link href="http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/</link>
	<description>Living in a state of accord.</description>
	<pubDate>Sat, 10 Jan 2009 00:18:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Adrian Sutton</title>
		<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/comment-page-1/#comment-23500</link>
		<dc:creator>Adrian Sutton</dc:creator>
		<pubDate>Mon, 03 Jul 2006 22:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/#comment-23500</guid>
		<description>Bob,
Great that you've taken the time to track it down properly. Have you logged a bug with Apple about it? http://bugreport.apple.com is the URL to use. With your latest comment, I do now have confidence that you know what you're doing and you've tracked the problem down correctly.

Also, please note that my comments weren't specifically directed at you in person, rather they are general comments about people who are dependent on the source code. Given the extremely limited context your case may or may not have fitted into that situation, but it now appears it doesn't. No offense intended.</description>
		<content:encoded><![CDATA[<p>Bob,<br />
Great that you&#8217;ve taken the time to track it down properly. Have you logged a bug with Apple about it? <a href="http://bugreport.apple.com" rel="nofollow">http://bugreport.apple.com</a> is the URL to use. With your latest comment, I do now have confidence that you know what you&#8217;re doing and you&#8217;ve tracked the problem down correctly.</p>
<p>Also, please note that my comments weren&#8217;t specifically directed at you in person, rather they are general comments about people who are dependent on the source code. Given the extremely limited context your case may or may not have fitted into that situation, but it now appears it doesn&#8217;t. No offense intended.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Ippolito</title>
		<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/comment-page-1/#comment-23491</link>
		<dc:creator>Bob Ippolito</dc:creator>
		<pubDate>Mon, 03 Jul 2006 21:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/#comment-23491</guid>
		<description>First of all, I definitely know what I'm doing. That said, it's a bug in the kernel. When it stalls, it stalls on poll, select, or kqueue (I've tried all three) waiting for an accept. It just doesn't fire socket notifications for some period of time -- at least 10 seconds, and during that time any poll that had started will not ever get triggered.

It's not a bug in the network driver, I was testing over loopback. I guess it could be a bug in the loopback driver, but that seems rather unlikely.

It's not 16k current connections, it's 16k sequential connections (the concurrency is more like 20, but it's irrelevant). It actually happens across process lifetimes too (e.g. make 10k connections, kill, start again, stall at about 6k connections). Since the code I was testing with maintains no state across runs, it's simply not possible for a bug in my code to cause problems across process lifetimes.

I'm not dependent on having source code available. I'm dependent on the kernel doing the right thing. Fortunately I'm only running xnu on my workstation :)</description>
		<content:encoded><![CDATA[<p>First of all, I definitely know what I&#8217;m doing. That said, it&#8217;s a bug in the kernel. When it stalls, it stalls on poll, select, or kqueue (I&#8217;ve tried all three) waiting for an accept. It just doesn&#8217;t fire socket notifications for some period of time &#8212; at least 10 seconds, and during that time any poll that had started will not ever get triggered.</p>
<p>It&#8217;s not a bug in the network driver, I was testing over loopback. I guess it could be a bug in the loopback driver, but that seems rather unlikely.</p>
<p>It&#8217;s not 16k current connections, it&#8217;s 16k sequential connections (the concurrency is more like 20, but it&#8217;s irrelevant). It actually happens across process lifetimes too (e.g. make 10k connections, kill, start again, stall at about 6k connections). Since the code I was testing with maintains no state across runs, it&#8217;s simply not possible for a bug in my code to cause problems across process lifetimes.</p>
<p>I&#8217;m not dependent on having source code available. I&#8217;m dependent on the kernel doing the right thing. Fortunately I&#8217;m only running xnu on my workstation :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Sutton</title>
		<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/comment-page-1/#comment-23277</link>
		<dc:creator>Adrian Sutton</dc:creator>
		<pubDate>Mon, 03 Jul 2006 03:04:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/#comment-23277</guid>
		<description>Glyph,
Unfortunately, I don't have the experience with Bob that you do, so I can only go by what he posted. I've got a lot of experience in developing cross-platform applications and that experience tells me that even when the problem only appears on one OS, it's most likely your code that is at fault. It is very easy to assume that some behavior is consistent or should be consistent across platforms when in fact no such guarantee is made. I agree it's possible that Apple have worked around bugs in OS X and it is definitely just anecdotal evidence, however it provides as much evidence that OS X works as Bob has that it doesn't. If there is actually a problem with handling large number of connections in OS X, then you should (if you haven't already) create a simple test case and report it to Apple. They will either confirm the problem or point out what's wrong with the test case you're using - it is in fact quite common to miss a key API call that is only required on OS X and thus trigger problems.

None of these problems are caused by a lack of source code. In every case, it is possible to diagnose the problem without looking into the kernel source code. In fact the source code may well be a red-herring as in the example you mention with the network card drivers. By looking into the kernel source you only check the drivers, but neglect to check that the actual network card hardware isn't at fault. A better way to check that the problem isn't specific to the network card is to switch it with another type - preferably one that is known to work on another OS. Digging through kernel source looking for a potential cause of the problem will take far longer than swapping the network card and testing it again. Even if you don't have a spare network card, profiling will determine whether or not there is a resource leak of some kind and usually point fairly accurately to any bottle necks, even in third party code which you don't have the source to.

If you a completely dependent on having source available it is usually an indication that you haven't developed the appropriate skills with tools like profilers, debuggers and general debugging/problem solving. If you like having the source code because it makes you feel more comfortable or you personally prefer to dig into the source instead of using profilers etc then that's fine - but having the source code is pretty clearly not required for serious development as the number of applications available for proprietary OS's clearly indicates.</description>
		<content:encoded><![CDATA[<p>Glyph,<br />
Unfortunately, I don&#8217;t have the experience with Bob that you do, so I can only go by what he posted. I&#8217;ve got a lot of experience in developing cross-platform applications and that experience tells me that even when the problem only appears on one OS, it&#8217;s most likely your code that is at fault. It is very easy to assume that some behavior is consistent or should be consistent across platforms when in fact no such guarantee is made. I agree it&#8217;s possible that Apple have worked around bugs in OS X and it is definitely just anecdotal evidence, however it provides as much evidence that OS X works as Bob has that it doesn&#8217;t. If there is actually a problem with handling large number of connections in OS X, then you should (if you haven&#8217;t already) create a simple test case and report it to Apple. They will either confirm the problem or point out what&#8217;s wrong with the test case you&#8217;re using - it is in fact quite common to miss a key API call that is only required on OS X and thus trigger problems.</p>
<p>None of these problems are caused by a lack of source code. In every case, it is possible to diagnose the problem without looking into the kernel source code. In fact the source code may well be a red-herring as in the example you mention with the network card drivers. By looking into the kernel source you only check the drivers, but neglect to check that the actual network card hardware isn&#8217;t at fault. A better way to check that the problem isn&#8217;t specific to the network card is to switch it with another type - preferably one that is known to work on another OS. Digging through kernel source looking for a potential cause of the problem will take far longer than swapping the network card and testing it again. Even if you don&#8217;t have a spare network card, profiling will determine whether or not there is a resource leak of some kind and usually point fairly accurately to any bottle necks, even in third party code which you don&#8217;t have the source to.</p>
<p>If you a completely dependent on having source available it is usually an indication that you haven&#8217;t developed the appropriate skills with tools like profilers, debuggers and general debugging/problem solving. If you like having the source code because it makes you feel more comfortable or you personally prefer to dig into the source instead of using profilers etc then that&#8217;s fine - but having the source code is pretty clearly not required for serious development as the number of applications available for proprietary OS&#8217;s clearly indicates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glyph Lefkowitz</title>
		<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/comment-page-1/#comment-22863</link>
		<dc:creator>Glyph Lefkowitz</dc:creator>
		<pubDate>Thu, 29 Jun 2006 18:57:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/#comment-22863</guid>
		<description>Adrian,

Did you actually run any tests of your own, or are you just willing to accept that because it's "grown up software" it isn't horribly broken?  Based on a very long personal experience of Bob's knowledge of the mac, I'm inclined to trust what he's saying here - not to mention the fact that I've done similar tests myself and OS X really does have atrocious TCP concurrency and throughput support out of the box.  Based on very long personal experience of software, if it looks broken, it's probably broken :).

Keep in mind that Bob mentioned that the same code runs without problems on *multiple* other platforms, so a resource leak is unlikely.  It's possible (though unlikely) that the leak is compensated for by the exact same bugs or non-standardized behavior in other platforms that don't share code, of course, but without the kernel source to OS X there's no way to trace the behavior all the way down to the hardware to figure out _why_ it's crapping out.  On linux, even if the problem isn't my fault, I can see what my code is making the kernel do.  This is super important.  I've never written a driver in my life, and I don't even compile my own kernel any more, but I still look at the source to linux on a regular basis.

There are dozens of ways Apple might be compensating for this, so that they can run their servers on their own platform and not embarass themselves.  Here are a few:

 - the web is a pretty low-concurrency network application, since most connections are dropped as soon as they are service.  it's doubtful that they have 16,000 connections concurrently.  In other words they may not need to compensate for the problem at all, it's just not a problem in the applications they're running.
 - they could use banks of front-end servers to avoid heavily loading any of them; after all, it's pretty cheap for apple to get a big pile of macs.
 - they could be using a development or "enterprise" version of the kernel which does not ship to the general public.  (This is unlikely, considering their kernel source has been open in the past, but Micrsoft intentionally hobbled its network stack for years before shipping a working one with the non-"server" version of their OS)
 - they could be using different network cards than the one Bob has tested with (maybe it's a driver problem?  no way to tell!  no source for the driver!)
 - they could be using non-mac network appliances on the front end (e.g. a Cisco load-balancer) to handle the sockets or a front-end proxy for static content, and trickling dynamic application connections through to the application servers to keep the load at a fixed level.

A sufficiently dedicated Mac fan might do all of these things on their own site, but why bother, if other platforms do this job better?  The software in question has already been determined to run on them.</description>
		<content:encoded><![CDATA[<p>Adrian,</p>
<p>Did you actually run any tests of your own, or are you just willing to accept that because it&#8217;s &#8220;grown up software&#8221; it isn&#8217;t horribly broken?  Based on a very long personal experience of Bob&#8217;s knowledge of the mac, I&#8217;m inclined to trust what he&#8217;s saying here - not to mention the fact that I&#8217;ve done similar tests myself and OS X really does have atrocious TCP concurrency and throughput support out of the box.  Based on very long personal experience of software, if it looks broken, it&#8217;s probably broken :).</p>
<p>Keep in mind that Bob mentioned that the same code runs without problems on *multiple* other platforms, so a resource leak is unlikely.  It&#8217;s possible (though unlikely) that the leak is compensated for by the exact same bugs or non-standardized behavior in other platforms that don&#8217;t share code, of course, but without the kernel source to OS X there&#8217;s no way to trace the behavior all the way down to the hardware to figure out _why_ it&#8217;s crapping out.  On linux, even if the problem isn&#8217;t my fault, I can see what my code is making the kernel do.  This is super important.  I&#8217;ve never written a driver in my life, and I don&#8217;t even compile my own kernel any more, but I still look at the source to linux on a regular basis.</p>
<p>There are dozens of ways Apple might be compensating for this, so that they can run their servers on their own platform and not embarass themselves.  Here are a few:</p>
<p> - the web is a pretty low-concurrency network application, since most connections are dropped as soon as they are service.  it&#8217;s doubtful that they have 16,000 connections concurrently.  In other words they may not need to compensate for the problem at all, it&#8217;s just not a problem in the applications they&#8217;re running.<br />
 - they could use banks of front-end servers to avoid heavily loading any of them; after all, it&#8217;s pretty cheap for apple to get a big pile of macs.<br />
 - they could be using a development or &#8220;enterprise&#8221; version of the kernel which does not ship to the general public.  (This is unlikely, considering their kernel source has been open in the past, but Micrsoft intentionally hobbled its network stack for years before shipping a working one with the non-&#8221;server&#8221; version of their OS)<br />
 - they could be using different network cards than the one Bob has tested with (maybe it&#8217;s a driver problem?  no way to tell!  no source for the driver!)<br />
 - they could be using non-mac network appliances on the front end (e.g. a Cisco load-balancer) to handle the sockets or a front-end proxy for static content, and trickling dynamic application connections through to the application servers to keep the load at a fixed level.</p>
<p>A sufficiently dedicated Mac fan might do all of these things on their own site, but why bother, if other platforms do this job better?  The software in question has already been determined to run on them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Sutton</title>
		<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/comment-page-1/#comment-22612</link>
		<dc:creator>Adrian Sutton</dc:creator>
		<pubDate>Wed, 28 Jun 2006 11:41:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/#comment-22612</guid>
		<description>Bob,
Considering Apple run their servers off of OS X, I highly doubt that the OS X TCP/IP stack cuts out after 16k connections - most likely there is a memory leak or resource leak in your code. You don't need the kernel source to track that down, just a good profiler and a willingness to admit the fact that it's more likely that your code is broken than it is that the OS is - even if you can't reproduce the problem on other OS's.

Blaming the lack of kernel source for not being able to track this down is merely a distraction for the fact that you aren't correctly analyzing your code.</description>
		<content:encoded><![CDATA[<p>Bob,<br />
Considering Apple run their servers off of OS X, I highly doubt that the OS X TCP/IP stack cuts out after 16k connections - most likely there is a memory leak or resource leak in your code. You don&#8217;t need the kernel source to track that down, just a good profiler and a willingness to admit the fact that it&#8217;s more likely that your code is broken than it is that the OS is - even if you can&#8217;t reproduce the problem on other OS&#8217;s.</p>
<p>Blaming the lack of kernel source for not being able to track this down is merely a distraction for the fact that you aren&#8217;t correctly analyzing your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Ippolito</title>
		<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/comment-page-1/#comment-22586</link>
		<dc:creator>Bob Ippolito</dc:creator>
		<pubDate>Wed, 28 Jun 2006 08:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/#comment-22586</guid>
		<description>In my experience, the Mac OS X TCP/IP stack is simply broken beyond belief and isn't suitable at all for server usage. In my tests, the stack just hangs every 16k connections or so. This doesn't happen on other operating systems that I've tested with (especially its closest relative, FreeBSD), and I don't have the source to the kernel to track it down.

Needless to say I'm not interested in deploying anything on OS X after this, but I do like to run tests on my workstation and expect them to pass when my code is correct.</description>
		<content:encoded><![CDATA[<p>In my experience, the Mac OS X TCP/IP stack is simply broken beyond belief and isn&#8217;t suitable at all for server usage. In my tests, the stack just hangs every 16k connections or so. This doesn&#8217;t happen on other operating systems that I&#8217;ve tested with (especially its closest relative, FreeBSD), and I don&#8217;t have the source to the kernel to track it down.</p>
<p>Needless to say I&#8217;m not interested in deploying anything on OS X after this, but I do like to run tests on my workstation and expect them to pass when my code is correct.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dalibor Topic</title>
		<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/comment-page-1/#comment-22008</link>
		<dc:creator>Dalibor Topic</dc:creator>
		<pubDate>Fri, 23 Jun 2006 16:52:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/#comment-22008</guid>
		<description>Apple's OS X internals documentation is a pathetic joke. The lack of source code just adds insult to injury to people who have to spend their time dealing with Apple's OS X in non-Apple environments. In short, as a server operating system, OS X has all the disadvanatages of Windows and Solaris, without having any qualities speaking for it, unless you are forced by Apple's strategy of embrace-and-extending standards like BOOTP in the client version of OS X into using it.

Otherwise, if you don't have a large number of OS X clients machines to deal with, OS X on a server is a pointless waste of time and effort, compared to the free as in beer and software alternatives (Solaris, GNU/Linux, *BSD, ...).</description>
		<content:encoded><![CDATA[<p>Apple&#8217;s OS X internals documentation is a pathetic joke. The lack of source code just adds insult to injury to people who have to spend their time dealing with Apple&#8217;s OS X in non-Apple environments. In short, as a server operating system, OS X has all the disadvanatages of Windows and Solaris, without having any qualities speaking for it, unless you are forced by Apple&#8217;s strategy of embrace-and-extending standards like BOOTP in the client version of OS X into using it.</p>
<p>Otherwise, if you don&#8217;t have a large number of OS X clients machines to deal with, OS X on a server is a pointless waste of time and effort, compared to the free as in beer and software alternatives (Solaris, GNU/Linux, *BSD, &#8230;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Thorne</title>
		<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/comment-page-1/#comment-21931</link>
		<dc:creator>Stephen Thorne</dc:creator>
		<pubDate>Fri, 23 Jun 2006 01:19:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/#comment-21931</guid>
		<description>I open the linux kernel sources twice a month. I'm a userspace developer, but just sometimes I want to do something obscure (like pass a file descriptor over a unix socket) and I get a weird error, I open the source to trace exactly how and why I'm getting that weird error that doesn't seem like it applies to the situation (I was trying to use a sendmsg containing a file descriptor and zero bytes of data). If I don't have the source, I don't have that option. I have to rely on the manpages and online documentation to be precisely accurate, and to predict all modes of failure.

On the other hand, I own a mac. The reason that developing software for the mac is a pain is because you have to use a third party tool like 'fink' or 'darwinports' to install software. You've got to use both because some pieces of software are broken on both.

And then you run into compatibility problems with 'normal' software (X11, autotools) that just doesn't work right unless you do the incantation in exactly the right way to build against your fink and darwinports libraries.

And then you run into problems with Apple just Getting It Wrong, like my saga recently with apple 'fixing' &lt;a href="http://shiny.thorne.id.au/shiny/2006/05/painful-learning-experiences.html" rel="nofollow"&gt;ranlib&lt;/a&gt;.

The Free OSs are great because the package management works, and everything builds.

OSX has neither of those qualities.</description>
		<content:encoded><![CDATA[<p>I open the linux kernel sources twice a month. I&#8217;m a userspace developer, but just sometimes I want to do something obscure (like pass a file descriptor over a unix socket) and I get a weird error, I open the source to trace exactly how and why I&#8217;m getting that weird error that doesn&#8217;t seem like it applies to the situation (I was trying to use a sendmsg containing a file descriptor and zero bytes of data). If I don&#8217;t have the source, I don&#8217;t have that option. I have to rely on the manpages and online documentation to be precisely accurate, and to predict all modes of failure.</p>
<p>On the other hand, I own a mac. The reason that developing software for the mac is a pain is because you have to use a third party tool like &#8216;fink&#8217; or &#8216;darwinports&#8217; to install software. You&#8217;ve got to use both because some pieces of software are broken on both.</p>
<p>And then you run into compatibility problems with &#8216;normal&#8217; software (X11, autotools) that just doesn&#8217;t work right unless you do the incantation in exactly the right way to build against your fink and darwinports libraries.</p>
<p>And then you run into problems with Apple just Getting It Wrong, like my saga recently with apple &#8216;fixing&#8217; <a href="http://shiny.thorne.id.au/shiny/2006/05/painful-learning-experiences.html" rel="nofollow">ranlib</a>.</p>
<p>The Free OSs are great because the package management works, and everything builds.</p>
<p>OSX has neither of those qualities.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/comment-page-1/#comment-21927</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 23 Jun 2006 00:49:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.symphonious.net/2006/06/23/real-developers-and-kernel-source/#comment-21927</guid>
		<description>The real fact OS X isn't seen as a server OS is because the hybrid of Mach plus BSD really blows for performance - there's a couple of Anandtech articles on this. Also see http://arstechnica.com/staff/fatbits.ars for some discussion on whether this will be fixed in 10.5</description>
		<content:encoded><![CDATA[<p>The real fact OS X isn&#8217;t seen as a server OS is because the hybrid of Mach plus BSD really blows for performance - there&#8217;s a couple of Anandtech articles on this. Also see <a href="http://arstechnica.com/staff/fatbits.ars" rel="nofollow">http://arstechnica.com/staff/fatbits.ars</a> for some discussion on whether this will be fixed in 10.5</p>
]]></content:encoded>
	</item>
</channel>
</rss>
