Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > To all those who want to see a Kernel Panic & APPLE NEEDS TO FIX THIS

To all those who want to see a Kernel Panic & APPLE NEEDS TO FIX THIS
Thread Tools
K++
Senior User
Join Date: Jan 2002
Location: NYC
Status: Offline
Reply With Quote
Nov 19, 2002, 11:40 PM
 
Okay, first of all my friend told me that this worked and of course I was skeptical and doudbted him, then I did it and was shocked that it worked. This is guaranteed to cause a kernel panic for all those who haven't seen one yet.

Code:
mkdir test cd test mkdir test mv test ..
<--- insert KP here

That is it everybody. I was extremely let down that this actually worked. I did want to see the KP screen but not through such a simple set of instructions to my computer. Im trying to justify it to mv's lack of understsanding of HFS+ and name collisions, so Im gonna go try to make the folders have different names after I post this and see if it goes down.

Now that we know such a simple set of instructions can Kernel Panic the most advanced operating system ever when do you think Apple will grace us with a fix for such a huge flaw.
( Last edited by K++; Nov 19, 2002 at 11:50 PM. )
     
K++  (op)
Senior User
Join Date: Jan 2002
Location: NYC
Status: Offline
Reply With Quote
Nov 19, 2002, 11:42 PM
 
yup its a file name collision problem, since the same steps with a folder named test1 inside test doesn't bring my machine to Kernel Panic.
     
suhail
Senior User
Join Date: Nov 1999
Location: Earth
Status: Offline
Reply With Quote
Nov 19, 2002, 11:45 PM
 
Maybe that's why Apple made the Kernel Panic screen so pretty!
They knew it would be popular for a while.
     
C.J. Moof
Mac Elite
Join Date: Aug 2001
Location: Madison, WI
Status: Offline
Reply With Quote
Nov 20, 2002, 12:22 AM
 
Pretty, and multi-lingual! Wasn't that interesting.
OS X: Where software installation doesn't require wizards with shields.
     
someone_else
Dedicated MacNNer
Join Date: Dec 2001
Location: Promised Land
Status: Offline
Reply With Quote
Nov 20, 2002, 12:59 AM
 
Originally posted by K++:
Okay, first of all my friend told me that this worked and of course I was skeptical and doudbted him, then I did it and was shocked that it worked. This is guaranteed to cause a kernel panic for all those who haven't seen one yet.

Code:
mkdir test cd test mkdir test mv test ..
<--- insert KP here
Oooh. Very bad. I just reproduced this on my test machine. Here is the backtrace.

#0 0x00085434 in Debugger ()
#1 0x00027f8c in panic ()
#2 0x001dd410 in lockmgr ()
#3 0x000bdb98 in vn_lock ()
#4 0x001c5a9c in hfs_rename ()
#5 0x000b93bc in rename ()

It's a recursive lock problem, not a name collision. What's happening is that the hfs fs is trying to obtain a lock via a thread that is already holding that same lock. This is legal in the NT kernel with certain types of locks, but is completly illegal in Mach. Bad Apple.
G5 2.5 DP/2GB RAM/NVidia 6800 Ultra
PowerBook Al 1Ghz/768MB RAM
6gb Blue iPod Mini
     
kaboom
Forum Regular
Join Date: Jan 2001
Status: Offline
Reply With Quote
Nov 20, 2002, 01:05 AM
 
No kernel panic here:
mv: rename test to ../test: Directory not empty
     
K++  (op)
Senior User
Join Date: Jan 2002
Location: NYC
Status: Offline
Reply With Quote
Nov 20, 2002, 01:09 AM
 
im guessing you used the autocomplete and got the slash on it, try again sans the / at teh end of the directory name. Follow the example exactly, its guranteed I've tred it on five machines and they all went down.
     
gorickey
Posting Junkie
Join Date: Nov 2001
Location: Retired.
Status: Offline
Reply With Quote
Nov 20, 2002, 01:16 AM
 
I guess I'm confused as to why somebody wants to purposely cause a KP in Jaguar....I mean, besides the "pretty window"...what's the point? Unix doesn't like it obviously.

     
someone_else
Dedicated MacNNer
Join Date: Dec 2001
Location: Promised Land
Status: Offline
Reply With Quote
Nov 20, 2002, 01:43 AM
 
More info. for those who care.

Looks like the problem is hfs_vnops.c:1899.

Code:
if (tvp->v_type == VDIR) retval = VOP_RMDIR(tdvp, tvp, tcnp); else retval = VOP_REMOVE(tdvp, tvp, tcnp); (void) vn_lock(tdvp, LK_EXCLUSIVE | LK_RETRY, p); /* PANIC HERE */ tvp = NULL; tcp = NULL; if (retval) goto bad;
My guess would be that VOP_RMDIR is leaving tdvp locked (which someone did not expect).

If I'm right, then this patch should fix the problem. Actually, it probably doesn't fix the real problem (which is likely in VOP_RMDIR, but it provides a workaround.)

Code:
$ diff -u hfs/hfs_vnops.c hfs/hfs_vnops_new.c --- hfs/hfs_vnops.c Tue Nov 19 23:37:43 2002 +++ hfs/hfs_vnops_new.c Tue Nov 19 23:38:24 2002 @@ -1896,7 +1896,8 @@ else retval = VOP_REMOVE(tdvp, tvp, tcnp); - (void) vn_lock(tdvp, LK_EXCLUSIVE | LK_RETRY, p); + if (!VOP_ISLOCKED(tdvp)) + (void) vn_lock(tdvp, LK_EXCLUSIVE | LK_RETRY, p); tvp = NULL; tcp = NULL; if (retval)
Warning! I have not tried this code.
G5 2.5 DP/2GB RAM/NVidia 6800 Ultra
PowerBook Al 1Ghz/768MB RAM
6gb Blue iPod Mini
     
King Chung Huang
Mac Enthusiast
Join Date: Aug 1999
Location: Calgary, Alberta, Canada
Status: Offline
Reply With Quote
Nov 20, 2002, 02:18 AM
 
Originally posted by K++:
im guessing you used the autocomplete and got the slash on it, try again sans the / at teh end of the directory name. Follow the example exactly, its guranteed I've tred it on five machines and they all went down.
It didn't work for me, either. No kernel panic here. Here's a copy & paste from my terminal.

[King-PBG3:~] king% mkdir test
[King-PBG3:~] king% cd test
[King-PBG3:~/test] king% mkdir test
[King-PBG3:~/test] king% mv test ..
mv: rename test to ../test: Directory not empty
[King-PBG3:~/test] king%
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Nov 20, 2002, 02:55 AM
 
It "works" on my iBook running 10.2.2, but not when ssh'ed into either of G3 iMacs, one of which is 10.1.5 and the other 10.2.1.
[vash:~] banana% killall killall
Terminated
     
K++  (op)
Senior User
Join Date: Jan 2002
Location: NYC
Status: Offline
Reply With Quote
Nov 20, 2002, 05:13 AM
 
That is wierd since this is I'm assuming a file system problem why would teh machine matter?

It seems so far that certain G3s don't have this problem, since PBG3 had no problem with it and botht he G3 iMacs had no prob with it.
     
gheff
Junior Member
Join Date: Feb 2002
Location: Atlanta
Status: Offline
Reply With Quote
Nov 20, 2002, 08:03 AM
 
This is different:

Beige G3 266 DT, 10.1.5

[localhost:~] gheff% mkdir test
[localhost:~] gheff% cd test
[localhost:~/test] gheff% mkdir test
[localhost:~/test] gheff% mv test ..
[localhost:~/test] gheff% ls
[localhost:~/test] gheff% cd ..
[localhost:~] gheff% ls
Desktop Public
Documents Sites
Library foo.com.apple.windowserver.plist
Movies music.raw
Music test
Pictures

