----- Original Message -----
 Here is a patch against crash v6.0.2 that adds duplicate node
detection
 per-CPU for the CFS runqueue display in dump_CFS_runqueues() for the
 runq command.
 
 This resolves the failure to bail-out of the unending looping display I
 get with the crash dump I have that has a corrupted CFS runqueue
 containing a loop.
 
 Signed-off-by: David Mair <dmair(a)suse.com>
 --- 
That was quick! 
I'm going to have to re-work this patch slightly because of the queued
changes for crash-6.0.3 that are based upon Daisuke's runq patch:
  [Crash-utility] [PATCH] runq: search current task's runqueue explicitly
  
https://www.redhat.com/archives/crash-utility/2012-January/msg00009.html
I'm going to try to get a release out in the next day or two.
Thanks,
  Dave
 
  task.c |    9 ++++++++-
  1 files changed, 8 insertions(+), 1 deletions(-)
 
 diff --git a/task.c b/task.c
 index 433a043..0333fe8 100755
 --- a/task.c
 +++ b/task.c
 @@ -7050,7 +7050,12 @@ dump_tasks_in_cfs_rq(ulong cfs_rq, ulong skip)
  				     OFFSET(sched_entity_run_node));
  		if (!tc)
  			continue;
 -		dump_task_runq_entry(tc);
 +		if (hq_enter((ulong)tc)) {
 +			dump_task_runq_entry(tc);
 +		} else {
 +			error(WARNING, "Duplicate CFS runqueue node, task %lx, probable
 loop\n", tc->task);
 +			return total;
 +		}
  		total++;
  	}
 
 @@ -7217,10 +7222,12 @@ dump_CFS_runqueues(void)
  		fprintf(fp, "  CFS RB_ROOT: %lx\n", (ulong)root);
 
  		tot = 0;
 +		hq_open();
  		if (curr_cfs_rq)
  			tot += dump_tasks_in_cfs_rq(curr_cfs_rq, 0);
  		if (cfs_rq != curr_cfs_rq)
  			tot += dump_tasks_in_cfs_rq(cfs_rq, curr_cfs_rq);
 +		hq_close();
  		if (!tot) {
  			INDENT(5);
  			fprintf(fp, "[no tasks queued]\n");
 
 --
 Crash-utility mailing list
 Crash-utility(a)redhat.com
 
https://www.redhat.com/mailman/listinfo/crash-utility