Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernfs,memcg: Fix CI failure for UEK4. #137

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

imran-kn
Copy link
Contributor

UEK4 (v4.1.x) kernel does not maintain separate counts for dying and active memcgroups, fix corresponding test failures with data available in UEK4.

UEK4 (v4.1.x) kernel does not maintain separate counts for
dying and active memcgroups, fix corresponding test failures
with data available in UEK4.

Signed-off-by: Imran Khan <[email protected]>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 17, 2024
Copy link
Member

@brenns10 brenns10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The print statements seem good enough, since it's UEK4, and it looks like this is only run for the root mem cgroup, not for every cgroup or kernfs node. Approved but let's wait until the CI pipelines pass here and on gitlab.

@brenns10
Copy link
Member

From gitlab:

__________________ test_dump_page_cache_pages_pinning_cgroups __________________
prog = <_drgn.Program object at 0x5635a0c96be0>
    def test_dump_page_cache_pages_pinning_cgroups(prog: drgn.Program) -> None:
>       kernfs_memcg.dump_page_cache_pages_pinning_cgroups(prog, 10)
tests/test_kernfs_memcg.py:9: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
drgn_tools/kernfs_memcg.py:227: in dump_page_cache_pages_pinning_cgroups
    cgroup_state = decode_css_flags(cgrp.self.address_of_())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
css = Object(prog, 'struct cgroup_subsys_state *', value=0xffff880ff286b800)
    def decode_css_flags(css: Object) -> str:
        """
        Get a human-readable representation of cgroup_subsys_state.flags
    
        :param css: ``struct cgroup_subsys_state *``
        """
>       CSS_DYING = css.prog_["CSS_DYING"]
E       KeyError: 'CSS_DYING'
drgn_tools/kernfs_memcg.py:44: KeyError
________________________ test_dump_memcgroup_hierarchy _________________________
prog = <_drgn.Program object at 0x5635a0c96be0>
    def test_dump_memcgroup_hierarchy(prog: drgn.Program) -> None:
>       kernfs_memcg.dump_memcgroup_hierarchy(prog)
tests/test_kernfs_memcg.py:13: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
drgn_tools/kernfs_memcg.py:82: in dump_memcgroup_hierarchy
    cgroup_state = decode_css_flags(pos)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
css = Object(prog, 'struct cgroup_subsys_state *', value=0xffff880ff23ca010)
    def decode_css_flags(css: Object) -> str:
        """
        Get a human-readable representation of cgroup_subsys_state.flags
    
        :param css: ``struct cgroup_subsys_state *``
        """
>       CSS_DYING = css.prog_["CSS_DYING"]
E       KeyError: 'CSS_DYING'
drgn_tools/kernfs_memcg.py:44: KeyError
----------------------------- Captured stdout call -----------------------------

This was with DWARF debuginfo on the ext4_dirlock-uek4 vmcore.

Turns out that specific UEK4 version is missing:

dc03f7718c0e1 ("cgroup: Prevent kill_css() from being called more than once")

Which itself is a backport of commit:

33c35aa481786 ("cgroup: Prevent kill_css() from being called more than once")

So CSS_DYING is indeed not present there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants