Re: Oopses below shrink_slab

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Pekka Enberg
Date: Tuesday, August 26, 2008 - 3:42 pm

Hi Darren,

On Tue, Aug 26, 2008 at 10:31 PM, Darren Salt
<linux@youmustbejoking.demon.co.uk> wrote:

Looking at disassembly of the code:

     123:       48 8b 83 88 00 00 00    mov    0x88(%rbx),%rax
     12a:       48 85 c0                test   %rax,%rax
     12d:       74 19                   je     148 <dentry_iput+0x83>
     12f:       48 8b 40 28             mov    0x28(%rax),%rax <-- oops

The offset of dentry->d_op is 0x88 and the offset of d_op->d_iput is
0x28, so the oops happens in dentry_iput::fs/dcache.c:

    if (dentry->d_op && dentry->d_op->d_iput)
            dentry->d_op->d_iput(dentry, inode);

The culprit here seems to be that dentry->d_op contains a totally
bogus pointer ("0x66") in %rax.


OK, this looks very scary. I get the following code when disassembling
a local copy of mm/page_alloc.o:

    2215:       48 89 d7                mov    %rdx,%rdi
    2218:       48 c1 e8 17             shr    $0x17,%rax
    221c:       48 c1 ef 0f             shr    $0xf,%rdi
    2220:       48 8b 0c c5 00 00 00    mov    0x0(,%rax,8),%rcx
    2227:       00

But the code in your oops disassemble to:

  23:   48 c1 e8 17             shr    $0x17,%rax
  27:   48 c1 ef 0f             shr    $0xf,%rdi
   0:   48 8b 0c c5 80 4f 6e    mov    -0x7f91b080(,%rax,8),%rcx
   7:   80

Which looks very wrong indeed. The value of %rax
("0x000001fffffc8925") looks fairly interesting as well. The code in
question seem to be get_pageblock_flags_group() ->
get_pageblock_bitmap() -> __pfn_to_section() -> __nr_to_section():

        if (!mem_section[SECTION_NR_TO_ROOT(nr)])
                return NULL;

However, as this is a common page allocator path (we call
get_pageblock_flags_group() from the free_hot_cold_page() function),
you should probably be hitting this problem early on which makes me
think we're looking at bad hardware.

                             Pekka
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Oopses below shrink_slab, Darren Salt, (Tue Aug 26, 12:31 pm)
Re: Oopses below shrink_slab, Pekka Enberg, (Tue Aug 26, 3:42 pm)