Ken'ichi Ohmichi wrote: > Hi, > > I found the problem that the subcommand "bt" cannot display the stack > of "bash" process on i386 xen-dom0 like the following: > > crash> bt > PID: 3954 TASK: e502aaa0 CPU: 0 COMMAND: "bash" > crash> > > > This problem happens if running "bt" for "swapper" process too: > > crash> bt > PID: 0 TASK: c7ca5550 CPU: 1 COMMAND: "swapper" > crash> > > > The cause is that bt->stackbase is overwritten in get_netdump_regs_x86() > even if the symbol "crash_kexec" is found. This patch fixes the overwritten > problem, and the result is the following: The patch looks good. My dom0/i386 test kernel/dumpfiles all backtrace OK because they are either early xen kernels that don't have IRQ stacks, or later ones that by dumb luck don't have the hardirq_ctx or softirq_ctx tasks set to the task being backtraced. Thanks for catching this -- queued for the next release. Dave > > crash> bt > PID: 3954 TASK: e502aaa0 CPU: 0 COMMAND: "bash" > #0 [eb30ef34] crash_kexec at c043852a > #1 [eb30ef78] write_sysrq_trigger at c0498b75 > #2 [eb30ef84] vfs_write at c0467a6d > #3 [eb30ef9c] sys_write at c046805c > #4 [eb30efb8] system_call at c0405348 > EAX: ffffffda EBX: 00000001 ECX: b7c5d000 EDX: 00000002 > DS: 007b ESI: 00000002 ES: 007b EDI: b7c5d000 > SS: 007b ESP: bfdb5eb8 EBP: bfdb5ed8 > CS: 0073 EIP: 00295402 ERR: 00000004 EFLAGS: 00000246 > crash> > > crash> bt > PID: 0 TASK: c7ca5550 CPU: 1 COMMAND: "swapper" > #0 [c10fdfac] xen_idle at c040321a > #1 [c10fdfac] cpu_idle at c0403334 > crash> > > > Thanks > Ken'ichi Ohmichi > > Signed-off-by: Ken'ichi Ohmichi <oomichi@xxxxxxxxxxxxxxxxx> > --- > diff -rpuN crash-4.0-4.13.org/netdump.c crash-4.0-4.13/netdump.c > --- crash-4.0-4.13.org/netdump.c 2008-01-15 19:24:09.000000000 +0900 > +++ crash-4.0-4.13/netdump.c 2008-01-15 19:31:52.000000000 +0900 > @@ -2039,6 +2039,12 @@ next_sysrq: > return; > } > > + if (halt_eip && halt_esp) { > + *eip = halt_eip; > + *esp = halt_esp; > + return; > + } > + > if (panic) > return; > > @@ -2064,12 +2070,6 @@ next_sysrq: > goto retry; > } > > - if (halt_eip && halt_esp) { > - *eip = halt_eip; > - *esp = halt_esp; > - return; > - } > - > if (CRASHDEBUG(1)) > error(INFO, > "get_netdump_regs_x86: cannot find anything useful (task: %lx)\n", bt->task); > _ > > > -- > Crash-utility mailing list > Crash-utility@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/crash-utility -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility