FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 01-26-2012, 09:09 AM
Michael Holzheu
 
Default vt->kmem_cache_len_nodes not set

Hello Dave,

I have a s390x dump of a Linux-3.1 kernel where I get the error message:

crash: zero-size memory allocation! (called from 8009f504)

The error comes from max_cpudata_limit() where GETBUF fails:

/*
* Check the shared list of all the nodes.
*/
start_address = (ulong *)GETBUF(sizeof(ulong) * vt->kmem_cache_len_nodes);

--> vt->kmem_cache_len_nodes = 0

I debugged the problem a bit and found out that the reason is
that crash does not set vt->kmem_cache_len_nodes for that dump.
This attribute seem to be only set in kmem_cache_downsize():

if (buffer_size < SIZE(kmem_cache_s)) {
if (kernel_symbol_exists("nr_node_ids")) {
get_symbol_data("nr_node_ids", sizeof(int),
&nr_node_ids);
vt->kmem_cache_len_nodes = nr_node_ids;
} else {
fprintf(fp, "XXX kernel_symbol_exists(
");
vt->kmem_cache_len_nodes = 1;
}

In my dump the "if" condition returns false (buffer_size = 768,
SIZE(kmem_cache_s = 624) therefore vt->kmem_cache_len_nodes is
not set. Perhaps the content of "cache_cache" is useful to understand
what is going on:

print cache_cache
$7 = {
batchcount = 27,
limit = 54,
shared = 8,
buffer_size = 768, <<-----
reciprocal_buffer_size = 5592406,
flags = 0,
num = 5,
gfporder = 0,
gfpflags = 0,
colour = 0,
colour_off = 256,
slabp_cache = 0x0,
slab_size = 256,
dflags = 0,
ctor = 0,
name = 0x667b8e "kmem_cache",
next = {
next = 0x93b528,
prev = 0xff04158
},
nodelists = 0x93b538,
array = {0xff23e00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x
0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
}

Any idea what's wrong here?

Best Regards

Michael

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 01-26-2012, 12:54 PM
Dave Anderson
 
Default vt->kmem_cache_len_nodes not set

----- Original Message -----
> Hello Dave,
>
> I have a s390x dump of a Linux-3.1 kernel where I get the error
> message:
>
> crash: zero-size memory allocation! (called from 8009f504)
>
> The error comes from max_cpudata_limit() where GETBUF fails:
>
> /*
> * Check the shared list of all the nodes.
> */
> start_address = (ulong *)GETBUF(sizeof(ulong) *
> vt->kmem_cache_len_nodes);
>
> --> vt->kmem_cache_len_nodes = 0
>
> I debugged the problem a bit and found out that the reason is
> that crash does not set vt->kmem_cache_len_nodes for that dump.
> This attribute seem to be only set in kmem_cache_downsize():
>
> if (buffer_size < SIZE(kmem_cache_s)) {
> if (kernel_symbol_exists("nr_node_ids")) {
> get_symbol_data("nr_node_ids", sizeof(int),
> &nr_node_ids);
> vt->kmem_cache_len_nodes = nr_node_ids;
> } else {
> fprintf(fp, "XXX kernel_symbol_exists(
");
> vt->kmem_cache_len_nodes = 1;
> }
>
> In my dump the "if" condition returns false (buffer_size = 768,
> SIZE(kmem_cache_s = 624) therefore vt->kmem_cache_len_nodes is
> not set. Perhaps the content of "cache_cache" is useful to understand
> what is going on:
>
> print cache_cache
> $7 = {
> batchcount = 27,
> limit = 54,
> shared = 8,
> buffer_size = 768, <<-----
> reciprocal_buffer_size = 5592406,
> flags = 0,
> num = 5,
> gfporder = 0,
> gfpflags = 0,
> colour = 0,
> colour_off = 256,
> slabp_cache = 0x0,
> slab_size = 256,
> dflags = 0,
> ctor = 0,
> name = 0x667b8e "kmem_cache",
> next = {
> next = 0x93b528,
> prev = 0xff04158
> },
> nodelists = 0x93b538,
> array = {0xff23e00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x
> 0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
> }
>
> Any idea what's wrong here?
>
> Best Regards
>
> Michael

Bob does:

[Crash-utility] "zero-size memory allocation!" is back for Linux 3.1
https://www.redhat.com/archives/crash-utility/2012-January/msg00086.html

He's working on a patch...

You can use the "crash --no_kmem_cache ..." command line option to get around it.

Dave

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 01-26-2012, 02:21 PM
Michael Holzheu
 
Default vt->kmem_cache_len_nodes not set

Hi Dave,

On Thu, 2012-01-26 at 08:54 -0500, Dave Anderson wrote:

[snip]

> >
> > Any idea what's wrong here?
> >
> > Best Regards
> >
> > Michael
>
> Bob does:
>
> [Crash-utility] "zero-size memory allocation!" is back for Linux 3.1
> https://www.redhat.com/archives/crash-utility/2012-January/msg00086.html
>
> He's working on a patch...

Ah, this is good news! Sorry, somehow I missed that thread.

> You can use the "crash --no_kmem_cache ..." command line option to get around it.

This worked for me, thanks!

Michael


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

Thread Tools




All times are GMT. The time now is 05:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org