Tejasvi Aswathanarayana wrote:
> So, for starters, can you display how "pid_hash" is
> declared in your kernel?
>
static struct hlist_head *pid_hash[PIDTYPE_MAX];

> This is the code sequence in task_init() that selects
> refresh_hlist_task_table() or refresh_hlist_task_table_v2():
>
>       } else {
>               tt->pidhash_addr = symbol_value("pid_hash");
>               if (!get_array_length("pid_hash", NULL, sizeof(void *)) &&
>                   VALID_STRUCT(pid_link))
>                       tt->refresh_task_table = refresh_hlist_task_table_v2;
>               else
>                       tt->refresh_task_table = refresh_hlist_task_table;
>       }

Yes, refresh_hlist_task_table is being selected, but because the "if"
clause itself was failing.

get_array_length("pid_hash",...)  = 1
VALID_STRUCT(pid_link)  = 0
VALID_MEMBER(pid_link_pid) = 0
VALID_MEMBER(pid_hash_chain)) = 0

        if (VALID_MEMBER(pid_link_pid) && VALID_MEMBER(pid_hash_chain)) {
                        get_symbol_data("pid_hash", sizeof(ulong), &tt->pidhash_addr);
                        tt->refresh_task_table = refresh_pid_hash_task_table;
        } else {

> Alternatively, if you want to make the vmlinux/dumpfile pair
> available to me, I can take a look at it.
Thanks, I will see how I can get you the files.

> Another thing to check -- there are two places that print that
> "cannot determine..." error message.  Can you verify that it's
> happening in refresh_hlist_task_table()?  That's where the
> previous reporter said that it happened on his system, but I
> just want to make absolutely sure.

I confirmed that the error message "crash: cannot determine pid_hash
array dimensions " was  from the refresh_hlist_task_table() function
 

Very strange -- on two counts...

You're showing that get_array_length("pid_hash", ...) is returning 1,
whereas I'm presuming that the PIDTYPE_MAX enum would be equal
to 4.  That I don't understand...

And then, the error message in refresh_hlist_task_table() is subsequently
triggered because the same get_array_length() call returns a zero:

        if (!(plen = get_array_length("pid_hash", NULL, sizeof(void *))))
                error(FATAL, "cannot determine pid_hash array dimensions\n");

and so I'm sure I don't understand that either...

BTW, what the other guy did was to hardwire "plen" above to 4 (I presume he
used 4) and things worked OK.  Does that hack work with your dumpfile?

Anyway, please try to make the vmlinux/dumpfile pair available for download,
as I'd really like to tinker with them...

Dave