Slashdot Mirror


Silly Kernel Panic in Mac OS X 10.2.2

shibby tells us that it is easy to cause a kernel panic in Mac OS X 10.2.2, by attempting to move a directory into the same location as another one of the same name, using Terminal: mkdir ~/mydir; cd ~/mydir; mkdir mydir; mv mydir ... Kernel panic is instant. Save all your documents and quit your open apps if you feel the need to see it for yourself. Happy Thanksgiving!

19 of 192 comments (clear)

  1. I hope you submited to Apple by feldsteins · · Score: 5, Insightful



    Please tell me that shibbey or pudge...or someone... actually submitted this bug to Apple before posting it here.

    It'll be interesting, though, to see how long we wait for a fix. If this is a legit thing. I haven't tested it and don't plan to.

    --
    You like your Macintosh better than me, don't you Dave? Dave? Can you hear me Dave?
    1. Re:I hope you submited to Apple by Draoi · · Score: 5, Informative

      Yep! The guys on MacNN posted feedback to Apple last week. Expect a kernel Software Update sometime soon, I guess.

      --
      Alison

      "It is a miracle that curiosity survives formal education." - Albert Einstein

  2. Its not a bug by WesG · · Score: 5, Funny

    Not only does it cause a kernal panic, but it slaps the user on the head and asks them, "Why the heck did you create a directory with the same name as the current directory????"

    Those crazy kernal programmers :-)

  3. Ooops by iMMersE · · Score: 5, Funny

    Found the offending piece of code in Darwin ...

    BOOL HFSPLUS_Directory_Move( const char *src, const char *dest ) {
    if ( !strcmp( src, dest ) ) {
    __kernelPanic( KP_IMMEDIATE );
    } ...
    }

    --
    codegolf.com - smaller *is* better.
  4. Colonel Panic and General Controls... by Ocelot+Wreak · · Score: 5, Funny
    First there was General Controls, who was sometimes drunk and forgot all my preferences.
    Then there was Colonel Panic, who wouldn't work if you added two folders with the same name to the same in box on his desk.
    What's next? Private Keychain will forget where he stored my passwords and x.509 certificates?
    Oh wait... you were talking about kernels...
    Sorry!
    -wjc.

    --
    "I figure you're here 'cause you need some whacko who's willing to stick his finger in the fan. So who are we helping?
  5. IMPORTANT! by iMMersE · · Score: 5, Informative

    Be very careful with this - If you are testing, or accidentally gonna do this, you will lose both directories and all data in them.

    --
    codegolf.com - smaller *is* better.
  6. Re:Sure by qengho · · Score: 5, Insightful

    Try explaining to mom why she can't have two directories named letters without crashing the machine

    The GUI (gracefully) prevents you from doing this, so if Mom can understand the sequence of terminal commands that triggers the panic, she'll have no trouble understanding why...

  7. They know .... by Draoi · · Score: 5, Informative
    This was originally posted to the darwin-development mailing list, of which I'm a subscriber;

    Here's the message (login: archives, pass: archives)

    This list is teeming with Apple folks, so I'm sure someone's posted a RADAR bug already.

    This problem also came up on MacNN and is discussed in detail here

    Now here's the kicker - as the kernel is open-source (APSL - don't complain), someone's already traced the problem back to a recursive lock in the HFS+ subsystem (hfs_vnops.c). Kewl or wha'?

    --
    Alison

    "It is a miracle that curiosity survives formal education." - Albert Einstein

    1. Re:They know .... by valmont · · Score: 5, Interesting
      you are missing the point here. It works this way:

      1. user accidentally finds bug in OS
      2. user talks about it on open-source forums and other places on the internet
      3. Apple gets notified as well as open-source community at large
      4. within minutes of its discovery, some geeks manage to find the root of the problem
      5. apple developers are notified of geeks' findings, confirm, fix, and thoroughly test the fix.
      6. within days apple users get a software update notification if bug is important, or fix is rolled into the next major sub-dot release if fairly inconsequential for the broader user base, as it might be the case for this one
      You see, apple users don't need to do shit. All i know is that some bug that is fairly inconsequential to me was found, and that it's guna get fixed, fast, and my next OS X release will be all the stronger, and all i'll have to do is click the "install" button when prompted, and i will feel warm and fuzzy all over. I don't even need to what a fucking kernel is.

      now that's just me. Yes, many geeks out there will gladly hunt-down the bug in the source code and recompile their kernel.

      The point is, you know problems are addressed in an appropriate matter.

      So yes, open-source, is, indeed, so much better than anything else, especially if you're dealing with what i consider in my little world, the mission-critical piece of software that is my tibook's operating system.

      Such process shows me that a product that relies heavily on mature open-source components is less likely to cause productivity-killing crashes and loss of data such as the ones i've experienced with my previous dell laptop running win2k, as described in one of my journal entries.

      And if was to direct an IT department, gee, i just may consider putting a flat-panel iMac on every employee's desktop. Shit i could mount user directories from a central location, enabling employees to switch work stations, i would uniformely configure all machines, prevent users from writing files or installing applications outside of their home directories, i could ssh in each box for sporadic debug work, i could create automated processes to create development environments based on users' needs, wether they're graphic artists or J2EE application developers.

      OS X owns you.

      this is it people. we are well on our way to reach the nirvana of computing, with symbiotic collaboration between a major hardware and software vendor and the open source community at large, market share gains in each camp benefits the other.

  8. ArsTechnica by Draoi · · Score: 5, Informative

    .. have a thread going on this, too. Link here

    --
    Alison

    "It is a miracle that curiosity survives formal education." - Albert Einstein

  9. Video editing was Re:mail info by Melantha_Bacchae · · Score: 5, Insightful

    Funny you mention video editing. Even on the low end, your $1,200 PC is never going to run iMovie.

    On the high end, your cost comparison is a joke, because the cost of the computer is the least of your expenses. A high end PC based (with Avid or the like) system is going to set you back $100,000 or more.

    The cost for a similarly featured Apple video editing system with Final Cut Pro? Less than $10,000.

    Read it and weep:
    http://www.filmandvideo.com/New%20Pages/art icle2.h tml

    Worried about this kernel panic ruining your video editing? Don't. You are not likely to be in your Terminal making two directories of the same name and moving them about in the course of your video editing. Even if you were, this is happening in the Unix part of OS X, which is open source, and it is being announced on Slashdot. Someone will probably fix it for fun over the weekend and email Apple a patch by Monday. We'll probably see an official, tested, security update from Apple next week. That is the beauty of open source.

    If this were Microsoft and a "blue screen of death", well, don't hold your breath. Their response would be the same as seven years ago: "There are no significant bugs in Windows XP. Trust us.". Yeah, right! That's what PC Magazine said about Windows 95, when I spent 11 months trying to get a stable install of the original version.

    Windows: "Go talk to my friend, an 800 pound monopoly-abusing gorilla!"
    Mac: "And here's my good buddy, the 66,000 ton Godzilla!"
    Godzilla: Stomp! ;)

  10. Re:C|/CON/CON by sweet+reason · · Score: 5, Funny

    Can this be exploited by a rouge shell script?

    i don't think so, but a big blue one could do the job.

    --
    Everything should be made as simple as possible, but not simpler. -- A.E.
  11. Re:os9 never did that by Melantha_Bacchae · · Score: 5, Insightful

    krel wrote:

    > os9 would never, despite its shabby memory
    > protection, and pathetic preemptive multitasking,
    > do that.

    Nope, because OS 9 wasn't Unix, and so didn't use Unix terminology for operating system failures. OS 9 bombed, OS X panics (very rarely). BTW, any kernel hacker can, if they choose, get the source code and fix this bug. OS 9 couldn't do that either.

    I'm glad, though, that I switched early enought that I got a chance to know OS 9. It really was amazing, despite it being basically a microcomputer OS, all the things Apple got it to do.

    OS 9 is the blue-eyed caterpillar, small and awkward, but courageous and friendly.

    OS X is the blue-eyed adult Moth, awesomely beautiful, supremely powerful. She soars above all, the peerless Queen of Monsters.

    And Apple is, as always, Mothra Leo's Forever Friend. ;)

  12. Could it be a copyright problem ? by Anonymous Coward · · Score: 5, Funny

    Isn't "mydir" a Microsoft innovation? Could explain why it crashes ;p

  13. Fink/GNU is your friend by bluestar · · Score: 5, Insightful

    Sure enough using /bin/mv it crashed as advertised.

    But /sw/bin/mv, which is the GNU version of mv from the fileutils package, just gives a "cannot overwrite directory" error.

    This is (one of the many reasons) why the GNU versions of everything should be standard on all systems in the universe. So go fetch and install a copy of fink and (optionally) FinkCommander.

    Also, "alias mv mv -i" is a Very Good Idea(tm).

    --
    "The cost of freedom is eternal vigilance." -Thomas Jefferson
  14. Cool. by red5 · · Score: 5, Funny

    You should see the death screen. Very slick. I'd post a screen grab, but well you know. :)

    --
    I know I'm going to hell, I'm just trying to get good seats.
  15. Re:Why? by Elwood+P+Dowd · · Score: 5, Interesting

    Well, Avie Tevinian probably doesn't agree with your "OS people up at Carnegie Mellon", and he's running the show over at Apple. He also wrote some pertinent versions of Mach, up at Carnegie Mellon.

    When it comes to questions like this, if you can get the best people, using their prefered tools is often a good idea. If Apple could have hired all the architects of the freebsd Kernel, then sure, maybe you'd be right.

    Also, I don't know what the hell you mean that you've "heard nothing but bad things about" Mach. It's a well known and well inspected peice of code. It might have problems, but saying "bad things" doesn't mean anything. What are the problems? Message passing is slow? This is true. Whatever. It's an architectural choice. Some of those architectural choices are exactly what makes Mach good for Apple - Multiple OS hosting.

    --

    There are no trails. There are no trees out here.
  16. What's wrong with HFS+? by 2nd+Post! · · Score: 5, Informative

    What's missing that you want HFS+ to go away or something?

    It's got metadata, which Microsoft only *added* with NTFS
    It finally got journaling with 10.2.2
    It spans, quite comfortably, 180GB hard drives
    File sizes can be larger than 2gb, and I believe up to 2TB (2^63 bytes per file)

    Is there something missing? Perhaps encryption? Apple already has support for encrypted volumes...

  17. Re:Works just fine on my system.... (in Bash, thou by usr122122121 · · Score: 5, Funny
    Are you sure that
    1. You have the correct permissions to the folder, and
    2. You are running 10.2.2?
    Don't you find it the least bit funny that you're trying to help him to cause a kernel panic on his computer?

    "DAMN, sticking that fork in my eye really hurt!"
    "Oooh, I WANT TO TRY!"

    --

    -braxton