Yikes. Where'd that test go?

#gheff
     
BatmanPPC
Dedicated MacNNer
Join Date: Aug 2001
Status: Offline
Reply With Quote
Nov 20, 2002, 10:30 AM
 
Originally posted by kaboom:
No kernel panic here:
To those who are not able to duplicate, you must use the mv command that is provided with OS X and not one install by GNU fileutils.
--
Mohammad A. Haque
http://www.haque.net/
mhaque|haque.net
     
Boochie
Mac Enthusiast
Join Date: Mar 2002
Status: Offline
Reply With Quote
Nov 20, 2002, 11:17 AM
 
I'm curious; does the kernel panic happen if you try to do the same thing from within the Finder?
     
Cincinnatus
Junior Member
Join Date: Nov 2002
Status: Offline
Reply With Quote
Nov 20, 2002, 11:36 AM
 
Boochie,

I asked the same question over on the arstechnica boards. The answer that I received (not being in front of my mac at the time) was, in short, no. The finder handles this namespace collision gracefully - throwing an exception in the form of a modal dialog (rather than the inconvenient kernel panic).

/cincinnatus
     
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Nov 20, 2002, 01:03 PM
 
This may be pretty straightforward to reproduce (which most panics are once you figure out what the cause is) but in 2 years of using the command line almost constantly, I have never run into this problem.

So maybe that is why it isn't Apple's highest priority - especially since they are making major changes to the FS now anyway (with Journalling, etc).
     
K++  (op)
Senior User
Join Date: Jan 2002
Location: NYC
Status: Offline
Reply With Quote
Nov 20, 2002, 02:22 PM
 
I echo those exact sentiments, I am constantly in tthe terminal and this KP had to be pointed out to me since I never inadvartently ran into it.
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Nov 20, 2002, 05:10 PM
 
Even if one doesn't run into this issue often, it's still problematic and should be corrected. A few simple commands should never be able to take down the machine like that.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
Subzero Diesel949
Registered User
Join Date: Jul 2001
Location: Orange County, CA
Status: Offline
Reply With Quote
Nov 20, 2002, 06:26 PM
 
iBook 600, 10.2.2 over here.

Not good.

Here's the log:

Wed Nov 20 14:20:54 2002


panic(cpu 0): lockmgr: locking against myself
Latest stack backtrace for cpu 0:
Backtrace:
0x00084E9C 0x000852CC 0x00027F8C 0x001DD410 0x000BDB98 0x0EE18100 0x0EE1B7A0 0x000B93BC
0x0020D8CC 0x00091E90 0x38036E6B
Kernel loadable modules in backtrace (with dependencies):
com.Symantec.kext.SymEvent(1.0.2)@0xee19000
dependency: com.Symantec.kext.SymOSXKernelUtilities(1.0.3)@0xe e16000
com.Symantec.kext.SymOSXKernelUtilities(1.0.3)@0xe e16000
Proceeding back via exception chain:
Exception state (sv=0x0EECE500)
PC=0x90019A2C; MSR=0x0000F030; DAR=0xA0008958; DSISR=0x42000000; LR=0x00002054; R1=0xBFFFF7A0; XCP=0x00000030 (0xC00 - System call)

Kernel version:
Darwin Kernel Version 6.2:
Tue Nov 5 22:00:03 PST 2002; root:xnu/xnu-344.12.2.obj~1/RELEASE_PPC



*********
     
jwblase
Senior User
Join Date: Nov 1999
Location: The workshop of the TARDIS...
Status: Offline
Reply With Quote
Nov 20, 2002, 06:30 PM
 
Of course, all those of you looking into this have reported this via the OS X feedback, and the developer bugtracking systems.

I hate it when people think that by simply posting their problems here that Apple will solve them for you.

File the appropriate paperwork (beaurocracy, beaurocracy...)

JB
---------------------------
"Time will tell. It always does."
-The Doctor
     
msuper69
Professional Poster
Join Date: Jan 2000
Location: Columbus, OH
Status: Offline
Reply With Quote
Nov 20, 2002, 07:17 PM
 
Until Apple corrects this flaw, the simple workaround is....

don't do that
     
sliderule
Fresh-Faced Recruit
Join Date: Nov 2002
Location: Boulder/Colorado Springs
Status: Offline
Reply With Quote
Nov 20, 2002, 07:48 PM
 
I was able to use this to test the effect of journaling on system restart times. After crashing, I started in about 1/6 the time with journaling enabled compared to crashing with it disabled. Very cool.
     
trusted_content
Dedicated MacNNer
Join Date: Nov 2002
Status: Offline
Reply With Quote
Nov 20, 2002, 07:57 PM
 
I was only able to get this to work on my box... a g4 imac running 10.2.2 ...

i tried it on two 10.1.5 computers, with no success


hmmm...
I offer strictly b2b web-based server-side enterprise solutions for growing e-business trusted content providers ;]
     
clarkgoble
Mac Elite
Join Date: Mar 2001
Location: Provo, UT
Status: Offline
Reply With Quote
Nov 20, 2002, 08:31 PM
 
So does this mean we should be expecting 10.2.3 any day now?



BTW - you guys have sent this into the bug report page. Right?

http://www.apple.com/macosx/feedback/
     
BatmanPPC
Dedicated MacNNer
Join Date: Aug 2001
Status: Offline
Reply With Quote
Nov 20, 2002, 09:02 PM
 
Originally posted by clarkgoble:
So does this mean we should be expecting 10.2.3 any day now?



BTW - you guys have sent this into the bug report page. Right?

http://www.apple.com/macosx/feedback/
yes. some of us are real developers and know how to do things correctly.
--
Mohammad A. Haque
http://www.haque.net/
mhaque|haque.net
     
kaboom
Forum Regular
Join Date: Jan 2001
Status: Offline
Reply With Quote
Nov 20, 2002, 09:40 PM
 
To those who are not able to duplicate, you must use the mv command that is provided with OS X and not one install by GNU fileutils.
Huh? Unless installing the dev tools changes things, I'm using the mv command that comes with OSX
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Nov 20, 2002, 09:58 PM
 
Originally posted by kaboom:
Huh? Unless installing the dev tools changes things, I'm using the mv command that comes with OSX
Which version of OS X is it not crashing on?

It crashes for me with 10.2.2.

By one of the earlier posts, it may be that it's a new bug introduced with 10.2 ?
     
GaelDesign
Forum Regular
Join Date: Apr 2001
Location: California
Status: Offline
Reply With Quote
Nov 20, 2002, 10:12 PM
 
It must be a problem with 10.2.2. I just tried it on my G4 iMac with 10.2.1, and I got no kernel panic (just the "Directory not empty" message). Then I tried it on my iBook with 10.2.2, and I got a KP. Odd!

Jared
President and Art Director of GaelDesign
Member of Distant Oaks - Celtic and Early Music Ensemble
     
RodriCO2000
Dedicated MacNNer
Join Date: Jun 2000
Location: Boston, MA USA
Status: Offline
Reply With Quote
Nov 20, 2002, 10:22 PM
 
I cannot duplicate this on my iBook (800, Combo, 10.2.2)

I tried twice on my home directory and root directory

It only does this;

Last login: Wed Nov 20 21:15:41 on ttyp1
Welcome to Darwin!
[rodribook:~] rodrigoa% cd /
[rodribook:/] rodrigoa% mkdir test
[rodribook:/] rodrigoa% cd test
[rodribook:/test] rodrigoa% mkdir test
[rodribook:/test] rodrigoa% mv test
usage: mv [-fi] source target
mv [-fi] source ... directory
[rodribook:/test] rodrigoa%
Its not the fact that life is fact, but that life itself is a fact of the unknown....
     
BatmanPPC
Dedicated MacNNer
Join Date: Aug 2001
Status: Offline
Reply With Quote
Nov 20, 2002, 10:28 PM
 
Originally posted by RodriCO2000:
I cannot duplicate this on my iBook (800, Combo, 10.2.2)

I tried twice on my home directory and root directory

It only does this;

Last login: Wed Nov 20 21:15:41 on ttyp1
Welcome to Darwin!
[rodribook:~] rodrigoa% cd /
[rodribook:/] rodrigoa% mkdir test
[rodribook:/] rodrigoa% cd test
[rodribook:/test] rodrigoa% mkdir test
[rodribook:/test] rodrigoa% mv test
usage: mv [-fi] source target
mv [-fi] source ... directory
[rodribook:/test] rodrigoa%
You're doing it wrong

mv test ..

not

mv test
--
Mohammad A. Haque
http://www.haque.net/
mhaque|haque.net
     
ZackS
Banned
Join Date: Nov 2002
Location: Hell
Status: Offline
Reply With Quote
Nov 20, 2002, 10:29 PM
 
For all of you brave souls who are having trouble, try using this app I whipped up to induce the panic. Thank God for automation

http://pages.cthome.net/zacks/kernelpanic.sit

WARNING: Doing the KP the normal way corruped my iTunes library so I assume this could do the same. Quit all other apps before running this program to prevent data loss.

What the heck am I thinking, don't run induce a KP at all if you're nervous about data loss!
     
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Nov 20, 2002, 11:28 PM
 
Interesting. This is the first time I've seen the new KP in person. It certainly isn't as nasty looking as all that jibberish all over the screen.

Nonetheless, this is not good.

iBook 600 X.2.2.
     
snerdini
Senior User
Join Date: Jun 2001
Location: Merry Land
Status: Offline
Reply With Quote
Nov 20, 2002, 11:38 PM
 
Confirmed here on a 933 running 10.2.2 w/ journalling.
     
kaboom
Forum Regular
Join Date: Jan 2001
Status: Offline
Reply With Quote
Nov 20, 2002, 11:55 PM
 
10.2.1 on a Dual 1.25ghz.
No problem.
     
Some Guy []
Forum Regular
Join Date: Aug 2001
Status: Offline
Reply With Quote
Nov 21, 2002, 01:49 AM
 
This problem _only_ happens in 10.2.2. It must be something that was added to the HFS+ driver which enabled Journaling.

this happens on machines with Journaling turned off and on.

I showed it to a apple dev friend of mine and he has submitted a bug report.
     
pat++
Mac Elite
Join Date: May 2001
Location: Earth
Status: Offline
Reply With Quote
Nov 21, 2002, 02:55 AM
 
Originally posted by someone_else:


Oooh. Very bad. I just reproduced this on my test machine. Here is the backtrace.

#0 0x00085434 in Debugger ()
#1 0x00027f8c in panic ()
#2 0x001dd410 in lockmgr ()
#3 0x000bdb98 in vn_lock ()
#4 0x001c5a9c in hfs_rename ()
#5 0x000b93bc in rename ()

It's a recursive lock problem, not a name collision. What's happening is that the hfs fs is trying to obtain a lock via a thread that is already holding that same lock. This is legal in the NT kernel with certain types of locks, but is completly illegal in Mach. Bad Apple.
Just curious... how do you get the backtrace now under Jaguar? I looked in /Library/Logs/CrashReporter and ~/Library/Logs/CrashReporter but nothing...

If I remember correctly, there is something to do in OF to have the old KP screen with more userful info?
     
someone_else
Dedicated MacNNer
Join Date: Dec 2001
Location: Promised Land
Status: Offline
Reply With Quote
Nov 21, 2002, 01:48 PM
 
