Skip to contentSkip to conversation

Kexec not working as expected from inside X

DISCUSSION Mayank Kaushik 1 participant 1 message Nov 30, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi everyone,

I'm running Fedora 8, kernel 2.6.24.3-50.fc8. I was experiencing frequent kernel hangs, so to get to the bottom of it I setup kexec/ kdump with this kernel. I did it according to the documentation in <kernel_src>/Documentation/
kdump/kdump.txt. I'm running Xorg with the
closed-source binary nvidia driver. I did the following:

1) Ensured that my running kernel supported kexec (as given in the documentation above), obtained the vmlinux for it from the fedora debug yum repos.
2) Built a new crash-dump kernel (linux-2.6.23.17-kdump).
3) Appended the following lines to my /etc/rc.sysinit:

921 echo "1" > /proc/sys/kernel/sysrq
922 savetextmode
923 # Tell kexec which kernel and ramdisk to use
924 kexec -p /usr/src/kernels/linux-2.6.23.17/vmlinux --initrd=/boot/ initrd-2.6.23.17-kdump.img --args-linux --append="root=LABEL=/ 1 irqpoll maxcpus=1"
925
926 DATE=date +%Y-%m-%d-%T
927 NAME=uname -r
928 if [ "$NAME" == "2.6.23.17-kdump" ]; then

929   echo -e "Creating crash dump..\n"
930   mkdir -p /var/crash/127.0.0.1-$DATE
931   cp /proc/vmcore /var/crash/127.0.0.1-$DATE/vmcore-incomplete
932   if [ $? == 0 ]
933   then

934 mv /var/crash/127.0.0.1-$DATE/vmcore-incomplete /var/crash/
127.0.0.1-$DATE/vmcore
935 echo -e "Done, rebooting..\n"
936 reboot -f
937 fi
938 fi

The above is supposed to dump the vmcore to my /var/crash/ directory as soon as the kdump kernel boots after a hang. The motivation for doing this was that I get kernel hangs while running X, and pressing <Alt>+<Sysrq> causes the screen to get garbled when the kdump kernel boots, so I don't have a chance of doing this manually.

I've tested the above while in runlevel 3 while I'm inside a VT, everything works as expected (I see the kdump kernel boot up and copy the kdump), and I can see the vmcore end up inside /var/crash/. But when I try the same while X is running, the screen gets garbled while the kdump kernel boots, but nothing happens! The kernel does not reboot, and neither does it copy the vmcore to /var/crash. It is responsive though, I can toggle the CapsLock key, but the screen is blank.

Is it something in the nvidia driver that's causing this to not work? Any clues on what's going wrong, or how I can debug this further?

(Please CC me in the reply, I'm not on this list)

Thanks!
-Mayank

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec