Apple Crippled Its DTrace Port
Linnen writes in to note that one of developers of Sun's open source system tracing tool, DTrace, has discovered that Apple crippled its port of the tool so that software like iTunes could not be traced. From Adam Leventhal's blog: "I let it run for a while, made iTunes do some work, and the result when I stopped the script? Nothing. The expensive DTrace invocation clearly caused iTunes to do a lot more work, but DTrace was giving me no output. Which started me thinking... did they? Surely not. They wouldn't disable DTrace for certain applications. But that's exactly what Apple's done with their DTrace implementation. The notion of true systemic tracing was a bit too egalitarian for their classist sensibilities..."
As quickly as the issue is reported, a hack comes out to resolve it. Gotta love how quickly the community can respond to these things.
Could this to help prevent circumvention of DRM?
Come on, this isn't a class struggle. It's Big Business trying to protect their intellectual property. DRM sucks, this is yet another way in which it degrades computer systems. But Apple's just being a company, and their hack to DTrace is actually good coding. Dislike their choice, sure. But there's no epic struggle for humanity here.
Apple is as much the DRM laden threat to open computing as Microsoft is. We may have circumvented this issue this time, but what about the time after that? and after that? Its a cat and mouse game Apple is going to play.
This will be a big help for me in my quest for a legion of Mac zombies
I don't care if it's 90,000 hectares. That lake was not my doing.
From the DTrace source (in an #IFDEF APPLE):
/*
* If the thread on which this probe has fired belongs to a process marked P_LNOATTACH
* then this enabling is not permitted to observe it. Move along, nothing to see here.
*/
Luckily no malicious programmer will mark their malware's process with this flag!
You of all people should know that you give up your freedom to use your software and hardware as you wish when you use proprietary software. Apple's continuous attempt to stop people from changing software on their home computers is a good example of how they feel about freedom. They only side with freedom when it is immediately beneficial.
Is "egalitarian" the Slashdot word of the day today?
Could this to help prevent circumvention of DRM?
Of course.
The interesting issue is that nobody can compete with Apple on, say, a music store effectively.
When they add a new iTunes feature, they can change Quicktime to support it or they can disable DTrace so people can't easily reverse it. Nobody else can do that. They're probably not going to get into a DOJ tiff over it, though - Bush [the _ administration] isn't likely to get into it, and Al Gore is on their board.
And so it's probably not surprising that the iTunes DRM defeaters are on Windows, which is where their sales base is anyway. So, spending this effort on OSX is really just a waste of time.
Personally, Amazon is my iTunes DRM defeat. I own a total of 2 iTunes Plus songs - they never have anything I want without DRM.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Fuck me, it's like a Student Union bar in here. What next, comrades, do we storm the Winter Palace or just go and sell some copies of Socialist Worker?
If you haven't made a developer cry, you've wasted a day.
Oh, piffle. Without Apple DRM, iTunes (store) would be impossible due to the idiot record labels. Go grouse at them. Outside of iTunes, what is there in Mac OS X that's DRMed?
When Apple begins sending out legions of hunter-killer robots to take down open source projects and assassinate their maintainers, then you might have a point, Mr. Zombie, sir.
Quote:
"So Apple is explicitly preventing DTrace from examining or recording data for processes which don't permit tracing. This is antithetical to the notion of systemic tracing, antithetical to the goals of DTrace, and antithetical to the spirit of open source."
Diagnostic tool that won't look at all processes is no tool at all.
You can't talk about Wikipedia's flaws on Wikipedia
Are you kidding?
This is Slashdot where "paper or plastic" is an epic struggle directly and immediately affecting the fates of billions!
BILLIONS, I tell you! BILLIONS!
The article says, "To say that Apple has crippled DTrace on Mac OS X would be a bit alarmist..." So what is the Slashdot headline? "Apple Crippled Its DTrace Port"
Nice...
Basically profile and tick are useless since they will not fire if a thread with PT_DENY_ATTACH is on proc. Perfectly good DTrace scripts simply will not work correctly on OS X.
It's like this every time kdawson takes a turn posting stuff to the front page. Wish he'd join up with his natural comrades at digg.com and take the tired rewarmed leftovers of 19th and 20th century politics away with him.
(Note: IANA DTrace user or developer.)
The real effects seem to be that while a process which sets this flag has control of the system, any DTrace events that fire off during this time will not be detected, as if they never occurred, regardless of whether what is being traced has anything to do with that process. It seems to break a few important(?) idioms used by DTrace users, so that the results returned are not what they should be.
The furor seems to be that this subtle breakage has gone undocumented; and although only iTunes currently uses it, that does not stop other software (including software that should not be there) from using it. That a DTrace developer discovered this, combined with that this is in all likelihood being done for no reason other than that of DRM, is what makes this notable. If I were working on DTrace, I'd probably be pissed too.
Isn't this a F/OSS program? Couldn't you just recompile an uncompromised version of the source?
Knowledge is power. Knowledge shared is power multiplied.
Together with careful use of the Evil Bit by malicious coders, we will have complete security in Apple system software.
Excuse me, but please get off my Pennisetum Clandestinum, eh!
I've never seen Apple market OSX as a Unix system or even talk about the shell.
Its main market is for an easy to use home computer and as a creative platform for video editing, graphic design and professional audio.
If you want a command line you're fully in control of, use Linux or a BSD Unix.
It's a commercial OS and Apple will do what they like so long as its legal.
The /. summary and most of the /. posters seem to be missing the point of the article. (To be fair, the author wasn't too clear himself. He's done some clarification in the comments section of his article.)
Sure, it's annoying that DTrace can't "see" iTunes. But that's more of a DRM issue. Whether you agree with DRM and Apple's implementation of it or not, this DTrace feature is merely a logical extension of that issue.
The real problem though is that this feature actually does break iTunes. If DTrace probes while the iTunes application happens to be the application currently running on the CPU, the DTrace probe won't run. (It's technically a thread of iTunes' at that moment.) So not only will DTrace not show iTunes, it won't show ANY information until it happens to fire off when iTunes isn't the app running on the CPU.
It is fair to say that Apple has made a change to DTrace that has introduced a bug that they need to fix. It is possible for them to fix that bug while continuing to block using DTrace on iTunes.
Is it just my imagination or is this post a dupe? And a positively moderated dupe at that (twice!).
Not that I mind, but suddenly I feel at least 50% less efficient.
Quack, quack.
It's nice that Dtrace works again. But I'm betting a lot more people use After Effects or Premiere. The QT 7.4 update which enables movie rentals from iTunes breaks any render that takes longer than 10 minutes. Thank god DRM is here to protect me from the work I need to do. Wasn't apple supposed to me the machine for media professionals?
http://blogs.adobe.com/keyframes/2008/01/dont_update_to_quicktime_74.html
There's no friendship, you're just a fan and Apple rakes in your money. They love this cult like status, some of it is well deserved, their design is unmatched in the computer field. If Mac fans were a little more reserved instead of opening their wallets then Apple would stop and think a bit more.
:)
I'm by no means a fan boy, I own a Mac Pro and I run Leopard. They're just tools and even with Apple's flaws I'll still with them until something better appears.
Right now I'd sooner eat a slightly damaged apple than look through broken windows
I just don't see what the big deal with all of this is. Smart people don't touch ITunes, because it's just going to help feed the beast. People seem to have forgotten how Jobs ran Apple the last time he was in charge. He's merely a lot more charismatic than Gates. But they are both equally self-serving.
Thankfully there are options which involve neither company.
Darwin is Apple's stuff. They made it. It is based on BSD, but the BSD license doesn't require them to release the source (does it? IANAL). It is also based on NeXTSTEP, which was acquired by Apple in the 90s.
Apple's record with open source is inconsistent. Sometimes they develop internally and release source (Darwin, Bonjour), sometimes they collaborate with open source projects and share (WebKit with KDE), sometimes they buy out someone's software (Cover Flow), sometimes they steal ideas and never credit original authors (Dashboard).
Apple has its own open source license, the Apple Public Source License, approved by OSI and the FSF. However, they also release under the Apache license as well.
I would say in general, Apple is very open source-friendly, and a lot of open source developers I know have flocked to the Mac. It's just sometimes they have some evil empire corporation actions that make us Apple users shake our heads.
Scorta futuere amo!
Yes, it's annoying - every time we examine the system we are now looking at everything except for iTunes (and possibly Spy-WaR3 ;-). But this issue is about more than just that.
I've introduced DTrace to many companies. While most people love it, some developers of closed source software are concerned about people DTracing their code. DTrace allows customers to gather proof of bugs that are embarrassing, hard to fix, or that the developers have deny existed. I've been asked many times if DTrace can be disabled for an application, usually to avoid negative publicity from the bugs that DTrace will expose. The answer has always been no. It's been great to see developers accept this reality and escelate bug fixing.
This is expected - DTrace visibility should improve overall code quality in IT. Hopefully it will also encourage employers to hire better programmers - since if customers don't use DTrace to point out embarassing bugs, then competitors may. It also erodes reasons to stay closed source - customers can use DTrace to see the code anyway.
Giving developers another option, to disable DTrace visibility, is allowing a backwards step from the future.
It is DRM'd to only run on Apple hardware. There is nothing technical that prevents it from running on any modern PC since that is indeed what Macs are now. However that won't work, hence there are groups out there that have to hack it to disable that and allow it to run on any hardware.
You can argue till your blue in the face that they need to do this, doesn't change what they are doing. If it wasn't DRM'd, it'd run fine on any hardware that met its technical requirements.
I agreed, if MS had done this, the mob would already have gathered. :-p
Now it's more about "Thankfully a hack is already out. Move along folks, it was just another DRM decision by Apple."
Beware: In C++, your friends can see your privates!
It's a real shame that you can't trace iTunes. I was all set to reverse engineer it and use the code to make my own total fucking abortion of a media player. Now I'll have to settle for grafting a horrible GUI onto Mplayer, removing most of the supported formats and making it sleep without releasing the CPU 90% of the time. If I can work out some way to reliably fuck up the contents of the user's iPod, then I doubt anyone will notice the difference.
It will be tricky to make the Windows port twice as horrible though. Maybe I can get it to punch the user in the face every ten minutes?
Then, they came for gettytab, but I did not speak out, because I was happy with Apple's default terminal configuration.
Then, they came for snort, but I was not worried about intrusion detection so I did not speak up.
Next, they came for mkdep, but I did not speak out, because the maid does all my compiling.
Sadly, when it came time for them to use killall, there was nobody left to speak up for me!
Mac haters really are drama queens, aren't they? Here, read this.
Leopard's DTrace isn't broken. Apple put in an API for a program to request that debugging & dtrace be disabled for it. Clearly it's there to keep FairPlay from being broken (too easily). Something that commercial developers could understandably want for their software, to prevent keygen hacks, etc.
The link I provide shows a simple way to get around it. Hell, debugging iTunes is directly encouraged in an Apple Technote (linked in the article).
As listed in the article I linked to, you can get around it by trapping the API call in gdb and disabling it.
Care about electronic freedom? Consider donating to the EFF!
The guy wants Apple to ship a working DTrace. Why should they? To regain community goodwill and get absolution from an official DTrace developer. He left the door open for that. That's the carrot. By publicizing statements on his blog and getting it submitted to Slashdot, he has proved how much trouble he can stir up. By understating the case, he reserves the threat of stating it plainly if they take no action. That's the stick. Now Apple has to weigh community goodwill against DRM dollars and decide whether to ship a working DTrace. Whereas, if he had immediately shoved the carrot up his ass and started flailing around with the stick, Apple would have shrugged their shoulders and moved on.
We never ever criticize our heroes ever.
The difference you seem to be missing here is that Steve Jobs only occasionally does a boneheaded thing like this against his fan base. Bill Gates only occasionally doesn't.
Weaselmancer
rediculous.
forgot the ruby slippers...
I call BULLSHIT.
If they're selectively telling this app NOT to log "certain types of traffic", and give no notification of such, or allow the functionality to be restored, then it's CRIPPLED.
I'm so sick of apologists telling me that stuff that's broken is broken for a good reason and that I should be glad someone deigned to allow me to hack it back to some semblance of functionality without getting sued into oblivion!
Chas - The one, the only.
THANK GOD!!!
We are more forgiving of people who aren't more chronically evil, life just is that way, get over it.
Nobody and nothing is perfect, this does NOT mean that everything imperfect, is equivalent.
Do you divorce your wife for making occasional mistakes? No, only if she is habitually and frequently bad. Are you more forgiving of a son who just occasionally screws up lightly, as opposed to one who does drugs and steals from you and ends up in jail regularly? Of course. Is every political leader who has lied at least once, just as bad as Hitler? Is somebody who beats his wife every day equally bad to somebody who once slapped his wife over 50 years of marriage?
Please, stop with this pretending that all things are equivalent. There is NO double-standard here.
The best thing to do now is to make DTrace as useless as possible until Apple removes this limitation.
Every developer reading this who cares about DTrace and wants to be able to use it for system-wide metrics should set the P_LNOATTACH flag in the next point release for their app. Apple won't like it, but if enough developers do it as a form of protest, it would effectively make DTrace/Instruments ineffective, eliminating a bullet-point feature from Leopard.
Maybe everyone knows what dtrace is. I didn't. Then I watched this: link and now I do.
http://ed.markovich.googlepages.com
Apple is Las Vegas, Microsoft is Atlantic City. In both cities you wake up with a hangover and an empty wallet most of the time, but Las Vegas is a lot prettier so you feel better about it.
That's because the CEO of Apple wrote and published an open letter on their website expressing his desire to rid their music store of DRM, and the CEO of Microsoft has done no such thing, instead integrating DRM support into their entire audio and video driver stack. (To the detriment of the stability and functionality of the rest of the OS, I might add...) Please, please, let me know when Microsoft (or a major figurehead thereof) takes an official position against DRM. I'll be waiting eagerly.
Remember, that's the same CEO that refused to remove the DRM off of non-RIAA tracks, even at the request of the copyright holders, until he had colluded with major labels to design iTunes Plus. Double standard indeed.
Back in 2000, if you installed MacsBug on a Mac you couldn't play DVDs. When you opened the DVD Player you got an error message telling you a debugger was installed. In these pre-memory protection days, MacsBug was the only debugger low-level enough to catch a whole mess of problems. Unfortunately, MacsBug was loaded when the system booted, so the only way to play a DVD was to remove MacsBug and restart your machine.
Long time Mac developer ally Bare Bones Software (they have a great text editor) created a patch that "fixed" this limitation. AFAIK, Apple never said anything about their patch and just quietly let it exist. http://www.macobserver.com/news/00/april/000418/dvdplayerhelper.shtml
This whole message mess came about because Macrovision didn't want people disabling their protection on video-output (there were Macs you could literally plug into VCRs then), and I suspect it was also to guard the CSS "encryption."
When Blu-ray movies finally show up in Macs, this kind of thing is probably going to get a lot worse than patches to D-Trace.
EULA: "Sharing is stealing".
BSD licence: "Sharing is not stealing".
GPL2 = "Not sharing is stealing".
GPL3 = "Not sharing is definitely stealing, but just simply sharing is not necessarily not stealing either".
The BSD licence interpreted literally can permit distribution of binaries without Source Code. The BSD people work their backsides off to ensure that nobody does this. The GNU people decided to write their own licence explicitly forbidding it. There is no other word for this except laziness. On the other hand, taking somebody else's code to use in your Caged software project, as opposed to writing it yourself from scratch, is also laziness; so those who bitch about it are like the pot calling the kettle black.
Je fume. Tu fumes. Nous fûmes!
Simply because a fanboi doesn't see the need for full dtrace functionality doesn't mean it's a Good Thing to disable it.
Doing so is simply the first step on the slippery slope to disabling it for other things.
If you want to pay someone for the privilege of computing on a system that's essentially a black box, more power to you.
Other people don't.
Chas - The one, the only.
THANK GOD!!!