lxc-checkconfig shows Mainline PPA Wily-4.0.7 kernel missing memory controller

Bug #1471358 reported by David Favor on 2015-07-03
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
lxc (Ubuntu)

Bug Description

net8-rmt# uname -a
Linux ns515383.ip-167-114-159.net 4.0.7-040007-generic #201507031036 SMP Fri Jul 3 10:37:58 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

net8-rmt# lxc-checkconfig | grep missing
Cgroup memory controller: missing

net8-rmt# grep cgroup /proc/mounts | grep memory
cgroup /sys/fs/cgroup/memory cgroup rw,relatime,memory,release_agent=/run/cgmanager/agents/cgm-release-agent.memory 0 0

So it appears the memory controller is available + lxc-checkconfig just fails to report it correctly.

David Favor (davidfavor) wrote :


net8-rmt# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.10
Release: 14.10
Codename: utopic

net8-rmt# lxc-checkconfig
Kernel configuration not found at /proc/config.gz; searching...
Kernel configuration found at /boot/config-4.0.7-040007-generic
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled

--- Control groups ---
Cgroup: enabled
Cgroup clone_children flag: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: missing
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled

Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1471358

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
David Favor (davidfavor) wrote :

Hum... lxc-checkconfig works for these kernel versions...

linux-image-3.16.0-41-generic - default installed kernel
linux-image-3.19.8-031908-generic - mainline ppa vivid

David Favor (davidfavor) wrote :

Can't seem to get apport-collect to login to launchpad. Appears a browser is required to authenticate + the
command line browser invoked doesn't seem to correctly pass user + pass to launchpad.

This is a headless server, so there is no browser running.

Someone let me know how to run apport-collect with output to a file + I'll add it's output as an attachment.

Pulling all kernel CONFIG_CGROUP* options from 3.19.8 + 4.0.7 config file + doing a diff shows exact same CGROUP kernel switches used for compiling both kernels.

David Favor (davidfavor) wrote :

The problem appears to be around line 102 of the lxc-checkconfig script.

echo -n "Cgroup memory controller: "

is followed by a slightly flawed check for kernel version...

if [ $KVER_MAJOR -ge 3 -a $KVER_MINOR -ge 6 ]; then
    is_enabled CONFIG_MEMCG

The test - $KVER_MAJOR -ge 3 - passes, as this will be '4'.

The test - $KVER_MINOR -ge 6 - will fail, as the minor is '0'.

Likely a more robust test is to test for CONFIG_CGROUP_MEM_RES_CTLR
in kernel-3.6 + below.

The 4.0.7 kernel config file shows...

config-4.0.7-040007-generic:# CONFIG_MEMCG_SWAP_ENABLED is not set

Which is correct, as CONFIG_CGROUP_MEM_RES_CTLR seems to have been deprecated.

David Favor (davidfavor) wrote :

Attached is one way to fix this.

Patch created via...

diff -u lxc-checkconfig.orig lxc-checkconfig.fix > lxc-checkconfig.patch

David Favor (davidfavor) wrote :

https://github.com/lxc/lxc/issues/508 documents this bug in LXC.

tags: added: patch

The attachment "Unified diff patch file" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in lxc (Ubuntu):
status: New → Confirmed
David Favor (davidfavor) wrote :

I've removed the patch tag + removed the patch file as LXC already has this bug open + fix will likely come from there.

tags: removed: patch
Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers