Re: [PATCH] dump_stack on panic

2007-10-31 Thread Steven Rostedt
-- On Wed, 31 Oct 2007, Arjan van de Ven wrote: > On Wed, 31 Oct 2007 11:00:56 -0400 (EDT) > Steven Rostedt <[EMAIL PROTECTED]> wrote: > > > > I've had too many issues in development where I hit a panic and it > > gives me nothing to tell me why. > > > > At the very least, we should have a dump_s

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Arjan van de Ven
On Wed, 31 Oct 2007 11:00:56 -0400 (EDT) Steven Rostedt <[EMAIL PROTECTED]> wrote: > > I've had too many issues in development where I hit a panic and it > gives me nothing to tell me why. > > At the very least, we should have a dump_stack in areas that are > usually caused by kernel bugs. For ex

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Steven Rostedt
-- On Wed, 31 Oct 2007, Arjan van de Ven wrote: > On Tue, 30 Oct 2007 20:02:59 -0400 > Steven Rostedt <[EMAIL PROTECTED]> wrote: > > > Is there any reason why we don't do a dump_stack on panic? > > > panic() should never be used for kernel type of bugs, that's what > BUG_ON() is for. panic() tend

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Arjan van de Ven
On Tue, 30 Oct 2007 20:02:59 -0400 Steven Rostedt <[EMAIL PROTECTED]> wrote: > Is there any reason why we don't do a dump_stack on panic? panic() should never be used for kernel type of bugs, that's what BUG_ON() is for. panic() tends to be for "your cpu melted" and "you don't have a root fs"..

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Andi Kleen
I suspect most of the panics you cited are unnecessary and should be revisited anyways. Linux should be far beyond the "we left out error handling and put in panic instead" philosophy of classical Unix now and those are mostly just some left overs. But that's a different issue. > IMHO I believe

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Steven Rostedt
-- On Wed, 31 Oct 2007, Andi Kleen wrote: > > Thinking about this more. Of the Linux users I asked, they think a kernel > > panic is a bug in the kernel anyway (or at least something in the kernel > > went wrong). So if panics will point users to the kernel anyway, then why > > leave out possibl

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Andi Kleen
> Thinking about this more. Of the Linux users I asked, they think a kernel > panic is a bug in the kernel anyway (or at least something in the kernel > went wrong). So if panics will point users to the kernel anyway, then why > leave out possible vital information from those panics that were caus

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Steven Rostedt
-- On Wed, 31 Oct 2007, Andi Kleen wrote: > On Wed, Oct 31, 2007 at 08:15:13AM +, Christoph Hellwig wrote: > > On Wed, Oct 31, 2007 at 01:14:04AM +0100, Andi Kleen wrote: > > > One (mostly psychological, but still serious) problem is that stack > > > dumps make panics always look like kernel

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Andi Kleen
On Wed, Oct 31, 2007 at 08:15:13AM +, Christoph Hellwig wrote: > On Wed, Oct 31, 2007 at 01:14:04AM +0100, Andi Kleen wrote: > > One (mostly psychological, but still serious) problem is that stack > > dumps make panics always look like kernel bugs. But there are panics > > which are definitely

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Ingo Molnar
* Christoph Hellwig <[EMAIL PROTECTED]> wrote: > On Wed, Oct 31, 2007 at 01:14:04AM +0100, Andi Kleen wrote: > > One (mostly psychological, but still serious) problem is that stack > > dumps make panics always look like kernel bugs. But there are panics > > which are definitely not kernel bugs:

Re: [PATCH] dump_stack on panic

2007-10-31 Thread Christoph Hellwig
On Wed, Oct 31, 2007 at 01:14:04AM +0100, Andi Kleen wrote: > One (mostly psychological, but still serious) problem is that stack > dumps make panics always look like kernel bugs. But there are panics > which are definitely not kernel bugs: like the popular cannot mount > root or machine checks or

Re: [PATCH] dump_stack on panic

2007-10-30 Thread Steven Rostedt
-- On Wed, 31 Oct 2007, Andi Kleen wrote: > Steven Rostedt <[EMAIL PROTECTED]> writes: > > > Is there any reason why we don't do a dump_stack on panic? > > One (mostly psychological, but still serious) problem is that stack > dumps make panics always look like kernel bugs. But there are panics >

Re: [PATCH] dump_stack on panic

2007-10-30 Thread Andi Kleen
Steven Rostedt <[EMAIL PROTECTED]> writes: > Is there any reason why we don't do a dump_stack on panic? One (mostly psychological, but still serious) problem is that stack dumps make panics always look like kernel bugs. But there are panics which are definitely not kernel bugs: like the popular

[PATCH] dump_stack on panic

2007-10-30 Thread Steven Rostedt
Is there any reason why we don't do a dump_stack on panic? I find this s useful in the -rt patch, where Ingo has placed a dump_stack on panic. With mainline, when I hit a panic, I don't always know how it got there. So I find myself adding the dump_stack and trying to create the bug again. Th