klogd misses Oops in /proc/kmsg in 2.6.27

From: Chris Rigg <cdrigg_at_comcast.net>
Date: Tue, 29 Sep 2009 15:31:28 -0600

Hello,

Hopefully I've found the right group to ask my question. I apologize in
advance if this is not the appropriate mailing list...

I have a Linux OS that I built using Linux-From-Scratch and it contains
the sysklogd-1.5 package along with the Linux 2.6.27 kernel. I am seeing
a peculiar problem with Oops messages and I'm wondering if it is a
known-problem (and hopefully has a workaround?).

Problem:
I have a kernel thread that crashes. This generates an "Oops" message to
printk's circular buffer (and to /proc/kmsg) that is serviced by klogd
(as you know). For some reason, I only see my Oops message printed out
on the console and not in /var/log/messages. I have "panic_on_oops" set
to '0' so it's not like klogd didn't have time to read /proc/kmsg and
log it to /var/log/messages. In fact, with panic_on_oops set, my system
continues to run just fine except that klogd doesn't seem to ever notice
input to /proc/kmsg ever again. I did an 'strace' on it and it appears
to be blocking on the read() call of /proc/kmsg but it never returns.

I also tried writing my own little version of klogd that simply opens
/proc/kmsg and then reads it in a while loop. And this little program,
too, didn't unblock when the Oops message went to /proc/kmsg. (Which
makes me suspect a scheduling problem in the kernel?)

And just to underscore the weirdness, after the Oops message, while
klogd is still blocking on the read. I can run "dmesg" and see the Oops.
And I can run "cat /proc/kmsg" and see it there too!

I tried the '-s' option to klogd and that didn't seem to change the
behavior.

Is this a known problem with 2.6.27?

Thanks,
Chris
Received on Tue Sep 29 2009 - 23:31:28 CEST

This archive was generated by hypermail 2.2.0 : Tue Sep 29 2009 - 23:29:23 CEST