All of lore.kernel.org
 help / color / mirror / Atom feed
* Coldfire 5271 hitting BUG_ON(page_count(buddy) != 0);
@ 2009-06-25 15:43 Lennart Sorensen
  2009-06-26  3:21 ` [uClinux-dev] " Greg Ungerer
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Sorensen @ 2009-06-25 15:43 UTC (permalink / raw)
  To: uClinux development list; +Cc: Linux Kernel Mailing List, Len Sorensen

I am hitting a memory management bug and I would love some hints as to
how to track down the bug and fix it.

The bug hit is line 423 of page_alloc.c which is:

BUG_ON(page_count(buddy) != 0);

The function it is part of is:

static inline int page_is_buddy(struct page *page, struct page *buddy,
                                                                int order)
{
        if (!pfn_valid_within(page_to_pfn(buddy)))
                return 0;

        if (page_zone_id(page) != page_zone_id(buddy))
                return 0;

        if (PageBuddy(buddy) && page_order(buddy) == order) {
                BUG_ON(page_count(buddy) != 0);
                return 1;
        }
        return 0;
}

I am seeing this both with 2.6.29.1 and 2.6.30 so far.  I unfortunately
haven't poked much at the memory management code, so I am not even sure
what this is supposed to be doing.  The cpu us a coldfire 5271.

I also see crashes causing the kernel to dump lots of hex values.
Building the kernel with debug enabled unfortunately seems to move things
around enough to make it just lock up instead without any output.

-- 
Len Sorensen

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

* Re: [uClinux-dev]  Coldfire 5271 hitting BUG_ON(page_count(buddy) != 0);
  2009-06-25 15:43 Coldfire 5271 hitting BUG_ON(page_count(buddy) != 0); Lennart Sorensen
@ 2009-06-26  3:21 ` Greg Ungerer
  2009-06-26 15:23   ` Lennart Sorensen
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Ungerer @ 2009-06-26  3:21 UTC (permalink / raw)
  To: uClinux development list; +Cc: Linux Kernel Mailing List

Hi Lennart,

Lennart Sorensen wrote:
> I am hitting a memory management bug and I would love some hints as to
> how to track down the bug and fix it.
> 
> The bug hit is line 423 of page_alloc.c which is:
> 
> BUG_ON(page_count(buddy) != 0);
> 
> The function it is part of is:
> 
> static inline int page_is_buddy(struct page *page, struct page *buddy,
>                                                                 int order)
> {
>         if (!pfn_valid_within(page_to_pfn(buddy)))
>                 return 0;
> 
>         if (page_zone_id(page) != page_zone_id(buddy))
>                 return 0;
> 
>         if (PageBuddy(buddy) && page_order(buddy) == order) {
>                 BUG_ON(page_count(buddy) != 0);
>                 return 1;
>         }
>         return 0;
> }
> 
> I am seeing this both with 2.6.29.1 and 2.6.30 so far.  I unfortunately
> haven't poked much at the memory management code, so I am not even sure
> what this is supposed to be doing.  The cpu us a coldfire 5271.
> 
> I also see crashes causing the kernel to dump lots of hex values.
> Building the kernel with debug enabled unfortunately seems to move things
> around enough to make it just lock up instead without any output.

What are you doing at the time you get this?
Or is it at bootup?

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com

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

* Re: [uClinux-dev]  Coldfire 5271 hitting BUG_ON(page_count(buddy) != 0);
  2009-06-26  3:21 ` [uClinux-dev] " Greg Ungerer
@ 2009-06-26 15:23   ` Lennart Sorensen
  0 siblings, 0 replies; 3+ messages in thread
From: Lennart Sorensen @ 2009-06-26 15:23 UTC (permalink / raw)
  To: uClinux development list; +Cc: Linux Kernel Mailing List

On Fri, Jun 26, 2009 at 01:21:25PM +1000, Greg Ungerer wrote:
> Hi Lennart,
>
> Lennart Sorensen wrote:
>> I am hitting a memory management bug and I would love some hints as to
>> how to track down the bug and fix it.
>>
>> The bug hit is line 423 of page_alloc.c which is:
>>
>> BUG_ON(page_count(buddy) != 0);
>>
>> The function it is part of is:
>>
>> static inline int page_is_buddy(struct page *page, struct page *buddy,
>>                                                                 int order)
>> {
>>         if (!pfn_valid_within(page_to_pfn(buddy)))
>>                 return 0;
>>
>>         if (page_zone_id(page) != page_zone_id(buddy))
>>                 return 0;
>>
>>         if (PageBuddy(buddy) && page_order(buddy) == order) {
>>                 BUG_ON(page_count(buddy) != 0);
>>                 return 1;
>>         }
>>         return 0;
>> }
>>
>> I am seeing this both with 2.6.29.1 and 2.6.30 so far.  I unfortunately
>> haven't poked much at the memory management code, so I am not even sure
>> what this is supposed to be doing.  The cpu us a coldfire 5271.
>>
>> I also see crashes causing the kernel to dump lots of hex values.
>> Building the kernel with debug enabled unfortunately seems to move things
>> around enough to make it just lock up instead without any output.
>
> What are you doing at the time you get this?
> Or is it at bootup?

Running a few little test programs.

We are trying to narrow it down to as small a test case as possible
right now.

Pretty much we boot to a busybox shell, then run a while loop that does
a read of an lm75 sensor on i2c and reads an eeprom on i2c, and after
a few loops, the kernel BUG is hit.

Hopefully in an hour or two I will have it narrowed down to a smaller
test case (so far it looks like the lm75 part has nothing to do with it,
so it may simply be the reading of the i2c eeprom that is doing it).
The eeprom is being read using eeprog using the user space i2c bus
access methods.

-- 
Len Sorensen

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

end of thread, other threads:[~2009-06-26 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-25 15:43 Coldfire 5271 hitting BUG_ON(page_count(buddy) != 0); Lennart Sorensen
2009-06-26  3:21 ` [uClinux-dev] " Greg Ungerer
2009-06-26 15:23   ` Lennart Sorensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.