Open source developers have taken Apple to task for "undermining" a key piece of open source developer code in its Mac OS X implementation.
The software in question is DTrace, a well-known tracing framework originally developed by Sun Microsystems and later made open source as part of OpenSolaris. The tool allows developers to tune and troubleshoot applications and the OS itself, and requires tight integration into the OS kernel. Mac OS X has included Apple's implementation of DTrace since version 10.5 "Leopard."
But Apple quietly introduced a feature into its implementation that allows particular programs - such as iTunes - to disable tracing in DTrace and other debugging tools, according to Adam Leventhal, one of DTrace's original developers.
Moreover, the alteration actually breaks other parts of DTrace in a way that doesn't seem intentional, Leventhal said. While programs with the anti-tracing flag are running, other, unrelated probes will fail to operate, Leventhal said.
Apple has engaged with the open source world through projects such as its Safari browser and the Darwin project, which allows open source developers access to some of OS X's core components. Nevertheless, the company has been increasingly criticised over its approach to open source, which some have labelled opportunistic.
The latest controversy is unlikely to improve Apple's tarnished reputation in the open source world. Leventhal said in a recent blog post that aside from breaking some of DTrace's functionality, Apple's implementation "is antithetical to the notion of systemic tracing, antithetical to the goals of DTrace, and antithetical to the spirit of open source."
Aside from the symbolic effect of crippling an open source program for its own ends, Apple has actually broken the program in certain ways, Leventhal noted.
"They're not just crippling DTrace in the way they intended, but also in ways that are, in some ways, more pervasive," he wrote. "It's annoying that Apple decided to disallow tracing for applications that choose to opt out, and it's a fairly serious issue, but the bigger issue is that in doing so they've broken DTrace."
Apple did not respond to requests for comment, or to explain its implementation of DTrace, but developers noted that if the tool were able to scan programs such as iTunes it could reveal information about the workings of Apple's copy-protection systems.
Landon Fuller, a developer who helps run the MacPorts open source porting project for OS X, on Tuesday said he had come up with a workaround for the DTrace limitations.
Fuller said he agreed with Apple's critics that the program should not have been meddled with in the first place.
"This workaround is a hack, and I hold that the correct fix is the removal of PT_DENY_ATTACH from Mac OS X," he wrote. PT_DENY_ATTACH is the request type Apple uses to block tracing.
Application developers have long looked for a way to keep DTrace from probing their programs, in order to keep defects from coming to light, according to developer Brendan Gregg. "DTrace visibility should improve overall code quality in IT. Hopefully it will also encourage employers to hire better programmers," he wrote in a comment on a Slashdot forum. "Giving developers another option, to disable DTrace visibility, is allowing a backwards step."
Other observers took a more measured point of view. "Most likely, Apple's intent is to deliver a 'credible effort' to prevent circumvention and/or reverse engineering," wrote reader Mike Stone on a Slashdot forum. A reader of Leventhal's website using the handle "Rolf" agreed: "Like it or not, content creators and patent owners do have certain legal rights, which they can and do enforce against Apple, or anyone else who wants to use their intellectual property."
On the other hand, Apple is not the only company to find itself at odds with open source public opinion; Sun itself has a frequently uneasy relationship with the open source world.
In 2005 Sun president Jonathan Schwartz justified the company's controversial open-source strategy with an attack on the GPL (GNU General Public Licence), the most popular open source licence, which he characterised as a tool allowing United States businesses to pillage developing countries of their intellectual property.