Hi Dave
*
I found a problem with the runq command in the function dump_CFS_runqueues in task.c. The problem is in:
*
* if (!(rq_sp = per_cpu_symbol_search("per_cpu__runqueues")))
*** error(FATAL, "per-cpu runqueues does not exist
");
*
as that code does not support single core systems. However the rest of the function seems to handle single core correctly, so by just adding one line:
*
* if (!(rq_sp = per_cpu_symbol_search("per_cpu__runqueues")))
*** if (!(rq_sp = symbol_search("runqueues")))
***** error(FATAL, "per-cpu runqueues does not exist
");
*
the runq command works as it should. Of course the text in the error message should also be updated to something more proper.
*
Jan
*
*
Jan Karlsson
Senior Software Engineer
MIB
*
Sony Mobile Communications
Tel: +46703062174
sonymobile.com
*
*
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
07-12-2012, 01:17 PM
Dave Anderson
Problem in runq command
----- Original Message -----
>
> Hi Dave
>
> I found a problem with the runq command in the function
> dump_CFS_runqueues in task.c. The problem is in:
>
> if (!(rq_sp = per_cpu_symbol_search("per_cpu__runqueues")))
>
> error(FATAL, "per-cpu runqueues does not exist
");
>
> as that code does not support single core systems. However the rest
> of the function seems to handle single core correctly, so by just
> adding one line:
>
> if (!(rq_sp = per_cpu_symbol_search("per_cpu__runqueues")))
> if (!(rq_sp = symbol_search("runqueues")))
> error(FATAL, "per-cpu runqueues does not exist
");
>
> the runq command works as it should. Of course the text in the error
> message should also be updated to something more proper.
>
Interesting -- as it turns out, I've only got one sample x86_64 UP
kernel vmcore, and even though it's non-smp, a "per_cpu__runqueues"
symbol exists that points to the single runqueue. But it's a 2.6.31
UP kernel, and per-cpu handling has changed since then.
Anyway I see see the problem with the sample UP 2.6.38 ARM vmcore you
guys sent me, and note that it also breaks the "runq -t" option as well.
But that is also fixable by applying the same patch.
Good catch -- fixes are queued for crash-6.0.9.
Thanks,
Dave
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
07-12-2012, 02:55 PM
Dave Anderson
Problem in runq command
----- Original Message -----
>
>
> ----- Original Message -----
> >
> > Hi Dave
> >
> > I found a problem with the runq command in the function
> > dump_CFS_runqueues in task.c. The problem is in:
> >
> > if (!(rq_sp = per_cpu_symbol_search("per_cpu__runqueues")))
> >
> > error(FATAL, "per-cpu runqueues does not exist
");
> >
> > as that code does not support single core systems. However the rest
> > of the function seems to handle single core correctly, so by just
> > adding one line:
> >
> > if (!(rq_sp = per_cpu_symbol_search("per_cpu__runqueues")))
> > if (!(rq_sp = symbol_search("runqueues")))
> > error(FATAL, "per-cpu runqueues does not exist
");
> >
> > the runq command works as it should. Of course the text in the error
> > message should also be updated to something more proper.
> >
>
> Interesting -- as it turns out, I've only got one sample x86_64 UP
> kernel vmcore, and even though it's non-smp, a "per_cpu__runqueues"
> symbol exists that points to the single runqueue. But it's a 2.6.31
> UP kernel, and per-cpu handling has changed since then.
>
> Anyway I see see the problem with the sample UP 2.6.38 ARM vmcore you
> guys sent me, and note that it also breaks the "runq -t" option as well.
> But that is also fixable by applying the same patch.
I take that back -- the per_cpu_symbol_search() function should find
the non-percpu symbol and return its syment pointer. And because that
function fails, other command(s) that call per_cpu_symbol_search() will
fail with your vmcore as well. For example, the "timer" command:.
crash> runq
runq: per-cpu runqueues does not exist
crash> timer
timer: zero-size memory allocation! (called from 811c199)
crash>
This doesn't appear to be ARM-specific, but to be safe, the fix I'm
going with is this:
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
07-13-2012, 06:11 AM
"Karlsson, Jan"
Problem in runq command
I have tested your new solution and, as expected, it solves the problems I see. Thanks.
Jan
Jan Karlsson
Senior Software Engineer
MIB
*
Sony Mobile Communications
Tel: +46703062174
sonymobile.com
*
-----Original Message-----
From: crash-utility-bounces@redhat.com [mailto:crash-utility-bounces@redhat.com] On Behalf Of Dave Anderson
Sent: torsdag den 12 juli 2012 16:56
To: Discussion list for crash utility usage, maintenance and development
Subject: Re: [Crash-utility] Problem in runq command
----- Original Message -----
>
>
> ----- Original Message -----
> >
> > Hi Dave
> >
> > I found a problem with the runq command in the function
> > dump_CFS_runqueues in task.c. The problem is in:
> >
> > if (!(rq_sp = per_cpu_symbol_search("per_cpu__runqueues")))
> >
> > error(FATAL, "per-cpu runqueues does not exist
");
> >
> > as that code does not support single core systems. However the rest
> > of the function seems to handle single core correctly, so by just
> > adding one line:
> >
> > if (!(rq_sp = per_cpu_symbol_search("per_cpu__runqueues")))
> > if (!(rq_sp = symbol_search("runqueues")))
> > error(FATAL, "per-cpu runqueues does not exist
");
> >
> > the runq command works as it should. Of course the text in the error
> > message should also be updated to something more proper.
> >
>
> Interesting -- as it turns out, I've only got one sample x86_64 UP
> kernel vmcore, and even though it's non-smp, a "per_cpu__runqueues"
> symbol exists that points to the single runqueue. But it's a 2.6.31
> UP kernel, and per-cpu handling has changed since then.
>
> Anyway I see see the problem with the sample UP 2.6.38 ARM vmcore you
> guys sent me, and note that it also breaks the "runq -t" option as well.
> But that is also fixable by applying the same patch.
I take that back -- the per_cpu_symbol_search() function should find
the non-percpu symbol and return its syment pointer. And because that
function fails, other command(s) that call per_cpu_symbol_search() will
fail with your vmcore as well. For example, the "timer" command:.
crash> runq
runq: per-cpu runqueues does not exist
crash> timer
timer: zero-size memory allocation! (called from 811c199)
crash>
This doesn't appear to be ARM-specific, but to be safe, the fix I'm
going with is this: