Had a rather unpleasant bug for about a week and could not figure out what the exact issue was. Problem: when booting KDE, the KSplash screen would load and when the KDE gears appeared, the whole system would lock up. As in freeze, not able to switch to different terminal, nothing.
Now, I figured that this had probably something to do with a kernel panic thrown by SELinux (as I had experienced before with a specific wifi driver). The problem was that I had no idea how to determine what exactly was causing this kernel panic.
After some first attempts at fixing SELinux settings, switching SELinux on and off, rerunning rlpkg -a -r, and obviously furiously checking /var/log, I was out of ideas and started searching the web for anyone with a similar problem.
There I found many suggestions, such as checking ~/.xsession-errors (how did I miss that?). Turns out this file was cut off rather abruptly, without (at least so it seemed to me) a clear reason and clearly different from any other .xsession-errors files I had available. Hence reinforcing my idea that some SELinux kernel panic was the reason for my troubles.
When searching through Gentoo Bugzilla, I stumbled upon bug #274887, concerning a kernel panic occurring when using sys-kernel/hardened-sources-2.6.28-r9 and SELinux. A simple workaround was to use selinux_compat_net=0 when booting the kernel. Turns out that this finally fixed it for me. Yay! Now to decide: wait for the devs to apply the kernel patch or manually upgrade to a newer (non-stable) kernel?
Tags: crash, Gentoo Linux, hardened-sources, KDE, kernel panic, KSplash, SELinux

