<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<tt>Badari Pulavarty wrote:</tt>
<blockquote TYPE=CITE><tt>On Tue, 2006-04-25 at 14:42 -0400, Dave Anderson
wrote:</tt>
<br><tt>> Badari Pulavarty wrote:</tt><tt></tt>
<p><tt>> As far as the determination of the panic task, I'm presuming</tt>
<br><tt>> that this was generated from a kdump dumpfile.  The netdump.c</tt>
<br><tt>> get_netdump_panic_task() function, which has a bunch of</tt>
<br><tt>> kdump-specific code, is failing to find the panic task from the</tt>
<br><tt>> data in the ELF header notes.  Running "crash -d1 ..." will
indicate</tt>
<br><tt>> how crash is trying to determine the panic task.  I don't
know</tt>
<br><tt>> whether the idle task was even the one that took the sysrq,</tt>
<br><tt>> or whether it just defaulted to that task because it couldn't
find</tt>
<br><tt>> any other likely suspects.  You'll have to debug it from
your</tt>
<br><tt>> end, starting from get_netdump_panic_task().</tt>
<br><tt>></tt><tt></tt>
<p><tt>I did little more digging around :)</tt><tt></tt>
<p><tt>crash -d1 shows me</tt><tt></tt>
<p><tt>crash: get_netdump_panic_task: crashing_cpu: 1</tt>
<br><tt>crash: get_netdump_panic_task: failed</tt>
<br><tt>crash: get_active_set_panic_task: failed</tt><tt></tt>
<p><tt>Looking at get_netdump_panic_task(), there is no code to handle</tt>
<br><tt>EM_X86_64 ? I see checks for</tt><tt></tt>
<p><tt>               
if (nd->elf64->e_machine == EM_386) {</tt>
<br><tt>               
..</tt>
<br><tt>               
}</tt>
<br><tt>               
if (nd->elf64->e_machine == EM_PPC64) {</tt>
<br><tt>               
...</tt>
<br><tt>               
}</tt>
<br><tt></tt> 
<br><tt></tt> </blockquote>
<tt>Hey -- you're right -- there's nothing EM_X86_64-specific</tt>
<br><tt>done in that function.  I don't see why something couldn't</tt>
<br><tt>be put in place, but it's been unnecessary since the panic</tt>
<br><tt>task would normally be found by one of the follow-up functions,</tt>
<br><tt>i.e., in either get_active_set_panic_task(), or if that fails,</tt>
<br><tt>the lowest common denominator function, in panic_search().</tt>
<br><tt>Now, since after the "crash: get_active_set_panic_task: failed"</tt>
<br><tt>message, there are no more error messages, so panic_search()</tt>
<br><tt>must have determined that the idle thread (swapper) on cpu 0 was</tt>
<br><tt>in fact the running task that took the sysrq.  But the stack</tt>
<br><tt>trace shows just a single "schedule()" line...</tt><tt></tt>
<p><tt>So, can you do the following, while staying in that same context:</tt><tt></tt>
<p><tt>crash> bt -T</tt><tt></tt>
<p><tt>...and see if the ".crash_kexec" return address shows up</tt>
<br><tt>anywhere in the process stack?  Since that task was selected</tt>
<br><tt>as the panic task, it should be there somewhere.  And if</tt>
<br><tt>it's there, it should be used as the starting point of the</tt>
<br><tt>back trace.  Then do this:</tt><tt></tt>
<p><tt>crash> set debug 1</tt>
<br><tt>crash> bt</tt>
<br><tt>...</tt><tt></tt>
<p><tt>What should be displayed for the panic task, prior to the back</tt>
<br><tt>trace data, is this message from get_netdump_regs_x86_64():</tt><tt></tt>
<p><tt>        if (CRASHDEBUG(1)) {</tt>
<br><tt>               
rsp = ULONG(user_regs + OFFSET(user_regs_struct_rsp));</tt>
<br><tt>               
rip = ULONG(user_regs + OFFSET(user_regs_struct_rip));</tt>
<br><tt>               
netdump_print("ELF prstatus rsp: %lx rip: %lx\n",</tt>
<br><tt>                       
rsp, rip);</tt>
<br><tt>        }</tt><tt></tt>
<p><tt>Do you see that message?</tt><tt></tt>
<p><tt>Dave</tt>
<br><tt></tt> 
<br> </html>