[Webkit-unassigned] [Bug 213646] New: [GTK][WPE] Fix matches a empty sequence in getCgroupControllerPath() when only cgroupsV2 hierarchy is found

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 26 08:20:59 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=213646

            Bug ID: 213646
           Summary: [GTK][WPE] Fix matches a empty sequence in
                    getCgroupControllerPath() when only cgroupsV2
                    hierarchy is found
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: psaavedra at igalia.com
                CC: bugs-noreply at webkitgtk.org

"[" (fscanf) Matches ONLY a nonempty sequence of characters from the specified set. This is good enough for cgroups version 1 but when you are in a pure cgroups version 2 environment probably you need to be able to parse the "0::/some_path" chain. This chain should be parseable by the scanf line but it is not due to the reason exposed early:

    int scanResult = fscanf(cgroupControllerFile, "%*u:%" STRINGIFY(CGROUP_NAME_BUFFER_SIZE) "[^:]:%" STRINGIFY(PATH_MAX) "[^\n]", name, path);


>From cgroups man page:

    The colon-separated fields are, from left to right:

              1. For cgroups version 1 hierarchies, this field contains a
                 unique hierarchy ID number that can be matched to a hierar‐
                 chy ID in /proc/cgroups.  For the cgroups version 2 hierar‐
                 chy, this field contains the value 0.

              2. For cgroups version 1 hierarchies, this field contains a
                 comma-separated list of the controllers bound to the hier‐
                 archy.  For the cgroups version 2 hierarchy, this field is
                 empty.

              3. This field contains the pathname of the control group in
                 the hierarchy to which the process belongs.  This pathname
                 is relative to the mount point of the hierarchy.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200626/fd291bd3/attachment-0001.htm>


More information about the webkit-unassigned mailing list