Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   Crash kmem error (http://www.linux-archive.org/crash-utility/524823-crash-kmem-error.html)

Qiannan Cui 05-11-2011 03:32 AM

Crash kmem error
 
Hi,

When I used crash based off of a mainline kernel to run kmem, it failed. For your information, the detailed description of the problem is as follows.

Version-Release number of selected component:
# uname -a
Linux hp-rx8640-02.rhts.eng.bos.redhat.com 2.6.39-rc6+ #2 SMP Mon May 9 23:05:14 EDT 2011 ia64 ia64 ia64 GNU/Linux

Steps to Reproduce:
1、update the old kernel to the mainline kernel 2.6.39-rc6+
2、install crash
3、# crash <where the mainline kernel tree is>/vmlinux
4、crash> kmem -s
CACHE NAME OBJSIZE ALLOCATED TOTAL SLABS SSIZE

kmem: invalid structure member offset: slab_list
FILE: memory.c LINE: 9588 FUNCTION: verify_slab_v2()

[/usr/bin/crash] error trace: 40000000000db7c0 => 40000000000ca450 => 40000000000c8ea0 => 40000000001c74a0

40000000001c74a0: OFFSET_verify+224
40000000000c8ea0: verify_slab_v2+448
40000000000ca450: do_slab_chain_percpu_v2_nodes+4208
40000000000db7c0: dump_kmem_cache_percpu_v2+3536

kmem: invalid structure member offset: slab_list
FILE: memory.c LINE: 9588 FUNCTION: verify_slab_v2()


Best Regards,
Qiannan Cui

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Dave Anderson 05-11-2011 12:46 PM

Crash kmem error
 
----- Original Message -----
> Hi,
>
> When I used crash based off of a mainline kernel to run kmem, it
> failed. For your information, the detailed description of the problem
> is as follows.
>
> Version-Release number of selected component:
> # uname -a
> Linux hp-rx8640-02.rhts.eng.bos.redhat.com 2.6.39-rc6+ #2 SMP Mon May
> 9 23:05:14 EDT 2011 ia64 ia64 ia64 GNU/Linux
>
> Steps to Reproduce:
> 1、update the old kernel to the mainline kernel 2.6.39-rc6+
> 2、install crash
> 3、# crash <where the mainline kernel tree is>/vmlinux
> 4、crash> kmem -s
> CACHE NAME OBJSIZE ALLOCATED TOTAL SLABS SSIZE
>
> kmem: invalid structure member offset: slab_list
> FILE: memory.c LINE: 9588 FUNCTION: verify_slab_v2()
>
> [/usr/bin/crash] error trace: 40000000000db7c0 => 40000000000ca450 =>
> 40000000000c8ea0 => 40000000001c74a0
>
> 40000000001c74a0: OFFSET_verify+224
> 40000000000c8ea0: verify_slab_v2+448
> 40000000000ca450: do_slab_chain_percpu_v2_nodes+4208
> 40000000000db7c0: dump_kmem_cache_percpu_v2+3536
>
> kmem: invalid structure member offset: slab_list
> FILE: memory.c LINE: 9588 FUNCTION: verify_slab_v2()
>
>
> Best Regards,
> Qiannan Cui

Yes, I remember seeing the LKML post changing the slab structure
from this:

struct slab {
struct list_head list;
unsigned long colouroff;
void *s_mem; /* including colour offset */
unsigned int inuse; /* num of objs active in slab */
kmem_bufctl_t free;
unsigned short nodeid;
};

to this:

struct slab {
union {
struct {
struct list_head list;
unsigned long colouroff;
void *s_mem; /* including colour offset */
unsigned int inuse; /* num of objs active in slab */
kmem_bufctl_t free;
unsigned short nodeid;
};
struct slab_rcu __slab_cover_slab_rcu;
};
};

I had hoped that since the pre-existing fields had been moved
into an anonymous union that the member offsets would be
returned by gdb the same way. Apparently not:

(gdb) ptype struct slab
type = struct slab {
union {
struct {...};
struct slab_rcu __slab_cover_slab_rcu;
};
}
(gdb)

But the offsets can be determined in another manner.

Thanks,
Dave






--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 06:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.