Re: crash: cannot resolve "init_task_union"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave Anderson wrote:
On a RHEL5 x86:

  crash> sym -q __per_cpu | grep -e start -e end
  c03100a0 (A) __per_cpu_start
  c0315ae4 (A) __per_cpu_end
  crash>

But on your RHEL5 ppc64 kernel:

  # nm -Bn vmlinux | grep __per_cpu
  c000000000430100 D __per_cpu_start
  c0000000004356f0 D __per_cpu_end
  #

So if you remove the two "type == 'A'" qualifiers
from the if statement above, does it work OK?
Dave , thanks for the hint. Yes these symbols are of type D on PPC64 machine. Infact after checking on latest RHEL5 kernels [ with relocatable support ] this is the case with even other archs also.

[root@llm19 boot]# cat System.map-2.6.18-1.2767.el5 | grep __per_cpu_
c065dd2c r __ksymtab___per_cpu_offset
c0663c64 r __kcrctab___per_cpu_offset
c0666c12 r __kstrtab___per_cpu_offset
c06e6b80 D __per_cpu_offset
c077d100 D __per_cpu_start
c0781de4 D __per_cpu_end
[root@llm19 boot]# uname -i
i386
[root@llm19 boot]#


So this probably can be a generic problem affecting other arch's also.

Thanks for the help.

Attached here is a patch to fix this problem. Let me know if it's
ok.

Thanks
-Sachin


* On a UP machine running SMP kernel, crash fails while reading idle tasks
* from per cpu data.

Signed-off-by : Sachin Sant <sachinp@xxxxxxxxxx>
---




* On a UP machine running SMP kernel, crash fails while reading idle tasks
* from per cpu data. 

Signed-off-by : Sachin Sant <sachinp@xxxxxxxxxx>
---

diff -Naurp crash-4.0-3.16/kernel.c crash-4.0-3.16-new/kernel.c
--- crash-4.0-3.16/kernel.c	2006-12-22 01:24:11.000000000 +0530
+++ crash-4.0-3.16-new/kernel.c	2007-01-05 10:49:39.000000000 +0530
@@ -114,7 +114,8 @@ kernel_init()
 
 	if ((sp1 = symbol_search("__per_cpu_start")) &&
  	    (sp2 =  symbol_search("__per_cpu_end")) &&
-	    (sp1->type == 'A') && (sp2->type == 'A') &&
+	    (sp1->type == 'A' || sp1->type == 'D') && 
+	    (sp2->type == 'A' || sp2->type == 'D') &&
 	    (sp2->value > sp1->value))
 		kt->flags |= SMP|PER_CPU_OFF;
 	
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux