Bug 1255776 - cgset truncates values to command arguments
cgset truncates values to command arguments
Status: ASSIGNED
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libcgroup (Show other bugs)
6.7
All Linux
unspecified Severity low
: rc
: ---
Assigned To: Nikola Forró
Chao Ye
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-21 10:17 EDT by James Pearson
Modified: 2017-10-05 07:49 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-10-05 07:25:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Pearson 2015-08-21 10:17:38 EDT
Description of problem:

cgset truncates the value to set in a cgroup file to 100 characters

Version-Release number of selected component (if applicable):

libcgroup-0.40.rc1-16

How reproducible:

Always

Steps to Reproduce:
1. Create a cpuset cgroup on a box with many logical cores
2. Use cgset to set cpuset.cpus to a list of logical cores - e.g.
cgset -r cpuset.cpus=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47 testgroup
 
3. Run cgget to list cores in cgroup:

cgget -r cpuset.cpus testgroup
testgroup:
cpuset.cpus: 0-35

Actual results:

The value of the argument is truncated at 100 characters - so only (in this case) the first 36 logical cores are assigned to the cgroup

Expected results:

All listed cores assigned to the cgroup (first 48 in this case)

Additional info:

The libcgroup code has a hard limit of 100 characters: CG_VALUE_MAX in include/libcgroup/iterators.h

This value is far too small for machines with many logical cores

A simple patch has been suggested upstream, but nothing has happen with this - see:

http://permalink.gmane.org/gmane.comp.lib.libcg.devel/4350
Comment 2 Nikola Forró 2017-10-05 07:25:10 EDT

*** This bug has been marked as a duplicate of bug 1441163 ***
Comment 3 James Pearson 2017-10-05 07:45:50 EDT
Unfortunately, I don't have access to bug 1441163 ...

Does this mean the problem is/will be fixed?
Comment 4 Nikola Forró 2017-10-05 07:49:56 EDT
Sorry James,

I'm reopening this BZ and I will update it after bug 1441163 gets resolved one way or the other.

Note You need to log in before you can comment on or make changes to this bug.