Slashdot Log In
Silly Kernel Panic in Mac OS X 10.2.2
Posted by
pudge
on Fri Nov 29, 2002 08:54 AM
from the don't-try-this-at-home dept.
from the don't-try-this-at-home dept.
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!
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Wow (Score:3, Funny)
Re:Wow (Score:2, Funny)
Re:Why? (Score:4, Informative)
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.
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.
Parent
Re:Why? (Score:5, Interesting)
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.
Parent
Re:Why? (Score:3, Interesting)
I hope you submited to Apple (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.
Re:I hope you submited to Apple (Score:3, Interesting)
Re:I hope you submited to Apple (Score:5, Informative)
Parent
Re:I hope you submited to Apple (Score:4, Interesting)
Now, i'm sure they had other things in that update, and it wasn't just on my account, but they thought it important enough to roll it in anyway. I thought that was the coolest thing :-)
Regards,
John
Falling You - exploring the beauty of voice and sound http://www.mp3.com/fallingyou [mp3.com]
Parent
C|/CON/CON (Score:3, Insightful)
Can this be exploited by a rouge shell script? "Funny_Picture.png.sh" wouldnt be fun, given the average mac user is
1) As guilable as windows users
2) Not as savvy to the ways of trick emails as windows users.
At least it wouldnt propergate - I assume theres a undered different mail clients on OSX. (I'm not a millionaire and cant afford my own mac you insensitive clod!)
Re:C|/CON/CON (Score:5, Funny)
i don't think so, but a big blue one could do the job.
Parent
Re:C|/CON/CON (Score:3, Insightful)
Shell scripts by default are associated with TextEdit. Double clicking on an attached shell script would open it in the editor. No execution. No harm.
As long as the other two mail apps follow the system's file association, all's well.
Video editing was Re:mail info (Score:5, Insightful)
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/ar
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!
Parent
Re:mail info (Score:4, Funny)
What's also amusing is, children have no problem using dos, linux, windows, MacOS or OSX. They have no preference to OS as long as it can play sound, let them personalise their desktop etc. what they favour is SOFTWARE
Yet for some unknown reason, if you put an average highschool computer user who's grown up on a windows PC all his life in front of a mac, and open up netscape, they can't seem to figure out how to make it work, despite it having an identical interface to the PC version. The reason I was given was becasue "It's a mac, I don't know how to use a mac"
Parent
Its not a bug (Score:5, Funny)
Those crazy kernal programmers
Re:Its not a bug (Score:2)
Should leave you with subdir y containing subdir x, but 'mv x x' is an error. If the code for mv actually tries to treat 'mv x x' like 'mv x y' (x and y are directories), then it will be badly breaking the rules for using link(2) and unlink(2).
Although it isn't a particularly deep bug, the fact that it panics makes it pretty nasty. What I would be curious about it how/where it was introduced. None of the code involved should be special to Apple in any way, so what happens on BSD (probably gives you an error, right?). Linux gives: "mv: cannot move `x' to a subdirectory of itself, `x/x'", and I'd be very surprised that BSD doesn't do the same, so how did it get broken.
I misunderstood the trigger (Score:2)
Re:Its not a bug (Score:3, Informative)
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.
Ooops (Score:5, Funny)
BOOL HFSPLUS_Directory_Move( const char *src, const char *dest ) {
if ( !strcmp( src, dest ) ) {
__kernelPanic( KP_IMMEDIATE );
}
}
Re:Ooops (Score:4, Informative)
Yes, I know this is trying to be funny, but on /. accuracy counts in humor as well.
Parent
Re:Ooops (Score:2)
Now, the issue WRT this now too long thread about a bad joke, is that the test is for existence of a dir in the target dir, not string comparison, or inodes (that's another case that may or may not work correctly).
Colonel Panic and General Controls... (Score:5, Funny)
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.
Re:Colonel Panic and General Controls... (Score:3, Funny)
IMPORTANT! (Score:5, Informative)
Works just fine on my system.... (in Bash, though) (Score:4, Interesting)
Re:Works just fine on my system.... (in Bash, thou (Score:4, Informative)
- You have the correct permissions to the folder, and
- You are running 10.2.2?
Missing either of these might make the bug not work (oh no!).Parent
Re:Works just fine on my system.... (in Bash, thou (Score:5, Funny)
"DAMN, sticking that fork in my eye really hurt!"
"Oooh, I WANT TO TRY!"
Parent
They know .... (Score:5, Informative)
Here's the message [apple.com] (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 [macnn.com]
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'?
Re:They know .... (Score:3, Insightful)
When is Apple finally going to overhaul HFS+? It's a decent filesystem, but it has quite a few drawbacks and limitations, including this "issue", if what you say is true.
Microsoft finally did right and made NTFS the standard. BeOS has BFS, and Linux... well, there's about 10 good filesystems for Linux.
HFS+ has been around since the early days of multigigabyte hard disks. In computer time, that's an eturnity. Come on Apple, the time has come for HFS++.
Re:They know .... (Score:4, Informative)
Parent
What's wrong with HFS+? (Score:5, Informative)
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...
Parent
Re:What's wrong with HFS+? (Score:3, Insightful)
Re:They know .... (Score:3, Funny)
Re:They know .... (Score:4, Insightful)
This kind of partnership between OSS and a major commercial vendor is unprecedented, AFAIK. (No flames, please; if I'm wrong, just tell me so, and who did it first.) It's produced some great things so far, and I'm looking forward to seeing where it goes.
Parent
Re:They know .... (Score:5, Interesting)
- user accidentally finds bug in OS
- user talks about it on open-source forums and other places on the internet
- Apple gets notified as well as open-source community at large
- within minutes of its discovery, some geeks manage to find the root of the problem
- apple developers are notified of geeks' findings, confirm, fix, and thoroughly test the fix.
- 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 [slashdot.org].
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.
Parent
ArsTechnica (Score:5, Informative)
Could it be a copyright problem ? (Score:5, Funny)
smb bug? or maybe i'm an idiot (Score:3, Interesting)
try to mount a share from an local smb server that does not exist. cancel it, then try to mount one that DOES exist.
ie. from the finder command-k
smb://10.0.1.3 #does not exist
cancel it,
smb://10.0.1.4 #does exist
the second attempt will time out and the machine will have to be hard reset.
maybe this is just me, but this has been happening to me since 10.1.5
Fink/GNU is your friend (Score:5, Insightful)
But
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).
Re:Fink/GNU is your friend (Score:3, Insightful)
Cool. (Score:5, Funny)
Re:Cool. (Score:4, Interesting)
Parent
Don't you get it? (Score:3, Interesting)
While this bug appears trivial it is not.
Consider: An entire apple server can be totally killed requiring a human to reboot it just by getting a totally unpriveleged shell access.
EVEN A GUEST can kill the system using this simple simple set of commands. That's not good. Of course it's not the end of the world either.
anyone know of a way to get unprivileged access on an apple server of your choice?!
Another easy one (Score:3, Interesting)
WARNING: SHUT DOWN YOUR FTP DAEMON (Score:4, Interesting)
I just tested this over an FTP connection to a Mac OS X 10.2.2 box using Transmit (a Mac FTP client) from a MacOS 9 machine.
I was ABLE to panic the kernel remotely.
This has just taken a violent swing into serious, as ANY USER WITH FTP ACCESS can now drop your Mac OS X machine. Apple needs to patch this, and quickly. I don't care if the security update is 15k to replace
Any idea what eactly could be wrong with either the kernel or mv that would cause such a problem? Branching to the wrong case (i.e. branching to the "same name" case as opposed to the "can't replace a directory with an item it contains" case)?
Is this a job for the Darwin team since it involves a BSD component?
Re:Sure (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...
Parent
Re:os9 never did that (Score:5, Insightful)
> 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.
Parent
MacOS and preemptive threading. (Score:2)
I believe that classic MacOS could do preemptive threading of some sort, but only with 680x0 code, not PPC.
I got interested in writing threaded stuff under the MacOS at one point, so this is out of hazy memory here.
Re:Works fine with UFS filesystem... (Score:3, Insightful)
Why would anybody use UFS anyway?
Re:Works fine with UFS filesystem... (Score:3, Informative)
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.