[Top] [All Lists]

Re: hints on wait queue bug?

To:, Rob Lembree <>
Subject: Re: hints on wait queue bug?
From: Colin.Helliwell@Zarlink.Com
Date: Wed, 9 Oct 2002 14:03:54 +0100
Original-recipient: rfc822;
Does your code use the DECLARE_WAIT_QUEUE_HEAD macro?
If so : I had a similar-sounding problem (on a PowerPC platform) where if
this macro was used to declare+initialise the queue, the initialisation did
not occur correctly. Performing the initialisation separately at runtime
with "init_waitqueue_head(&wqh)" corrects the problem. Our working
assumption is that it was perhaps a PPC gcc bug (I have seen mention of it
on a PPC msg board), but it could be more widespread. I have a piece of
test code which showed the problem, if you want to try it.

                      Ralf Baechle                                              
                      <>        To:       Rob Lembree 
                      Sent by:                     cc:                                                     
                      linux-mips-bounce@lin        Subject:  Re: hints on wait 
queue bug?                                                  
                      09-Oct-2002 01:19 PM                                      

On Thu, Aug 29, 2002 at 04:29:16PM -0400, Rob Lembree wrote:

> I've got a problem where lots of io to the console seems
> to break something in the kernel, resulting in a segfault,
> along with a kernel error.
> I dove into it, and found that it's related to wait queue
> stuff.  I turned on the wait queue debugging, and got the
> following, just prior to things going off the deep end.
> bad magic 802ccb24 (should be 802ccb2c), kernel BUG at sched.c:729!
> Is there some tutorial on this stuff somewhere (besides
> reading the code -- I'm doing that now!)
> Has this stuff changed a great deal since 2.4.5 (when this
> code last worked correctly)?

No.  Typicall such bugs are caused by memory corruption but as in your
case the magic number which is an address is only off by eight bytes
you might also consider a tool bug, so I suggest disassembling the
kernel binary and checking if it's getting initialized correctly.


<Prev in Thread] Current Thread [Next in Thread>