Package: klogd Version: 1.5-6.2 Severity: important
Dear Debian folks, klogd suddenly started to consume 100 % of one CPU core. $ ps aux | grep klogd klog 1731 98.4 0.0 2860 1580 ? Rs 12:50 194:41 /sbin/klogd -P /var/run/klogd/kmsg Due to missing debugging symbols attaching with GDB does not seem to be that useful. But maybe it is. $ sudo gdb --pid 1731 GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Attaching to process 1731 Reading symbols from /sbin/klogd...(no debugging symbols found)...done. Reading symbols from /lib/i386-linux-gnu/i686/cmov/libc.so.6...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libc-2.13.so...done. done. Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 0xffffe424 in __kernel_vsyscall () (gdb) bt #0 0xffffe424 in __kernel_vsyscall () #1 0xb76f0f53 in __read_nocancel () at ../sysdeps/unix/syscall-template.S:82 #2 0x0804a404 in ?? () #3 0x080496a5 in ?? () #4 0xb7646e46 in __libc_start_main (main=0x80492e0, argc=3, ubp_av=0xbf87aee4, init=0x804bff0, fini=0x804bfe0, rtld_fini=0xb77cd590, stack_end=0xbf87aedc) at libc-start.c:228 #5 0x08049949 in ?? () (gdb) c Continuing. ^C Program received signal SIGINT, Interrupt. 0xffffe424 in __kernel_vsyscall () (gdb) bt #0 0xffffe424 in __kernel_vsyscall () #1 0xb76f0f53 in __read_nocancel () at ../sysdeps/unix/syscall-template.S:82 #2 0x0804a404 in ?? () #3 0x080496a5 in ?? () #4 0xb7646e46 in __libc_start_main (main=0x80492e0, argc=3, ubp_av=0xbf87aee4, init=0x804bff0, fini=0x804bfe0, rtld_fini=0xb77cd590, stack_end=0xbf87aedc) at libc-start.c:228 #5 0x08049949 in ?? () (gdb) c Continuing. ^C Program received signal SIGINT, Interrupt. 0xffffe424 in __kernel_vsyscall () (gdb) bt #0 0xffffe424 in __kernel_vsyscall () #1 0xb76f0f53 in __read_nocancel () at ../sysdeps/unix/syscall-template.S:82 #2 0x0804a404 in ?? () #3 0x080496a5 in ?? () #4 0xb7646e46 in __libc_start_main (main=0x80492e0, argc=3, ubp_av=0xbf87aee4, init=0x804bff0, fini=0x804bfe0, rtld_fini=0xb77cd590, stack_end=0xbf87aedc) at libc-start.c:228 #5 0x08049949 in ?? () (gdb) c Continuing. ^C Program received signal SIGINT, Interrupt. 0xffffe424 in __kernel_vsyscall () (gdb) quit A debugging session is active. Inferior 1 [process 1731] will be detached. Quit anyway? (y or n) y It seems to want to read something. The following output was printed continuously to the terminal when attaching with `strace`. $ sudo strace -p 1731 […] read(0, "", 4095) = 0 read(0, "", 4095) = 0 read(0, "", 4095) = 0 read(0, "", 4095) = 0 read(0, "", 4095) = 0 [several more times] Buildung klogd with debugging symbols and installing the rogue(?) process was killed. $ export DEB_BUILD_OPTIONS="debug" $ dpkg-buildpackage -us -uc -B $ sudo dpkg -i ../klogd_1.5-6.2_i386.deb (Lese Datenbank ... 494344 Dateien und Verzeichnisse sind derzeit installiert.) Vorbereitung zum Ersetzen von klogd 1.5-6.2 (durch ../klogd_1.5-6.2_i386.deb) ... Ersatz für klogd wird entpackt ... klogd (1.5-6.2) wird eingerichtet ... [....] Stopping kernel log daemon...start-stop-daemon: warning: failed to kill 1729: No such process 1 pids were not killed No process in pidfile '/var/run/klogd/kmsgpipe.pid' found running; none killed. . ok [ ok ] Starting kernel log daemon.... Trigger für man-db werden verarbeitet ... Is that a known problem? I also do not know why and how `/etc/init.d/klogd` was changed. Thanks, Paul -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 3.5.0-rc5+ (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages klogd depends on: ii adduser 3.113+nmu3 ii initscripts 2.88dsf-22.1 ii libc6 2.13-34 ii lsb-base 4.1+Debian7 ii sysklogd [system-log-daemon] 1.5-6.2 klogd recommends no packages. klogd suggests no packages. -- Configuration Files: /etc/init.d/klogd changed: PATH=/bin:/usr/bin:/sbin:/usr/sbin pidfile=/var/run/klogd/klogd.pid kmsgpipe=/var/run/klogd/kmsg kmsgpidfile=/var/run/klogd/kmsgpipe.pid binpath=/sbin/klogd test -f $binpath || exit 0 . /lib/lsb/init-functions KLOGD="-P $kmsgpipe" test ! -r /etc/default/klogd || . /etc/default/klogd case "$1" in start) log_begin_msg "Starting kernel log daemon..." # create klog-writeable pid and fifo directory mkdir -p /var/run/klogd chown klog:klog /var/run/klogd mkfifo -m 700 $kmsgpipe chown klog:klog $kmsgpipe # shovel /proc/kmsg to pipe readable by klogd user start-stop-daemon --start --pidfile $kmsgpidfile --exec /bin/dd -b -m -- bs=1 if=/proc/kmsg of=$kmsgpipe # start klogd as non-root with reading from kmsgpipe start-stop-daemon --start --chuid klog --exec $binpath -- $KLOGD log_end_msg $? ;; stop) log_begin_msg "Stopping kernel log daemon..." start-stop-daemon --stop --retry 3 --oknodo --exec $binpath --pidfile $pidfile # stop kmsgpipe start-stop-daemon --stop --oknodo --pidfile $kmsgpidfile rm -f $kmsgpidfile $kmsgpipe log_end_msg $? ;; restart|force-reload) $0 stop sleep 1 $0 start ;; status) status_of_proc -p $pidfile $binpath klogd && exit 0 || exit $? ;; *) log_success_msg "Usage: /etc/init.d/klogd {start|stop|restart|force-reload|status}" exit 1 esac exit 0 -- no debconf information
signature.asc
Description: This is a digitally signed message part