Using cgm on cgroups that have a comma does not work

Bug #1435416 reported by Christopher Townsend
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cgmanager (Ubuntu)
Fix Released
High
Serge Hallyn
Trusty
New
Medium
Unassigned
Utopic
Fix Released
High
Unassigned

Bug Description

==============================
SRU Justification
Impact: cgmanager can be made to crash if controllers are co-mounted a certain way
Test case:
 Edit /etc/init/cgmanager.conf, at the top of the pre-start script section add

 mount -t cgroup -o cpu,cpuacct none /mnt

 reboot, then try

 cgm create cpu,cpuacct xxx
Regresion potential: this patch only prevents us trying to memmove off the ends of
 a char*. There should be no regressions.
==============================

When I try using cgm on cgroups that have a comma, I get an Invalid Request error.

For example, if I try "cgm create net_cls,net_prio $USER" inside a Vivid container, the Vivid host's cgmanager will start to spin at 100% CPU and the command fails.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: cgmanager 0.36-2ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1
Uname: Linux 3.19.0-9-generic x86_64
ApportVersion: 2.16.2-0ubuntu4
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Mar 23 12:25:36 2015
InstallationDate: Installed on 2013-03-18 (734 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
SourcePackage: cgmanager
UpgradeStatus: Upgraded to vivid on 2014-10-20 (153 days ago)

Revision history for this message
Christopher Townsend (townsend) wrote :
Changed in cgmanager (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cgmanager - 0.36-2ubuntu3

---------------
cgmanager (0.36-2ubuntu3) vivid; urgency=medium

  * d/p/0006-cgmanager-make-exception-for-proxys-placed-in-system.patch:
    Make a special case for when cgproxy is started by systemd under a special
    slice. Without this, nested containers with cgmanager are not possible.
  * Fix up the last patch - no behavior change, just make the flow more
    reassuring
 -- Serge Hallyn <email address hidden> Mon, 23 Mar 2015 18:21:47 -0500

Changed in cgmanager (Ubuntu):
status: Triaged → Fix Released
no longer affects: cgmanager (Ubuntu Trusty)
description: updated
description: updated
Changed in cgmanager (Ubuntu Utopic):
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Christopher, or anyone else affected,

Accepted cgmanager into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cgmanager/0.32-4ubuntu1.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cgmanager (Ubuntu Utopic):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

verified on utopic

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cgmanager - 0.32-4ubuntu1.4

---------------
cgmanager (0.32-4ubuntu1.4) utopic-proposed; urgency=medium

  * Fix cgmanager handling of a corner case involving certain co-mounted
    controllers (LP: #1435416)
 -- Serge Hallyn <email address hidden> Tue, 24 Mar 2015 16:33:06 -0500

Changed in cgmanager (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for cgmanager has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

This will need to be fixed in trusty too:

https://github.com/lxc/lxc/issues/735

a trusty lxd container on a wily or newer host will fail to start nested containers.

workarounds include

apt-get -t trusty-backports install cgmanager

or setting lxc.cgroup.use in /etc/lxc/lxc.conf to not include the co-mounted controllers, i.e.

lxc.cgroup.use = devices,name=systemd,freezer,memory

Changed in cgmanager (Ubuntu Trusty):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.