Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
OS X Businesses Operating Systems Apple

Apple Quietly Fixes DTrace 144

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."
This discussion has been archived. No new comments can be posted.

Apple Quietly Fixes DTrace

Comments Filter:
  • by cibyr ( 898667 )
    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.
    • by morgan_greywolf ( 835522 ) * on Wednesday June 11, 2008 @07:15AM (#23745633) Homepage Journal
      While it might have seemed to some that tinfoil hats were in order (and maybe some might think they still are), it seems to me that this was likely just a bug in Apple's port of DTrace. Does anyone know if they posted (or will post) any patches for DTrace upstream?
      • by Anonymous Coward on Wednesday June 11, 2008 @07:37AM (#23745851)

        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 so they added this glob of lard into dtrace_probe() -- the heart of DTrace:

        #if defined(__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.
        */
        if (ISSET(current_proc()->p_lflag, P_LNOATTACH)) {
        continue;
        }
        #endif /* __APPLE__ */
      • by jonwil ( 467024 ) on Wednesday June 11, 2008 @07:43AM (#23745927)
        Its clear from the DTrace source from Apple that this is intentional. The OS has a "this app cannot be debugged" flag and they deliberatly made the decision that "cannot be debugged" == "cannot be DTraced"
        Most likely they are trying to prevent tracing/debugging/reverse engineering of apps like iTunes and QuickTime that host ITMS DRM content.
        • by Anonymous Coward on Wednesday June 11, 2008 @08:04AM (#23746169)
          Surely you could just recompile dtrace for mac os x without the check though?
          • by somersault ( 912633 ) on Wednesday June 11, 2008 @08:26AM (#23746453) Homepage Journal
            Obviously DRM crackers are incapable of this level of ingenuity (if you live in cuckoo land that is..)
          • by flithm ( 756019 )
            Not necessarily. If they did their jobs correctly then the "check" wouldn't be in the dtrace app itself. It would be at the operating system level... an app would designate itself not debuggable, then the kernel api calls that dtrace uses to enumerate the list of running apps it can investigate simply wouldn't return the non-debuggable apps.

            Although I've no idea if this is the case, or what they've done, I suspect they simply fixed the underlying calls that dtrace uses to report on non-debuggable apps, wh
          • by makomk ( 752139 )
            Apparently, some of the code required to do so isn't available - you can read and modify the code responsible for the DTrace lockout, but without the rest of the code - just as object files and headers, source code isn't needed - there's no way to replace it with the modified version. (Since DTrace is under the CDDL and not the LGPL, I don't think there's any requirement for Apple to provide the necessary files to replace the code with a modified version.)
          • Re: (Score:2, Informative)

            by LordGilman ( 573142 )
            You don't even have to recompile dtrace, there's a kernel extension that patches around Apple's code. http://landonf.bikemonkey.org/code/macosx/Leopard_PT_DENY_ATTACH.20080122.html [bikemonkey.org]
      • by Lally Singh ( 3427 ) on Wednesday June 11, 2008 @08:01AM (#23746133) Journal
        It was apple-specific. They had a "don't debug me" flag that a process could set at startup (to protect DRM). But there was a bug in the interaction of these processes that could cause dtraced processes to take *forever*.
    • by powerlord ( 28156 ) on Wednesday June 11, 2008 @07:18AM (#23745667) Journal

      This sort of issue wouldn't survive for a week on Linux.


      Developer specific issues like this would certainly be fixed quickly under Linux, since it is a developer OS. On the other hand, usability issues that get fixed quickly under OS X, are often left to languor under Linux.

      In both cases those features may never be fixed under Windows (or would be broken again after the next "Service Pack" :P )
      • by argent ( 18001 )
        On the other hand, usability issues that get fixed quickly under OS X, are often left to languor under Linux.

        That's an ongoing problem with open source software, even on OS X. Camino, the "usability" oriented Gecko browser on OS X, has years-old issues.

        On the gripping hand, Apple still hasn't cleaned up Finder, though I congratulate them for finally ditching Metal. The "Cocoa-ized" Leopard Finder has major regressions (for example, it no longer tracks different views of different folders).

        Safari on Windows
        • Re: (Score:3, Informative)

          Their passive-aggressive relationship with multiple mouse buttons is a crying shame.

          To be honest, to me this seems like a thing of the past. Apple-critics tend to use it as an argument against Macs but really, that was fixed when the Mighty Mouse came out. I would argue even before that, since I was using out-of-the-box (as in drivers already installed) a Microsoft 5-button mouse on my first Powerbook, and could configure all the buttons. If you're working on a Macbook or Macbook pro, I find the "double-finger click" (whatever you want to call it) equally if not more convenient than havin

          • To be honest, to me this seems like a thing of the past. Apple-critics tend to use it as an argument against Macs but really, that was fixed when the Mighty Mouse came out.
            for desktops yes (and as you say you could use a third party multi button mouse before that) thier laptops still come with only one button below the touchpad though.
            • by krunk7 ( 748055 )

              for desktops yes (and as you say you could use a third party multi button mouse before that) thier laptops still come with only one button below the touchpad though.

              I've come to prefer this setup in laptops. Most clicking done is left clicking, when I switch to a windows laptop I find myself inadvertently hitting the right click constantly. I prefer the precise control offered by a ctrl+click which is (for me) less prone to accidental clicking. I'm not saying your preference is bad, or that mine is super

          • by argent ( 18001 )
            To be honest, to me this seems like a thing of the past. Apple-critics tend to use it as an argument against Macs but really, that was fixed when the Mighty Mouse came out.

            The mighty mouse is exactly the kind of passive-aggressive **** that I'm talking about. The Mighty Mouse does not allow chording, and to reliably get right clicking out of it I have to hold my hand in an uncomfortable position tat severly aggravates my RSI. I use a Microsoft wheel mouse, the two-button-plus-wheel cheap mouse, and it works
            • by krunk7 ( 748055 )
              I've never used a one button mouse with mac. I've never used the bundled mighty mouse. I've never used the bundled mouse with OEM windows machines (hate them, very un ergonomic and give me carpal).

              In this sense (using a 3rd party multi-mouse button with my desktop purchase), nothing has changed from windows to osx.

              For my thoughts on the one button laptops, I prefer it. Some folks like one model of car, some like others. I wouldn't say it's because one car manufacturer has a hatred for features in the ot

              • by argent ( 18001 )
                For my thoughts on the one button laptops, I prefer it. Some folks like one model of car, some like others. I wouldn't say it's because one car manufacturer has a hatred for features in the other. It's just a matter of options/choice/preference. Choice is good? amiright?

                When I can buy OS X retail and install it on a Thinkpad I'll be happy to agree with you.

                Since that's not going to happen, where's the choice?
                • by Dog-Cow ( 21281 )
                  When I can buy a Focus with the interior of a Jaguar, your analogy might make sense.

                  Since that's not going to happen, what the hell are you talking about?
                  • by argent ( 18001 )
                    I think you understand exactly what I'm talking about.

                    The message I was responding to was talking about having different kinds of input devices on laptops being good because it gives you a choice.

                    An operating system is not just bucket seats and woodgrain steering wheels. Windows is not an option (don't even think about arguing with that one) and until I can get the same variety of commercial desktop software for Linux as I can for OS X then Linux is not an option (don't even start on running Windows in a VM
            • by Dog-Cow ( 21281 )

              I've been working on the Macbook Pro since it's been out, and it doesn't work worth a damn for me.
              You should go to an Apple Store and have the local Genius teach you how to use it. It's so simple, even a slashdotter should be able to figure it out.
        • Re: (Score:3, Informative)

          Their passive-aggressive relationship with multiple mouse buttons is a crying shame.

          I find their stance on mouse buttons to be ideal. As a usability expert, I can assure you misuse of secondary mouse buttons is one of the most common usability problems, even for more advanced users, although they often do not consciously note it. For novice users, a single mouse button is by far preferable. For trackpad users, both novice users and power users complete tasks faster using two-finger taps or chording... with only midrange users having issues. Standardizing one one button as the requirement

          • Re: (Score:3, Informative)

            by argent ( 18001 )
            As a usability expert, I can assure you misuse of secondary mouse buttons is one of the most common usability problems,

            Argumentum ad verecundiam. I've been seeing people make claims like this for almost 25 years now, and I have yet to see a single credible study that supports it.

            Single button mice are more "demo friendly". That's it.

            * Applications are *not* as consistent as you claim. There are many actions even in Apple's apps that are only available through the contextual menu, or through magic chords.

            * T
            • Re: (Score:3, Funny)

              by NMerriam ( 15122 )

              Argumentum ad verecundiam. I've been seeing people make claims like this for almost 25 years now, and I have yet to see a single credible study that supports it.


              Anyone who has spent a day answering phones on a tech support line can confirm that mixing up mouse buttons is a common issue.

              "right click on the icon"
              "double click?"
              "no, ma'am, click the right button on your mouse"
              "how do I know which button is the right one?"
            • Argumentum ad verecundiam. I've been seeing people make claims like this for almost 25 years now, and I have yet to see a single credible study that supports it. Single button mice are more "demo friendly". That's it.

              What are you talking about? Have you ever performed a usability study on a modern computer? There is always at least one person messing up and hitting the wrong button. I once thought I was going to get away without that problem when testing an interface for network security experts, but sure enough one of the top guys at AT&T (a really bright guy by the way) who was helping us test accidentally clicked the wrong button while trying to access a menu. This is an absurdly common issue. To claim it has n

              • by argent ( 18001 )
                Have you ever performed a usability study on a modern computer?

                No, but I've read as many of them as I can get my hands on, and have found none of them credible. It's easy to see the errors: you'll find them comparing mockups of user interfaces that never actually got implemented, or user interfaces that are clearly designed to make one or another operation work better, or have taken the interface the experimenter doesn't like to extremes (like the "five button mouse"). I have, for the past quarter of a cent
                • Have you ever performed a usability study on a modern computer?

                  No, but I've read as many of them as I can get my hands on, and have found none of them credible.

                  So you're claiming the entire field of scientific research into usability is not credible, and the alternative you're proffering, is your own personal opinion backed up by no data whatsoever? I've got to tell you, that's not very persuasive.

                  I have, for the past quarter of a century, rarely even had any user interface experts provide an example of a study other than Apple's original flawed work.

                  Have you considered actually going to HCI conferences, subscribing to the journals, or just reading the academic papers published online. There are a lot of rigorous usability studies, usually testing a particular interface and looking for problem tasks/workflows.

                  I'm an advanced user. I have decades of experience with Macs and just about every other user interface that uses a mouse and windows, including every version of Mac OS, the Lisa, and all three of the GUIs Xerox developed on the Dorado and Dolphin boxes. I am still discovering magic keys in Apple applications by means of word-of-mouth and google.

                  • by argent ( 18001 )
                    So you're claiming the entire field of scientific research into usability is not credible

                    No, I'm claiming that I haven't had anyone provide a credible study. There may be some, but they all seem to be locked up somewhere.

                    Most people respond by asserting that I am rejecting an entire field of scientific research, but decline to actually provide a reference to a single study to support this assertion.

                    Have you considered [...] just reading the academic papers published online.

                    Well, hey, you want to be an excep
        • by wootest ( 694923 )
          Finder was only "Cocoa-ized" to the point where Cover Flow is a Cocoa view. The rest is Carbon, it's just mostly a lot faster. The regression is actually, if you're to believe Apple design documents, a 'feature' since the view is now global. I guess it does solve the nearly impossible-to-predict mess that was there before to determine the view for a particular folder, but only in the same way that blowing up a car with a flat tire solves having a car with a flat tire. And for fucks sake, who decided we only
      • by init100 ( 915886 )

        On the other hand, usability issues that get fixed quickly under OS X

        One area where they haven't fixed serious usability issues is in Spaces. They updated the behavior in 10.5.3, but I wouldn't call that an improvement. Until they fix Spaces to work better, I'd consider it a case of shipping beta-quality software.

      • On the other hand, usability issues that get fixed quickly under OS X, are often left to languor under Linux.


        I have only one thing to say on that: FTFF.
    • Re: (Score:3, Informative)

      by Ephemeriis ( 315124 )

      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.

      If you read the original story, which this one is an update to, then you'll see that there are no bugs - only features.

      Apple intentionally disabled DTrace on some software.

      You can actually take a look at Apple's DTrace source.

      • by init100 ( 915886 )

        Apple intentionally disabled DTrace on some software.

        Yes, but did they intend to disable tracing of all applications running concurrently with a non-traceable application? Which is what they did.

    • by kscguru ( 551278 )
      Wishful thinking.
      • Linux STILL doesn't have DTrace, they use kprobes(?) instead because somebody claimed it was almost as good (DTrace users know the Linux equivalent is woefully inadequate and needs several years to even reach feature parity). Not-Invented-Here syndrome.
      • Look at kgdb, which Linus finally merged parts of after many years. Linux feels developers shouldn't be using debugging tools on the kernel. Any bets on whether he would merge DTrace at all?
      • Even if Linux had DTrace, this fix would be a
  • Good news (Score:3, Interesting)

    by Anonymous Coward on Wednesday June 11, 2008 @07:21AM (#23745679)
    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/
    • The better question is: how bad is your D620 that Ubuntu takes 8 minutes to load? I've never seen longer than 5, and that was on a Celeron 633 w/ 96MB of RAM.
    • by Anonymous Coward on Wednesday June 11, 2008 @07:39AM (#23745883)
      That's just sad. You shouldn't flash those numbers in public.
    • I'm sick of boot times measured in minutes.

      What is this, 1980?
      • by rekoil ( 168689 )
        Don't forget he's talking about LiveCD boot times, not boot times from hard disk...
        • 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?
          • by laffer1 ( 701823 )
            I don't think you realize how big gnome/kde actually are.
            • by argent ( 18001 )
              I don't think you realize how big gnome/kde actually are.

              I don't think you're looking at the problem right. :)

              "How big Gnome/KDE are" is part of it.
              • by laffer1 ( 701823 )

                Well people expect different things from a live CD than an DOS boot floppy.

                Now boot media has to support networking, and include as a full desktop environment. Imagine trying to boot dos + WFW 3.11 on floppy, plus a dialer and netscape. Not to mention people used to tweak boot floppies for their systems and not load extras.

                • by argent ( 18001 )
                  Well people expect different things from a live CD than an DOS boot floppy.

                  What does a Live CD need to do *at boot* that an HP Integral or Amiga 1000 don't? They all boot to a GUI with windows, icons, a desktop, and so on.

                  Imagine trying to boot dos + WFW 3.11 on floppy, plus a dialer and netscape.

                  I don't have to imagine it, I've done it. Pointing to a REALLY bad implementation that (by the way) Gnome is doing a really BAD job of emulating is hardly the way to convince me that the bloat of Gnome and KDE is j
                  • by laffer1 ( 701823 )
                    You're misinterpreting what I'm saying. I agree that Gnome and KDE are too bloated. Most software is these days. People are taught that memory and disks are cheap so it's OK to code badly. My point is that people expect more from a "boot disk" now than they did 10-20 years ago. So any benefit from new hardware is lost on the extra cruft we get along with it. Many gnome applications are written in python now. I find that insane.

                    Most people do NOT tweak live CDs. So comparing them doesn't make sense.

                    • by argent ( 18001 )
                      My point is that people expect more from a "boot disk" now than they did 10-20 years ago.

                      And I'm not talking about "how much stuff do you put on the disk". It doesn't matter if the CD image is 2M, 20M, or 200M, that's not going to change how long it takes to boot!

                      I'm talking about "how long does it take to boot to the GUI".

                      As a baseline, let's say the windows 98 se boot floppy.

                      Let's not.

                      Windows is also too bloated.

                      I bet it's closer than you think.

                      The fact that your CD boots as slowly as a floppy means CD'
                    • by laffer1 ( 701823 )
                      "I'm talking about "how long does it take to boot to the GUI".

                      yeah. Well it's not a 1:1 relationship, but more on the disk does mean it takes longer. I don't see why you can't connect what I'm saying to what you're saying. It takes time to detect and setup hardware during boot. It takes time to init a display, setup a login or window manager, etc. If we're talking about boot to gui time, dos doesn't matter. Mac OS matters. NeXTSTEP matters. THings that existed during that time period which had gui

                    • by argent ( 18001 )
                      If we're talking about boot to gui time, dos doesn't matter.

                      Who the hell is talking about DOS? I certainly aren't.

                      Amiga 1000: 1985
                      HP Integral: 1985

                      THings that existed during that time period which had guis. ... and BOOTED OFF FLOPPIES.

                      Like the Amiga 1000 and HP Integral.

                      I have a NeXT, and I can tell you it doesn't boot all that fast, especially with OpenSTEP 4.2.

                      I had a NeXT, too. Gave it to someone who wanted one and whose wife didn't object to bringing it home, when I left ABB.

                      It was running Display Posts
                    • by Dog-Cow ( 21281 )

                      Amiga 1000.
                      HP Integral.
                      Neither of which did extensive hardware discovery. A LiveCD (and the Windows 98 boot disk) doesn't know what hardware it's going to find. It probes for everything it has drivers for.

                      That takes time. Period.
                    • by argent ( 18001 )
                      You only need to probe for legacy hardware. Any hardware since, oh, sometime in the '90s should have already been enumerated during POST.
          • I'd say a graphical user interface, word processor, web browser, programming/debugging tools, all that should be necessary for a modern live CD.
            • by argent ( 18001 )
              You don't need to load a word processor, web browser, or programming and debugging tools during boot.

              You do need to load the GUI, yes.

              If you cant boot to a GUI from a CD faster than an HP Integral (running System V UNIX on a 68000!) could from a floppy, there's something wrong with your GUI.

              That's running UNIX, mind. I'm not expecting you to beat an Amiga 1000, though that *was* loading firmware as well from the kickstart, but you should at least be able to do better than a mid '80s UNIX box.
  • by YeeHaW_Jelte ( 451855 ) on Wednesday June 11, 2008 @07:23AM (#23745703) Homepage
    Your evilness index has just dropped from 45.8 to 45.3

    Keep up the good work!
    • by sootman ( 158191 )
      My first thought was that the headline was misleading. "Fixes" implies fixing existing bugs, like when Apple fixes things in KHTML. The proper headline should have been "Apple quietly un-fucks-up DTrace."
    • What's the Google's one?

      Microsoft, I would assume, is +INF. No matter what they do, they're pure evil personified, at least on /.

  • Quietly, quietly (Score:5, Insightful)

    by gonerill ( 139660 ) on Wednesday June 11, 2008 @07:44AM (#23745929) Homepage
    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?
    • by stewbacca ( 1033764 ) on Wednesday June 11, 2008 @08:07AM (#23746211)
      "Quietly" infers that the slashdot crowd should get credit, where no credit is due, as if our overwhelming numbers and sheer pressure forced Apple to change. Unfortunately, in the real world, we are such an insignificant demographic, that any changes are thus labelled as being done "quietly".
      • Re:Quietly, quietly (Score:4, Informative)

        by timeOday ( 582209 ) on Wednesday June 11, 2008 @09:08AM (#23747095)
        Looking at the blog entry, no mention is made of an apple announcement at all; this blogger infers it is fixed based on what he would expect to see. What better definition of "quietly fixed" do you want?

        From a developer standpoint, this is a very bad thing apple did. Understanding what's going on and getting stuff to work is hard enough without zombified debugging tools that lie to you.

    • Yes, because it is not a bug fix; it is a feature fix, if such a thing exists. The previous design was intentional. So, yes, if someone changes a design decision in a software I buy, I'd like to know why they did it - and in this case I'd like to know why it was there at the first time. I wasn't expecting a big announcement but a single line in OS X update page saying something along the lines of "revert DTrace to original behavior due to ___ " would do.
  • "Quietly" (Score:5, Funny)

    by Plantain ( 1207762 ) on Wednesday June 11, 2008 @08:07AM (#23746213)
    What did you want, a friggin' parade?

    Jeez, give a fruit a break.
  • 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 profil
  • 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.
  • by snowwrestler ( 896305 ) on Wednesday June 11, 2008 @10:05AM (#23748007)
    The previous discussion [slashdot.org] 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."

In the long run, every program becomes rococco, and then rubble. -- Alan Perlis

Working...