Thanks Steve, as I'm checking up this possibility thought I'd also ask you. I'm initializing the mutex in a thread, spawning off two threads that'll use them and then destroying the initializing thread which is probably giving me this panic. I have a hunch if I initialize the mutexes in the _init routine of the driver this should be taken care of. Do you reckon the same? Bhaskar.
-----Original Message----- From: Steven Stallion [mailto:stall...@opensolaris.org] Sent: Friday, October 09, 2009 11:52 AM To: Jayaraman, Bhaskar Cc: Sean Sprague; opensolaris-code@opensolaris.org Subject: Re: [osol-code] Crash in kernel code! On Thu, 8 Oct 2009 18:27:40 +0530, "Jayaraman, Bhaskar" <bhaskar.jayara...@lsi.com> wrote: > Thanks for the replies. Well my problem is that I don't seem to be spawning > the owner thread. i.e. I printed all the thread-ids I'm spawning (including > the mutex._opaque[0] value each time it is entered and exited) and none of > them matches the actual owner thread id of the mutex. Any idea how I can > find out who its parent is? A general rule of thumb when dealing with mutexes: The moment you have to ask the question 'Who owns this mutex?' you have a rather serious problem (which can for the most part, be avoided quite easily). Your mutex_enter/mutex_exit calls should be paired and should always be scoped within the same function. Look at the backtrace of your panic ($C/$c) and identify the function which is causing the fault; the asm offset should give you a reasonable place to start looking. Steve _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code