There's your null ptr deference :), I had assumed that it
simply calls panic. From this point the panic notifier chain
should be activated and the kexec'd kernel goes to work.
If we're not getting out of the panic handler, that's
a separate issue.
NORET_TYPE void panic(const char * fmt, ...)
{
static char buf[1024];
va_list args;
long i, i_next = 0;
int state = 0;
/*
* It's possible to come here directly from a panic-assertion and
* not have preempt disabled. Some functions called from here want
* preempt to be disabled. No point enabling it later though...
*/
preempt_disable();
/*
* If we have crashed and we have a crash kernel loaded let it handle
* everything else.
* Do we want to call this before we try to display a message?
*/
crash_kexec(NULL);
kmsg_dump(KMSG_DUMP_PANIC);
We can screw up in multiple ways now, the kexec kernel
could have been loaded incorrectly. We could have a
good kexec kernel, but the attempts to prepare the HW
to boot the new kernel fail silently or hang.
There's a debug mode for kexec that might be worth enabling,
the switch is '-d'. However, since it seems you can
actually boot the kernel, and get to the initramfs
environment, it seems to me that there's something
wrong with the tools, supporting scripts, or you're
simply out of space.
Concerning:
https:/ /bugs.launchpad .net/ubuntu/ +source/ linux-meta/ +bug/710733/ +attachment/ 1826111/ +files/ LucidCrashdumpC onsole. jpg
Helps if I actually look at the code:
http:// lxr.linux. no/linux+ v2.6.37. 2/drivers/ tty/sysrq. c#L128
128static void sysrq_handle_ crash(int key)
129{
130 char *killer = NULL;
131
132 panic_on_oops = 1; /* force panic */
133 wmb();
134 *killer = 1;
135}
There's your null ptr deference :), I had assumed that it
simply calls panic. From this point the panic notifier chain
should be activated and the kexec'd kernel goes to work.
If we're not getting out of the panic handler, that's
a separate issue.
http:// lxr.linux. no/linux+ v2.6.37. 2/kernel/ panic.c# L59
NORET_TYPE void panic(const char * fmt, ...)
{
static char buf[1024];
va_list args;
long i, i_next = 0;
int state = 0;
/*
* It's possible to come here directly from a panic-assertion and
* not have preempt disabled. Some functions called from here want
* preempt to be disabled. No point enabling it later though...
*/
preempt_disable();
console_verbose(); DEBUG_BUGVERBOS E
bust_spinlocks(1);
va_start(args, fmt);
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
#ifdef CONFIG_
dump_stack();
#endif
/*
* If we have crashed and we have a crash kernel loaded let it handle
* everything else.
* Do we want to call this before we try to display a message?
*/
crash_kexec(NULL);
kmsg_dump( KMSG_DUMP_ PANIC);
We can screw up in multiple ways now, the kexec kernel
could have been loaded incorrectly. We could have a
good kexec kernel, but the attempts to prepare the HW
to boot the new kernel fail silently or hang.
There's a debug mode for kexec that might be worth enabling,
the switch is '-d'. However, since it seems you can
actually boot the kernel, and get to the initramfs
environment, it seems to me that there's something
wrong with the tools, supporting scripts, or you're
simply out of space.
BTW, what sort of HW is this?