linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Stack Trace dump in do_IRQ
@ 2003-04-29 12:34 Chandrasekhar
  2003-04-29 12:35 ` Christoph Hellwig
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Chandrasekhar @ 2003-04-29 12:34 UTC (permalink / raw)
  To: linux-kernel

Hi All,
We have a custom driver which runs on Red Hat Advanced Server 2.1(kernel
version 2.4.9-e.3).
On loading  the driver (using insmod) and running our configuration program,
we got folowing warning message "do_IRQ: stack overflow: 1786" and along
with the stack trace.

The configuration program, however, ran successfully.

On going through the do_IRQ code in arch/i386/kernel/irq.c we found that is
is used for debugging check for stack overflow i.e if the stack size is less
than 2KB free.
There is no similar debugging check in other kernels like 2.4.7-10,2.4.18-3
and 2.4.18-14.
What is the significance of this debugging information and why other kernels
dont have the same check? Also, if the stack overflow can cause future
problems, then
how can we increase the stack size? Thanks in advance for any information on
this.

Thanks and Regards
Chandrasekhar


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Stack Trace dump in do_IRQ
  2003-04-29 12:34 Stack Trace dump in do_IRQ Chandrasekhar
@ 2003-04-29 12:35 ` Christoph Hellwig
  2003-04-29 12:59 ` Jörn Engel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2003-04-29 12:35 UTC (permalink / raw)
  To: Chandrasekhar; +Cc: linux-kernel

On Tue, Apr 29, 2003 at 06:04:28PM +0530, Chandrasekhar wrote:
> Hi All,
> We have a custom driver which runs on Red Hat Advanced Server 2.1(kernel
> version 2.4.9-e.3).

In general please report bugs for vendor kernels to their repective
vnedors - the RH AS kernels have forked from mainline 2.4 more than 1 1/2
years ago so they are very different from any official kernel.

> dont have the same check? Also, if the stack overflow can cause future
> problems, then
> how can we increase the stack size? Thanks in advance for any information on
> this.

I'd suggest fixing the driver instead :)  and btw, a similar debugging
check is merged in recent mainline kernels.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Stack Trace dump in do_IRQ
  2003-04-29 12:34 Stack Trace dump in do_IRQ Chandrasekhar
  2003-04-29 12:35 ` Christoph Hellwig
@ 2003-04-29 12:59 ` Jörn Engel
  2003-04-29 13:23 ` Alan Cox
  2003-04-29 13:26 ` Arjan van de Ven
  3 siblings, 0 replies; 5+ messages in thread
From: Jörn Engel @ 2003-04-29 12:59 UTC (permalink / raw)
  To: Chandrasekhar; +Cc: linux-kernel

On Tue, 29 April 2003 18:04:28 +0530, Chandrasekhar wrote:
> 
> We have a custom driver which runs on Red Hat Advanced Server 2.1(kernel
> version 2.4.9-e.3).
> On loading  the driver (using insmod) and running our configuration program,
> we got folowing warning message "do_IRQ: stack overflow: 1786" and along
> with the stack trace.
> 
> The configuration program, however, ran successfully.
> 
> On going through the do_IRQ code in arch/i386/kernel/irq.c we found that is
> is used for debugging check for stack overflow i.e if the stack size is less
> than 2KB free.
> There is no similar debugging check in other kernels like 2.4.7-10,2.4.18-3
> and 2.4.18-14.
> What is the significance of this debugging information and why other kernels
> dont have the same check? Also, if the stack overflow can cause future
> problems, then
> how can we increase the stack size? Thanks in advance for any information on
> this.

I don't know those kernel versions, they appear to be redhat-specific.
But current mainline kernels, both 2.4 and 2.5 have had this check for
a while already. You have to set a config option to enable them.

In principle, there is absolutely no way how linux can tell when the
check will spill over. The check in do_irq simply checks if the kernel
was close, at the time of that interrupt. This is enough to catch
dangerous code paths and fix them, before any real problems occur.

"close" for mainline kernels means, there is less than 1k of free
stack left. Your redhat kernel seems to use 2k, I even go as far as
5k, but that definitely fills my logs. 1786 is the number of bytes
still free on the stack. Should be enough for you.

If you can reproduce something as low as 1786 for a recent 2.4 or 2.5
kernel, I'd be interested in the backtrace. For 2.4.9, I just don't
care. :)

Jörn

-- 
Fantasy is more important than knowlegde. Knowlegde is limited,
while fantasy embraces the whole world.
-- Albert Einstein

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Stack Trace dump in do_IRQ
  2003-04-29 12:34 Stack Trace dump in do_IRQ Chandrasekhar
  2003-04-29 12:35 ` Christoph Hellwig
  2003-04-29 12:59 ` Jörn Engel
@ 2003-04-29 13:23 ` Alan Cox
  2003-04-29 13:26 ` Arjan van de Ven
  3 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2003-04-29 13:23 UTC (permalink / raw)
  To: chandrasekhar.nagaraj; +Cc: Linux Kernel Mailing List

On Maw, 2003-04-29 at 13:34, Chandrasekhar wrote:
> On going through the do_IRQ code in arch/i386/kernel/irq.c we found that is
> is used for debugging check for stack overflow i.e if the stack size is less
> than 2KB free.
> There is no similar debugging check in other kernels like 2.4.7-10,2.4.18-3
> and 2.4.18-14.
> What is the significance of this debugging information and why other kernels
> dont have the same check? Also, if the stack overflow can cause future
> problems, then
> how can we increase the stack size? Thanks in advance for any information on
> this.

You can't. A driver has to work with a very small stack size.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Stack Trace dump in do_IRQ
  2003-04-29 12:34 Stack Trace dump in do_IRQ Chandrasekhar
                   ` (2 preceding siblings ...)
  2003-04-29 13:23 ` Alan Cox
@ 2003-04-29 13:26 ` Arjan van de Ven
  3 siblings, 0 replies; 5+ messages in thread
From: Arjan van de Ven @ 2003-04-29 13:26 UTC (permalink / raw)
  To: chandrasekhar.nagaraj; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

On Tue, 2003-04-29 at 14:34, Chandrasekhar wrote:
> Hi All,
> We have a custom driver which runs on Red Hat Advanced Server 2.1(kernel
> version 2.4.9-e.3).

What's the URL to the source ?

> On loading  the driver (using insmod) and running our configuration program,
> we got folowing warning message "do_IRQ: stack overflow: 1786" and along
> with the stack trace.
> 
this is a driver bug, it's < 5 minutes to fix usually given the source
;)



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-29 14:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-29 12:34 Stack Trace dump in do_IRQ Chandrasekhar
2003-04-29 12:35 ` Christoph Hellwig
2003-04-29 12:59 ` Jörn Engel
2003-04-29 13:23 ` Alan Cox
2003-04-29 13:26 ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).