From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Description of problem:
klogd retrieves kernel printk messages and sends them to syslogd after
a little massaging. One of the massaging steps will turn an odd number
of percent signs into an even number of percents signs using a
For example, if the kernel performs printk(KERN_INFO "%s\n", "%");,
the dmesg output buffer will properly show only a single % sign, while
the syslog log files will have %%.
Unfortunately, printking %% will also put %% into the syslog files.
Thus, the transormation in klogd is non-reversible -- it is no longer
clear how many percent signs there were in the kernel's output.
I recommend that klogd be modified to no longer massage the kernel
messages in non-reversible mechanisms. I expect a single % should work
fine so long as klogd doesn't do something fantastically stupid like
pass the kernel output to syslog() as the message format string.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Download and untar http://www.kernelnewbies.org/faq/sillymod.tar.gz
(very small "hello world" kernel module)
2. Apply the patch I will attach shortly (very simple, amends the
printk to include a single %)
3. run the ./configure and make steps
4. insmod ./sillymod.ko
5. Check dmesg output versus /var/log/messages output
Actual Results: dmesg will report:
Sillymod % loaded into 2.6.8-1.528.2.10.
Dec 1 13:53:32 dhcp-246 kernel: Sillymod %% loaded into 2.6.8-1.528.2.10.
Created attachment 107743 [details]
patch to sillymod that will change the printk to include a single percent sign
Sillymod is pretty simple to work with: download, unpack, cd sillymod ; patch
-p1 < /path/to/percent-problem.diff ; ./configure ; make ; sudo insmod
./sillymod.ko ; dmesg | tail ; sudo tail /var/log/messages
There's nothing magic about sillymod; it was just a convenient example of a
hello world kernel module.
This is now fixed - it was a hangover from the days when
syslogd WAS "fantastically stupid" and was passing the
message string as a *printf function fmt string.
The new syslogd-1.4.1-24_EL that fixes this issue for RHEL-4
will be in RHEL-4-RC1 and meanwhile can be downloaded from:
Seth, does this new sysklogd fix things up for you?
Jason, Jay, yes, this fixes the problem! Many thanks.
(I'm sorry I let this slip through the cracks -- I thought I couldn't find the
packages at Jason's URL earlier on, so I assumed it had been taken down when the
packages had been made available in the rhel 4 repos.. Much more likely is that
I typo'd the URL when browsing from another machine. D'oh.)
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.