[Bug 671525] New: klogd / systemd-kmsg-sy: kernel messages all over the place (not stopping ever, cpu load)
https://bugzilla.novell.com/show_bug.cgi?id=671525 https://bugzilla.novell.com/show_bug.cgi?id=671525#c0 Summary: klogd / systemd-kmsg-sy: kernel messages all over the place (not stopping ever, cpu load) Classification: openSUSE Product: openSUSE 11.4 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Kernel AssignedTo: kernel-maintainers@forge.provo.novell.com ReportedBy: abittner@stud.fh-heilbronn.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0b11) Gecko/20110203 Firefox/4.0b11 i was already on 11.4 rc1 from like two days ago, today i did a zypper ref and zypper dup again (i had this syslog-ng bug, it didnt come up due to some missing characters in the syslog conf files or something). anyways, i checkd if i was getting anything new in /var/log/messages, and thats when i found these zillion kernel messagings getting dumped there.... --------------- rnel[2925]: [ 213.562255] kernel[2925]: [ 213.524767] kernel[2925]: [ 213.501687] kernel[2925]: [ 213.475166] kernel[2925]: [ 213.456092] kernel[2925]: [ 213.433368] kernel[2925]: [ 213.403563] kernel[2925]: [ 213.366622] kernel[2925]: [ 213.327072] kernel[2925]: [ 213.293427] kernel[2925]: [ 213.255928] kernel[2925]: [ 213.232875] kernel[2925]: [ 213.204521] kernel[2925]: [ 213.183374] kernel[2925]: [ 213.165161] kernel[2925]: [ 213.145492] kernel[2925]: [ 213.119132] kernel[2925]: [ 213.100595] kernel[2925]: [ 213.080360] kernel[2925]: [ 213.053905] kernel[2925]: [ 213.011398] kernel[2925]: [ 212.982092] kernel[2925]: [ 212.962341] kernel[2925]: [ 212.936817] kernel[2925]: [ 212.902003] kernel[2925]: [ 212.869311] kernel[2925]: [ 212.813554] kernel[2925]: [ 212.770844] kernel[2925]: [ 212.722579] kernel[2925]: [ 212.686238] kernel[2925]: [ 212.624 Feb 12 13:03:32 localhost kernel: [ 213.846679] kernel[2925]: [ 213.781598] kernel[2925]: [ 213.716124] kernel[2925]: 967] kernel[2925]: [ 212.508 213.402436] kernel[2925]: [ 213.365151] kernel[2925]: [ 213.325580] kernel[2925]: 210.061 Feb 12 13:03:32 localhost kernel: [ 213.863858] kernel[2925]: [ 213.804748] kernel[2925]: [ 213.744000] kernel[2925]: [ 213.691870] kernel[2925]: [ 213.656984] kernel[2925]: [ 213.602834] kernel[2925]: [ 213.559666] kernel[2925]: [ 213.524079] kernel[2925]: [ 213.500835] kernel[2925]: [ 213.474435] kernel[2925]: [ 213.455546] kernel[2925]: [ 213.432805] kernel[2925]: [ 213.402454] kernel[2925]: [ 213.365168] kernel[2925]: [ 213.325596] kernel[2925]: [ 213.290033] kernel[2925]: [ 213.255754] kernel[2925]: [ 213.232470] kernel[2925]: [ 213.204438] kernel[2925]: [ 213.182592] kernel[2925]: [ 213.164635] kernel[2925]: [ 213.145009] kernel[2925]: [ 213.118661] kernel[2925]: [ 213.100166] kernel[2925]: [ 213.079950] kernel[2925]: [ 213.052888] kernel[2925]: [ 213.003911] kernel[2925]: [ 212.981746] kernel[2925]: [ 212.962005] kernel[2925]: [ 212.936143] kernel[2925]: [ 212.901306] kernel[2925]: [ 212.868385] kernel[2925]: [ 212.810053] kernel[2925]: [ 212.770615] kernel[2925]: [ 212.722 Feb 12 13:03:32 localhost kernel: 362] kernel[2925]: [ 212.685 Feb 12 13:03:32 localhost kernel: [ 213.863875] kernel[2925]: 659] kernel[2925]: [ 212.623 Feb 12 13:03:32 localhost kernel: [ 213.863882] kernel[2925]: [ 213.804811] kernel[2925]: 832] kernel[2925]: [ 212.594 Feb 12 13:03:32 localhost kernel: [ 213.863889] kernel[2925]: [ 213.804860] kernel[2925]: [ 213.744118] kernel[2925]: 927] kernel[2925]: [ 212.550 Feb 12 13:03:32 localhost kernel: [ 213.863898] kernel[2925]: [ 213.804912] kernel[2925]: [ 213.744989] kernel[2925]: [ 213.691894] kernel[2925]: [ 213.657007] kernel[2925]: 646] kernel[2925]: [ 212.469 Feb 12 13:03:32 localhost kernel: [ 213.863908] kernel[2925]: [ 213.804964] kernel[2925]: [ 213.745001] kernel[2925]: [ 213.692107] kernel[2925]: [ 213.657013] kernel[2925]: [ 213.602856] kernel[2925]: 401] kernel[2925]: [ 212.449 Feb 12 13:03:32 localhost kernel: [ 213.863917] kernel[2925]: [ 213.805025] kernel[2925]: [ 213.745010] kernel[2925]: [ 213.692116] kernel[2925]: [ 213.657020] kernel[2925]: [ 213.602863] kernel[2925]: [ 213.559687] kernel[2925]: 255] kernel[2925]: [ 212.422 Feb 12 13:03:32 localhost kernel: [ 213.863928] kernel[2925]: [ 213.805082] kernel[2925]: [ 213.745019] kernel[2925]: [ 213.692124] kernel[2925]: [ 213.657027] kernel[2925]: [ 213.602870] kernel[2925]: [ 213.559692] kernel[2925]: [ 213.524100] kernel[2925]: 569] kernel[2925]: [ 212.380 Feb 12 13:03:32 localhost kernel: [ 213.875841] kernel[2925]: [ 213.845347] kernel[2925]: [ 213.779797] kernel[2925]: [ 213.715411] kernel[2925]: [ 213.674438] kernel[2925]: [ 213.633294] kernel[2925]: [ 213.585792] kernel[2925]: [ 213.533477] kernel[2925]: [ 213.506667] kernel[2925]: [ 213.486247] kernel[2925]: 339] kernel[2925]: [ 212.305 Feb 12 13:03:32 localhost kernel: [ 213.876145] kernel[2925]: [ 213.846008] kernel[2925]: [ 213.780456] kernel[2925]: 949] kernel[2925]: [ 212.561 Feb 12 13:03:32 localhost kernel: [ 213.877363] kernel[2925]: [ 213.846661] kernel[2925]: [ 213.781352] kernel[2925]: [ 213.716000] kernel[2925]: [ 213.675568] kernel[2925]: [ 213.634212] kernel[2925]: [ 213.586274] kernel[2925]: [ 213.533795] kernel[2925]: [ 213.507006] kernel[2925]: [ 213.486487] kernel[2925]: [ 213.460824] kernel[2925]: [ 213.441101] kernel[2925]: [ 213.410958] kernel[2925]: [ 213.375975] kernel[2925]: [ 213.334901] kernel[2925]: 440] kernel[2925]: 241] kerne ..... ---------------- never stopping, and top shows llike 100% (on one core) load, in some processes related to the klogd or something.... --------- Tasks: 121 total, 2 running, 119 sleeping, 0 stopped, 0 zombie Cpu(s): 17.8%us, 36.9%sy, 0.0%ni, 18.5%id, 25.7%wa, 0.0%hi, 1.2%si, 0.0%st Mem: 1025540k total, 895012k used, 130528k free, 146692k buffers Swap: 1550236k total, 0k used, 1550236k free, 467712k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2925 root 20 0 2164 656 352 R 79 0.1 5:19.95 klogd 350 root 20 0 2208 564 464 S 62 0.1 3:46.00 systemd-kmsg-sy 662 root 20 0 101m 62m 4928 S 4 6.3 0:26.21 Xorg 3697 root 20 0 212m 24m 16m S 2 2.4 0:06.97 knotify4 270 root 20 0 0 0 0 D 2 0.0 1:00.89 kjournald 3671 root 20 0 144m 30m 23m S 2 3.0 0:07.19 kwin 3740 root 20 0 131m 21m 15m S 1 2.2 0:03.55 konsole 195 root 20 0 0 0 0 S 1 0.0 0:07.62 kworker/0:2 2899 root 20 0 7988 3964 2220 D 1 0.4 0:49.27 syslog-ng 1033 root 20 0 4140 1052 896 S 0 0.1 0:00.14 hald-addon-inpu 1 root 20 0 4904 3208 1776 S 0 0.3 0:01.46 systemd 2 root 20 0 0 0 0 S 0 0.0 0:00.02 kthreadd 3 root 20 0 0 0 0 S 0 0.0 0:00.24 ksoftirqd/0 6 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0 7 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/1 9 root 20 0 0 0 0 S 0 0.0 0:00.04 ksoftirqd/1 10 root 20 0 0 0 0 S 0 0.0 0:00.22 kworker/0:1 11 root 0 -20 0 0 0 S 0 0.0 0:00.00 cpuset 12 root 0 -20 0 0 0 S 0 0.0 0:00.00 khelper 13 root 0 -20 0 0 0 S 0 0.0 0:00.00 netns 14 root 20 0 0 0 0 S 0 0.0 0:00.00 sync_supers 15 root 20 0 0 0 0 S 0 0.0 0:00.00 bdi-default 16 root 0 -20 0 0 0 S 0 0.0 0:00.00 kintegrityd 17 root 0 -20 0 0 0 S 0 0.0 0:00.00 kblockd 18 root 0 -20 0 0 0 S 0 0.0 0:00.00 kacpid 19 root 0 -20 0 0 0 S 0 0.0 0:00.00 kacpi_notify 20 root 0 -20 0 0 0 S 0 0.0 0:00.00 kacpi_hotplug 21 root 20 0 0 0 0 S 0 0.0 0:00.00 kseriod 22 root 0 -20 0 0 0 S 0 0.0 0:00.00 md 23 root 0 -20 0 0 0 S 0 0.0 0:00.00 kondemand 24 root 20 0 0 0 0 S 0 0.0 0:00.00 khungtaskd 25 root 20 0 0 0 0 S 0 0.0 0:00.63 kworker/1:1 26 root 20 0 0 0 0 S 0 0.0 0:00.04 kswapd0 27 root 25 5 0 0 0 S 0 0.0 0:00.00 ksmd 28 root 20 0 0 0 0 S 0 0.0 0:00.01 fsnotify_mark -------------- or even higher load.... var/log/messages is constantly being written and growing.... help! ;) (just a test system, no worries.....) localhost:~ # uname -a Linux localhost 2.6.37-22-default #1 SMP 2011-02-09 14:44:19 +0100 i686 athlon i386 GNU/Linux running on virtualbox 4.0.2 on a windows xp machine. localhost:~ # rpm -aq | grep -i kern kernel-default-2.6.37-22.1.i586 localhost:~ # rpm -aq | grep -i virtu virtuoso-drivers-6.1.2-3.1.i586 soprano-backend-virtuoso-2.5.63-4.2.i586 virtualbox-guest-x11-4.0.2-6.1.i586 virtualbox-guest-tools-4.0.2-6.1.i586 virtuoso-server-6.1.2-3.1.i586 virtualbox-guest-kmp-default-4.0.2_k2.6.37.0_20-6.1.i586 -------------- thanks. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c1
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c3
--- Comment #3 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c4
--- Comment #4 from andreas bittner
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c5
--- Comment #5 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c6
--- Comment #6 from andreas bittner
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c7
Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c8
andreas bittner
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c9
Rainer Hurtado Navarro
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c10
Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c11
Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c12
Jiri Slaby
*** Bug 681069 has been marked as a duplicate of this bug. ***
Answering the question from there:
Please test the 11.4 systemd version from Base:System.
The bug is still there. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c13
Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c14
Jiri Slaby
What syslog are you using?
syslog-ng-3.2.2-5.1.x86_64 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c15
--- Comment #15 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c16
--- Comment #16 from Jiri Slaby
mind trying rsyslog? that's what we recommend to use for systemd, and work with the rsyslog guy together upstream on the proper integration.
I've just played with that a bit. And syslog itself doesn't matter. It's klog which makes problem. So when I run klogd it does: stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2246, ...}) = 0 write(1, "<4>Mar 19 19:59:02 kernel: [ 151"..., 1024) = 1024 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2246, ...}) = 0 write(1, "<6>Mar 19 19:59:02 kernel: 682] "..., 57) = 57 # ll /proc/1926/fd/1 lrwx------ 1 root root 64 19. bře 19.55 /proc/1926/fd/1 -> socket:[242641] /lib/systemd/systemd-kmsg-syslogd then does: recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"<4>Mar 19 19:59:40 kernel: [ 155"..., 2048}], msg_controllen=32, {cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS{pid=1926, uid=0, gid=0}}, msg_flags=0}, MSG_DONTWAIT) = 1024 writev(6, [{"<4>", 3}, {"kernel", 6}, {"[1926]: ", 8}, {"[ 1550.984327] kernel[1926]: [ 1"..., 996}, {"\n", 1}], 5) = 1014 in loop. # ll /proc/312/fd/[36] lrwx------ 1 root root 64 19. bře 19.52 /proc/312/fd/3 -> socket:[3412] l-wx------ 1 root root 64 19. bře 19.52 /proc/312/fd/6 -> /dev/kmsg where socket 3412 is: lrwx------ 1 root root 64 19. bře 20.01 /proc/1/fd/26 -> socket:[3412] Socket 242641 (from klogd above): socket(PF_FILE, SOCK_DGRAM, 0) = 4 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 connect(4, {sa_family=AF_FILE, path="/dev/log"}, 10) = 0 Should I try rsyslog still? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c17
--- Comment #17 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c18
--- Comment #18 from Jiri Slaby
Yeah, please. Klogd is something from the past and today natively integrated in modern syslogs.
Ok, done. As rsyslog doesn't run klogd, I don't see the problem anymore. Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c19
Bruno Friedmann
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c20
Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c21
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c22
Kay Sievers
Kay: We have 3 syslog daemons and one klogd feeding all three.
klogd seems not to run when rsyslog is used, at least not with the same problem. syslog-ng seems to cause the loop, syslog I don't know.
Why systemd does not support other syslog implementations? I do not see any technical reason for this.
Systemd has it's own /dev/log early-syslog-bridge implementation. Any userspace program can just use glibc's syslog() during very early bootup and will write to the kernel log buffer. As soon as the real syslog starts, it takes over the open /dev/log fd from systemd for new messages and reads the kernel log buffer. Klogd feeds the kernels log buffer to /dev/log I guess, and creates a loop that way, reading it's own messages again. There is nothing really in systemd that is non-supporting, but without knowing the details, the thing klogs does doesn't seem to fit into that.
Beside this there is already the possiblity not to use the klogd as rsyslogd is also able to use its own klog module.
That seems to be the case. And systemd systems recommend the use of rsyslog because it is properly integrated from rsyslog upstream. When people switch from syslog-ng to rsyslog, all seems to work, without knowing what really makes the difference between the both, the daemon itself, the configuration, or the init script logic. The long-term plan is to get rid of the init script and have native service files shipped with the upstream syslog tarball, instead of the current magic. Klogd is not in that picture. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c23
Dr. Werner Fink
Systemd has it's own /dev/log early-syslog-bridge implementation. Any userspace program can just use glibc's syslog() during very early bootup and will write to the kernel log buffer. As soon as the real syslog starts, it takes over the open /dev/log fd from systemd for new messages and reads the kernel log buffer.
In other words: systemd encroachs on the kernel message ring buffer by redirecting the user space messages from /dev/log to /dev/kmsg? Why does systemd not use its _own_ ring buffer? Beside this the klogd is started _after_ syslog-ng or syslogd using openlog() and syslog(). At this point /dev/log should belong to syslog-ng or syslogd, shouldn't it? The klogd executed in once mode does not use openlog() nor syslog() and is used in /etc/init.d/boot.klog to write out /var/log/boot.msg -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c24
Kay Sievers
(In reply to comment #22)
In other words: systemd encroachs on the kernel message ring buffer by redirecting the user space messages from /dev/log to /dev/kmsg? Why does systemd not use its _own_ ring buffer?
Because early boot is mostly hardware system/subsystem init, and messages from early boot tools _should_ mix with the kernel messages during that time to be reliably sorted and kernel time-stamped. Today there are lots of kernel components managed from userspace, and they should share the same log buffer during early bootup. Also on embedded-like systems the kernel ring-buffer connected to /dev/log is all what you ever want for "syslog".
Beside this the klogd is started _after_ syslog-ng or syslogd using openlog() and syslog(). At this point /dev/log should belong to syslog-ng or syslogd, shouldn't it?
Yeah, it sounds like it. Not sure what's the problem with syslog-ng here. The systemd bridge maybe needs to be stopped when syslog runs. But as said, I don't know the details, only that rsyslog seems to work fine.
The klogd executed in once mode does not use openlog() nor syslog() and is used in /etc/init.d/boot.klog to write out /var/log/boot.msg
Maybe it's syslog-ng itself that calls klogd somehow? It might be, that this problem can not be solved properly for syslog-ng without using native service files and socket activation. Proper socket passing needs native service files and does not work with compat sysv services. Syslog is special regarding compat handling, because systemd itself dependends on a specific behavior. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c25
--- Comment #25 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c26
--- Comment #26 from Kay Sievers
The question is: how can be determined to which process the socket belongs to ... systemd or one of the system loggers.
I don't think any tool should try to be smart here about the systemd bridge. The socket will always be owned by systemd and only possibly inherited from started services, which might be none, one, or several. A syslog without socket activation will probably just delete /dev/log and create its own. But we can't really support that longer-term. I thought you might know just what's the difference in the syslogs and the klogd message loop. It might not be worth investigating how the current syslog init magic and syslog-ng fails, and we better just go directly for native systemd service files, and make them working in a way systemd expects them to work. If there is no simple fix for the current syslog logic, feel free to assign it back to me, I'll probably not work on it anytime soon, but I can keep track of it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c27
--- Comment #27 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c28
--- Comment #28 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c29
--- Comment #29 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c30
--- Comment #30 from Kay Sievers
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c31
--- Comment #31 from Marius Tomaschewski
(In reply to comment #21)
Kay: We have 3 syslog daemons and one klogd feeding all three.
klogd seems not to run when rsyslog is used, at least not with the same problem.
rsyslog provides a klogd as module -- /etc/rsyslog.conf: $ModLoad imklog.so # kernel logging (may be also provided by /sbin/klogd), # see also http://www.rsyslog.com/doc-imklog.html. $klogConsoleLogLevel 1 # set log level 1 (same as in /etc/sysconfig/syslog). In syslogd case, the external /sbin/klogd is started. syslog-ng is also able /proc/kmsg itself, but traditionally we start /sbin/klogd here as well. (In reply to comment #30)
We need socket activation for proper race-free fd hand-over, which can only be done with native service files.
All syslog daemons are currently using socket activation -- just without syslog.service file.
Here is rsyslog's upstream systemd service file which kills the bridge: http://git.adiscon.com/?p=rsyslog.git;a=blob;f=rsyslog.service.in;hb=HEAD
OK, this means we just need to provide a syslog.service file killing the bridge -- something like this: [Unit] Description=System Logging Service [Service] Type=forking ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service ExecStopPost=/bin/systemctl start systemd-kmsg-syslogd.service ExecStart=/etc/init.d/syslog start ExecReload=/etc/init.d/syslog reload ExecStop=/etc/init.d/syslog stop Sockets=syslog.socket [Install] WantedBy=multi-user.target Do we need some another dependencies, ...? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c32
--- Comment #32 from Marius Tomaschewski
It might not be worth investigating how the current syslog init magic and syslog-ng fails, and we better just go directly for native systemd service files, and make them working in a way systemd expects them to work.
We have to investigate. It is IMO not an option to drop syslog-ng/syslogd. The socket activation in all 3 syslog daemons on 11.4 is basically same. I didn't tested it until now and also not with syslogd yet, but it seems that the external klogd makes the difference. In case of rsyslog (via syslog.service alias init script), systemd seems to detect it and stops systemd-kmsg-syslogd.service (it is stopped on my fresh 11.4 installation here without any changes). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c33
--- Comment #33 from Kay Sievers
All syslog daemons are currently using socket activation -- just without syslog.service file.
That was a bug in an earlier systemd version. Socket activation is only available for natively started services, not for sysv compat services.
[Service] ExecStopPost=/bin/systemctl start systemd-kmsg-syslogd.service
It never needs to be started, systemd takes care of it, if syslog goes away and no syslog service startup transaction is pending.
ExecStart=/etc/init.d/syslog start
Never use any sysv init scripts in systemd service files. It will just deadlock. Thei stuff is really not meant to be used that way. We should stick to the upstream way of integrating this.
Do we need some another dependencies, ...?
We need native service files for all syslog implementations with the real name of the package, and leave the multiplexed sysv "syslog" script behind us. Enabling or disabling will be managed by systemd symlinks not by sysconfig magic. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c34
--- Comment #34 from Kay Sievers
We have to investigate. It is IMO not an option to drop syslog-ng/syslogd. The socket activation in all 3 syslog daemons on 11.4 is basically same.
They all need to get native service files. There is no way around it in the long run.
I didn't tested it until now and also not with syslogd yet, but it seems that the external klogd makes the difference.
Yeah, *looks* like the issue.
In case of rsyslog (via syslog.service alias init script), systemd seems to detect it and stops systemd-kmsg-syslogd.service (it is stopped on my fresh 11.4 installation here without any changes).
It has had a timeout in the 11.4 release. The recent version does not stop itself anymore, it runs forever. We don't really support systemd on 11.4, development happens in Factory. We will probably just update the 11.4 systemd version when the stuff has stabilized with the upcoming Fedora release. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c35
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c36
--- Comment #36 from Patrick Smart
https://bugzilla.novell.com/show_bug.cgi?id=671525
https://bugzilla.novell.com/show_bug.cgi?id=671525#c37
--- Comment #37 from Dr. Werner Fink
participants (1)
-
bugzilla_noreply@novell.com