Bug 80002 - systemd-journal consumes 100% cpu (lxc-container with getty.target)
Summary: systemd-journal consumes 100% cpu (lxc-container with getty.target)
Status: RESOLVED NOTABUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: ARM Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-13 20:34 UTC by Urs Helmig
Modified: 2014-06-15 21:49 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Urs Helmig 2014-06-13 20:34:35 UTC
Problem
--------------------
     
systemd-journal consumes 100% cpu only if the getty.target is started. 

The getty.target can be started for /dev/console or for /dev/tty1 (logical pts console) - no difference.

Without getty.target and an installed sshd daemon, the system works fine.
 
The strace is very simular to the strace in BUG 61191, but MaxRetentionSec in journald.conf is not set.


System-Information:
--------------------
- raspberry-pi arm board with arch-linux
-> LXC-Container with fresh archlinux installation
      - no capabilities dropped
      - /dev/kmsg is symlinked to /dev/console

      - Linux 3.12.20-4-ARCH armv6l GNU/Linux

      - systemd 213
        +PAM -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL 
        +XZ +SECCOMP -APPARMOR


STRACE:
--------------------

clock_gettime(CLOCK_REALTIME, {1402689055, 61457752}) = 0
clock_gettime(CLOCK_REALTIME, {1402689055, 62066735}) = 0
epoll_wait(7, {{EPOLLIN, {u32=3080684416, u64=3080684416}}, {EPOLLIN, {u32=3080684000, u64=3080684000}}, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3080684624, u64=3080684624}}, {EPOLLIN, {u32=3080684208, u64=3080684208}}}, 12, 0) = 4
clock_gettime(CLOCK_REALTIME, {1402689055, 63220702}) = 0
clock_gettime(CLOCK_MONOTONIC, {347291, 774525484}) = 0
clock_gettime(0x7 /* CLOCK_??? */, {347291, 774947472}) = 0
writev(2, [{"/dev/kmsg buffer overrun, some m"..., 45}, {"\n", 1}], 2) = 46
read(9, "", 8192)                       = 0
clock_gettime(CLOCK_REALTIME, {1402689055, 65947625}) = 0
clock_gettime(CLOCK_REALTIME, {1402689055, 66394612}) = 0
epoll_wait(7, {{EPOLLIN, {u32=3080684416, u64=3080684416}}, {EPOLLIN, {u32=3080684000, u64=3080684000}}, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=3080684624, u64=3080684624}}, {EPOLLIN, {u32=3080684208, u64=3080684208}}}, 12, 0) = 4
clock_gettime(CLOCK_REALTIME, {1402689055, 67409583}) = 0
clock_gettime(CLOCK_MONOTONIC, {347291, 778714365}) = 0
clock_gettime(0x7 /* CLOCK_??? */, {347291, 779147353}) = 0
writev(2, [{"/dev/kmsg buffer overrun, some m"..., 45}, {"\n", 1}], 2) = 46
read(9, "", 8192)                       = 0
clock_gettime(CLOCK_REALTIME, {1402689055, 69843514}) = 0
clock_gettime(CLOCK_REALTIME, {1402689055, 70276502}) = 0
Comment 1 Lennart Poettering 2014-06-15 21:49:08 UTC
You are creating a log loop, journald reads kmsg, logs that to console, you loop that back to kmsg.

YOu really should believe mounting /dev/console to kmsg was a good idea. THey are very different devices, /dev/kmsg isn't even a tty.

Similar for /dev/tty1, you cannot just mount any pts there, since the VT api means you have a number of files in /sys/class/tty that match it, it means that you also have /dev/vcsa1, it means you can send a special set of ansi sequences to it, and it means that you can issue some special ioctls on it. Nothing of that is provided by simply mounting a pseudo tty on top, and logind will not work if you ignore that.

Also see:

http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.