<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Tejasvi Aswathanarayana wrote:
<blockquote TYPE=CITE>> So, for starters, can you display how "pid_hash"
is
<br>> declared in your kernel?
<br>>
<br>static struct hlist_head *pid_hash[PIDTYPE_MAX];
<p>> This is the code sequence in task_init() that selects
<br>> refresh_hlist_task_table() or refresh_hlist_task_table_v2():
<br>>
<br>>       } else {
<br>>              
tt->pidhash_addr = symbol_value("pid_hash");
<br>>              
if (!get_array_length("pid_hash", NULL, sizeof(void *)) &&
<br>>                  
VALID_STRUCT(pid_link))
<br>>                      
tt->refresh_task_table = refresh_hlist_task_table_v2;
<br>>              
else
<br>>                      
tt->refresh_task_table = refresh_hlist_task_table;
<br>>       }
<p>Yes, refresh_hlist_task_table is being selected, but because the "if"
<br>clause itself was failing.
<p>get_array_length("pid_hash",...)  = 1
<br>VALID_STRUCT(pid_link)  = 0
<br>VALID_MEMBER(pid_link_pid) = 0
<br>VALID_MEMBER(pid_hash_chain)) = 0
<p>        if (VALID_MEMBER(pid_link_pid)
&& VALID_MEMBER(pid_hash_chain)) {
<br>                       
get_symbol_data("pid_hash", sizeof(ulong), &tt->pidhash_addr);
<br>                       
tt->refresh_task_table = refresh_pid_hash_task_table;
<br>        } else {
<p>> Alternatively, if you want to make the vmlinux/dumpfile pair
<br>> available to me, I can take a look at it.
<br>Thanks, I will see how I can get you the files.
<p>> Another thing to check -- there are two places that print that
<br>> "cannot determine..." error message.  Can you verify that it's
<br>> happening in refresh_hlist_task_table()?  That's where the
<br>> previous reporter said that it happened on his system, but I
<br>> just want to make absolutely sure.
<p>I confirmed that the error message "crash: cannot determine pid_hash
<br>array dimensions " was  from the refresh_hlist_task_table() function
<br> </blockquote>
<tt>Very strange -- on two counts...</tt><tt></tt>
<p><tt>You're showing that get_array_length("pid_hash", ...) is returning
1,</tt>
<br><tt>whereas I'm presuming that the PIDTYPE_MAX enum would be equal</tt>
<br><tt>to 4.  That I don't understand...</tt><tt></tt>
<p><tt>And then, the error message in refresh_hlist_task_table() is subsequently</tt>
<br><tt>triggered because the same get_array_length() call returns a zero:</tt><tt></tt>
<p><tt>        if (!(plen = get_array_length("pid_hash",
NULL, sizeof(void *))))</tt>
<br><tt>               
error(FATAL, "cannot determine pid_hash array dimensions\n");</tt><tt></tt>
<p><tt>and so I'm sure I don't understand that either...</tt><tt></tt>
<p><tt>BTW, what the other guy did was to hardwire "plen" above to 4 (I
presume he</tt>
<br><tt>used 4) and things worked OK.  Does that hack work with your
dumpfile?</tt><tt></tt>
<p><tt>Anyway, please try to make the vmlinux/dumpfile pair available for
download,</tt>
<br><tt>as I'd really like to tinker with them...</tt><tt></tt>
<p><tt>Dave</tt>
<br><tt></tt> </html>