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!

16 of 192 comments (clear)

  1. Re:mail info by Anonymous Coward · · Score: 0, Informative

    You know, you can get a Subaru WRX than can do 13-second quarter-mile times for $24k. You'd have to spend much more to get a Mercedes that could match that performance (stock and new that is).

    Thus--by using your logic--a Mercedes isn't a valid car.

    BTW, Apple's share of the personal computer market is greater than BMW and Mercedes combined share of the auto market...

  2. 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.
  3. Re:Ooops by Gerry+Gleason · · Score: 4, Informative
    Except that string comparisons aren't particularly useful in deciding that two directory arguments are the same. You have to stat them and compare inodes and devs.

    Yes, I know this is trying to be funny, but on /. accuracy counts in humor as well.

  4. 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 slughead · · Score: 2, Informative

      you can use UFS for OS X.. about a quarter of all programs (and all MS programs) can't take that whole "case sensitivity" thing.. and neither can I

    2. Re:They know .... by Space+Coyote · · Score: 4, Informative

      Apparently one of the reasons Apple has delayed the release of their XServe RAID product is so that they can completely re-write HFS to include journalling and other such niceties. I don't care just as long as they don't take away the stuff that we all love about Mac file systems.

      --
      ___
      Cogito cogito, ergo cogito sum.
    3. Re:They know .... by Anonymous Coward · · Score: 1, Informative

      HFS+ has been around since about '98 with the releas of Mac OS 8.1 which is a long time, but not that long... I am not sure which drawbacks you are thinking of, really. This bug is just that, a bug, not an aspect of the filesystem. Case insensitivity is az feature, and will never be dropped. If the filesystem became case sensitive that would be viewed as a bug.

      It is pretty clear that Apple is working on the filesystem. They hired some Be people who worked on BFS, and just released Jornaling with 10.2.2.

  5. 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

  6. Re:Works just fine on my system.... (in Bash, thou by bdesham · · Score: 4, Informative
    Are you sure that
    1. You have the correct permissions to the folder, and
    2. You are running 10.2.2?
    Missing either of these might make the bug not work (oh no!).
    --
    Alcohol and Calculus don't mix. Don't drink and derive.
  7. 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

  8. Re:I hope you submited to Apple by nuckin+futs · · Score: 1, Informative

    fixed in 10.2.3

  9. Re:Why? by stripes · · Score: 4, Informative
    Apple would have been better using someone else's kernel -- like the FreeBSD one -- verbatim instead of trying to hack up that Mach POS (which I've heard nothing but bad things about from OS people up at Carnegie Mellon, where Mach was developed).

    Well MACH isn't exactly an OS, it is more of an OS for running OSes, and one of the OSes it can run is the "BSD Single Server" which is a BSD4.3+/4.4ish derieved OS that isn't in my opnion as good as some of the other BSD4.4ish derived OSes (like FreeBSD).

    One of the other OSes that runs under MACH is a modifyed MacOS9. I havn't run OS9 (aka "Classic") on purpose for months, but other people find it rather indepsnsable, and wouldn't use OSX without it.

    As you say they could plop Carbon and Quartz ontop of FreeBSD just as easally as onto MACH's BSD Single Server. However getting OS9 to "run under" FreeBSD would have been a much larger pain.

    Of course, I certainly could be missing something -- could be that the FBSD kernel just didn't do something that Apple had to have it do, and that the FBSD people wouldn't have accepted. Could be SMP issues, I suppose...

    I doubt it is SMP issues. I'm not even sure the FreeBSD people would reject the stuff needed to get OS9-under-FreeBSD working, after all it might not be that different from what WINE needs from the kernel...but it would have taken a whole lot more time then getting OS9 running under MACH more or less along side the BSD Single Server (kind of under it and off to one side I susspect...)

    the device driver model is also different, and in a lot of ways better (and unfortunitly in a lot of ways worse) then FreeBSD.

  10. Re:Its not a bug by stripes · · Score: 3, Informative
    None of the code involved should be special to Apple in any way

    Mac OSX by default uses HFS+ rather then FFS, so there is a lot of Apple-specific code getting executed in there. Maybe they don't do namei cache invalidation correctly in their HFS+ file system code (for example).

    Not a huge unforgivable bug to have, but one hopes they will try to fix it quickly. It would definitly re-enforces my opnion of OSX as very stable for a desktop OS, but not very stable as a server OS. Which is why I own an Apple laptop, but not an Apple rackmount computer ;-)

    However if they don't fix this kind of bug fast they are less likely to sell Xserve systems...

    ...not that Sun didn't have a bug where if you ftruncate'd /dev/audio you got a panic for something like five years! Sure that is a little less serious because you could deny users access to /dev/audio on a share machine and not suffer, but still... and I think it worked on any streams object that lived int he file system, so....

    ...but it would be nice if Apple proved themselves to be better then that.

  11. 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...

  12. Re:os9 never did that by sco08y · · Score: 2, Informative

    OS 9 didn't have memory protection. Memory was a flat 32-bit address space, shared by all processes.

    There was preemptive multitasking, and asymetric multiprocessing. Essentially, all the normal applications ran in a single task and you could write preemptive services. I never saw this feature used for anything productive. Since QuickDraw was only available to the main task, you'd probably have to use IPC to have your services do their output.

    OS 9 would never do that because its filesystem code was highly refined, after all, it was the 7th or 8th major revision of the OS. (I'm pretty sure we jumped from either System 1 or 2 to System 4. I don't remember System 5, so maybe it was only the 6th.) However, I do recall that the PC Exchange software was pretty flaky and some bad DOS floppies could crash your Mac.

    Also, there was a horrible Quicktime Autoplay feature that was designed for CD-ROMs. Some people used it to put viruses on Zip disks that would activate merely by inserting the Zip.

    All in all, OS X is, so far, doing a good bit better than its predecessors.

  13. Re:Works fine with UFS filesystem... by c13v3rm0nk3y · · Score: 3, Informative
    Except a good chunk of native Apple apps are either untested on UFS, or specifically will not work on UFS (according to a few READMEs I've read lately).

    For example, isn't Mozilla unhappy on UFS?

    I suppose you can have an HFS+ partition for some apps, but this sounds like altogether too much work to me.

    --
    -- clvrmnky