[lxc-users] systemd's journald using 100% CPU on Debian Jessie container and Fedora 20 host

Michael H. Warfield mhw at WittsEnd.com
Thu Oct 9 15:13:47 UTC 2014


On Thu, 2014-10-09 at 08:27 -0300, Daniel Miranda wrote:
> I spun up a Jessie container in my Fedora 20 (x86_64, LXC 1.0.5) box
> and the journald process inside the host consumes full CPU time for
> one core.
> 
> I've Googled a bit and found some reports of that being connected to a
> bug that is allegedly already fixed in systemd, or related to the kmsg
> device being improperly set up, but my case doesn't seem to fit
> either: Jessie is using systemd 215 which is pretty recent,
> and /dev/kmsg points to /dev/console, which looks correct.

What?  Wait...  NO!

You must NOT have a link from /dev/kmsg pointing to /dev/console.  In
the host it should be a real device.  In a container it must NOT exist.
That is the problem.  When /dev/kmsg points to /dev/console,
systemd-journald reads from /dev/kmsg and then writes to /dev/console
(which it then reads from /dev/kmsg and writes again to /dev/console ad
infinitum).  You've inadvertently created a messaging loop that's
causing systemd-journald to go berserk on your CPU.

> Does anyone know what the problem might be, or if there is a
> workaround I can do in the meanwhile?

This is the first I have heard of this in a Debian container but the
answer is the same as for Fedora 19 and Fedora 20 containers...

*) Shut down the container.

*) Add "lxc.kmsg = 0" to the container config.

*) Delete ${LXC_PATH}/${container}/rootfs.dev/kmsg

*) Restart container.

If that link is in your host system /dev, you have hosed something up
seriously.  That should be a device (but only in the host /dev).

> Regards,
> Daniel Miranda
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 465 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20141009/966b2fe7/attachment.sig>


More information about the lxc-users mailing list