Apple Quietly Fixes DTrace
In January we discussed a blog entry revealing that Apple had "crippled" its DTrace port. As the author notes in a followup post, to say that DTrace had been "crippled" was at least overstated: "Unfortunately, most reactions seized on a headline paraphrasing a line of the post — albeit with the critical negation omitted." In an updated entry, the poster notes that Apple has made good (so we have too): "One issue was that timer based probes wouldn't fire if certain applications were actively executing (e.g. iTunes). This was evident both by counting periodic probe firings, and by the absence of certain applications when profiling. The good news is that Apple has (quietly) fixed the problem in Mac OS X 10.5.3."
These sort of concurrency issues are bad enough when they're bug in your *own* code. When it's stuff in other apps producing what appears to be strange behaviour in your own (perfectly fine) code, that's a BIG problem.
This sort of issue wouldn't survive for a week on Linux.
It's not exactly rocket surgery.
Finally..
About 5 months! Damn, even Windows fixes its bugs faster. That's just sad and just another reason not to use Apple software.
Knowledge is power. Knowledge shared is power lost.
This was blogged about some days ago, but I'm glad that the news is out.
DTrace is used in all sorts of interesting ways. On the Belenix project, for e.g., we've sped up the LiveCD boot enormously, and this innovative use of DTrace is now part of the Distro Constructor Toolkit at opensolaris.org.
On my Dell D620, Belenix boots in about 3 and a half minutes (with KDE), while Ubuntu 7.10 boots up in about 8 minutes.
-- Sriram
http://www.belenix.org/
http://dynamicproxy.livejournal.com/
Your evilness index has just dropped from 45.8 to 45.3
Keep up the good work!
---
"The chances of a demonic possession spreading are remote -- relax."
Fail!
...and slashdot bends over backwards to apologise for ever doubting them.
You'd never see that happening if the same thing applied to Microsoft.
What is the connotation of "quietly" supposed to be in stories like this? (Not just with Apple.) It seems like a weasel word. Is the intention to give the impression that Apple embarrassedly corrected themselves, or that they were forced to give into pressure from the developer community, but don't have the cojones to admit it, or what? Because, anyone honestly expecting something other than a "quiet" fix is deluded. Is a bug fix in DTrace supposed to get a slide at a Stevenote or something?
I can prove it. Try this yourself. Write a simple c or c++ hello_word program. Then try to compile and link it with Xcode using -static. It won't work b/c Apple has fucked-up ld. You can even compile a GNU GCC suite from xCode, but there is no way to get around the fucked-up ld. How stupid is that?
What did you want, a friggin' parade?
Jeez, give a fruit a break.
No, but I did throw granola at a deaf person once
I'm sick of boot times measured in minutes.
What is this, 1980?
How many people here where actually affected by the D-Trace bug in OS X. I'd be willing to lay down 100 bucks that say 90% of the people that complained had no idea the bug was there until the story was posted ... including you. So why get so high and mighty about something doesn't even change your day to day activities. Seriously I own a Mac and I write software on it from time to time but does some missing functionality in D-Trace make a difference NO!
Its just another reason for D-Bags like you to make a stink.
Apple designed their port of DTrace so that any program could "opt-out" of profiling if the developers are concerned about reverse-engineering. An unintended consequence of this was that it sometimes broke profiling of other apps while those apps were running. They've fixed that bug in their implementation of crippling, but that doesn't mean they've un-crippled it.
It's a big step forward, because now at least developers can properly profile their own code. However, one of the purposes of DTrace is to profile _anybody's_ code, in order for example to diagnose performance problems on your computer perhaps caused by those programs. Apple has intentionally left that feature out. So it's arguably still pretty crippled.
There are still several apps to which you can not attach DTrace, such as iTunes. The issue described in the first blog post hasn't been corrected, you can still set NOATTACH and your process is then untraceable. (Not that shitty movie, but you know what I mean.)
The issue isn't (really) that timer counts are wrong, but instead, the far more interesting thing is that there are "special" processes that you can't touch and everyone is now suddenly OK with that because the timers count correctly.
They should still be able to beat 1980 floppy boot times using a CD-ROM.
Yes, I know they're doing a lot more than in 1980.
That's the problem. How much of what they're doing is necessary?
The previous discussion generated hundreds of posts within a few hours, and topped out at 476. This one is at 60 comments after 3 hours and will be lucky to break 100. If you've ever wondered why Slashdot posts flamebait stories, there's your answer. "If it bleeds it leads."
Build a man a fire, he's warm for one night. Set him on fire, and he's warm for the rest of his life.
Any idea when they'll fully implement ptrace() or is that not on the table?
...for those fanbois who still feel the need to personally thank Uncle Steve, he is currently bent over in reception with his trousers round his ankles waiting for you.
Gentoo Linux - another day, another USE flag.
So just as a tought experiment, what's to keep me from compiling code that sets this flag and then
using oh I dunno any hex dump program to see what the system call and parameters looks like?
Once I know that pattern I can easily patch any binary in the system with perl and remove the offending
system call by instead setting the syscall parameter to a safe value, substituting in NOPs, etc.
I guess what Apple is saying is they don't want casual dtracing of their binaries because anyone
savvy enough can remove the system call, as of course they still have root.
Unless OS X supports hardware-enforced signed binaries, of course. Which it doesn't.
I work with hundred thousand files and compile from the command line (a single command even):
$ make
does the trick at the top directory. Yes, that means you have to maintain the makefile but that's not that hard to do and is not done daily or even weekly.
As the island of our knowledge grows, so does the shore of our ignorance.