Originally posted by pat++:


Just curious... how do you get the backtrace now under Jaguar? I looked in /Library/Logs/CrashReporter and ~/Library/Logs/CrashReporter but nothing...

If I remember correctly, there is something to do in OF to have the old KP screen with more userful info?
Well, you were looking in the wrong place. The log is at /Library/Logs/panic.log.

I got this backtrace by attaching to the crashed machine from gdb on another machine and typing 'bt 6'.
G5 2.5 DP/2GB RAM/NVidia 6800 Ultra
PowerBook Al 1Ghz/768MB RAM
6gb Blue iPod Mini
     
K++  (op)
Senior User
Join Date: Jan 2002
Location: NYC
Status: Offline
Reply With Quote
Nov 21, 2002, 03:35 PM
 
woah! How does gdb attack to another computer?
     
BatmanPPC
Dedicated MacNNer
Join Date: Aug 2001
Status: Offline
Reply With Quote
Nov 21, 2002, 08:11 PM
 
Originally posted by K++:
woah! How does gdb attack to another computer?
using magic pixie dust

http://www.opendarwin.org/documentation/kern_debug.php
--
Mohammad A. Haque
http://www.haque.net/
mhaque|haque.net
     
Mac Zealot
Professional Poster
Join Date: Feb 2002
Location: Vallejo, Ca.
Status: Offline
Reply With Quote
Dec 2, 2002, 10:26 PM
 
Hey guys we're famous!!!!
     
faragbre967
Senior User
Join Date: May 2002
Location: Grosse Pointe, MI
Status: Offline
Reply With Quote
Dec 2, 2002, 11:05 PM
 
Originally posted by K++:
Okay, first of all my friend told me that this worked and of course I was skeptical and doudbted him, then I did it and was shocked that it worked. This is guaranteed to cause a kernel panic for all those who haven't seen one yet.

Code:
mkdir test cd test mkdir test mv test ..
<--- insert KP here

That is it everybody. I was extremely let down that this actually worked. I did want to see the KP screen but not through such a simple set of instructions to my computer. Im trying to justify it to mv's lack of understsanding of HFS+ and name collisions, so Im gonna go try to make the folders have different names after I post this and see if it goes down.

Now that we know such a simple set of instructions can Kernel Panic the most advanced operating system ever when do you think Apple will grace us with a fix for such a huge flaw.
Unless I did it wrong, and I don't think I did, there's no kernel panic when you do this. Haven't seen that screen since I f*cked my installation of Jag back when it first came out. Would have been nice to see...
...
     
ZackS
Banned
Join Date: Nov 2002
Location: Hell
Status: Offline
Reply With Quote
Dec 2, 2002, 11:09 PM
 
Originally posted by Mac Zealot:
Hey guys we're famous!!!!
Err, define famous. I guess we all did get an offhand mention at AtAT...
     
faragbre967
Senior User
Join Date: May 2002
Location: Grosse Pointe, MI
Status: Offline
Reply With Quote
Dec 2, 2002, 11:14 PM
 
Originally posted by faragbre967:

Unless I did it wrong, and I don't think I did, there's no kernel panic when you do this. Haven't seen that screen since I f*cked my installation of Jag back when it first came out. Would have been nice to see...
Hahaha, I did it wrong. Yes, this causes a kernel panic. And yes, the KP screen is beautiful and terrible at the same time.
...
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Dec 2, 2002, 11:25 PM
 
Originally posted by ZackS:


Err, define famous. I guess we all did get an offhand mention at AtAT...
How much more famous can you get than AtAT? Everything at AtAT is offhand, anyway.
     
Deadline
Junior Member
Join Date: Nov 2002
Location: Peotone, IL
Status: Offline
Reply With Quote
Dec 3, 2002, 01:21 AM
 
i saw this on /. it made me giggle.. i wonder who auctually sat here and tried to kill osx by doing that.. hehe
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:09 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,