Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-111505

Lots of memory used in 'setfiles' utility / 'restorecon_sb' function

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • policycoreutils-3.9-2.el10
    • No
    • Important
    • 1
    • rhel-security-selinux
    • 0.1
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • SELINUX 251029: 14
    • Requested
    • None
    • Enhancement
    • Hide
      Feature, enhancement: "-A" option was added
      Reason: Tracking conflicts between inodes with multiple hard links is memory intensive (especially on large file systems)
      Result: Users can now disable tracking inodes with multiple hard links, which allows "setfiles" usage on memory constrained systems.
      Show
      Feature, enhancement: "-A" option was added Reason: Tracking conflicts between inodes with multiple hard links is memory intensive (especially on large file systems) Result: Users can now disable tracking inodes with multiple hard links, which allows "setfiles" usage on memory constrained systems.
    • Proposed
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Relabel a filesystem.

      What is the impact of this issue to you?

      Customer impact because they cannot do virt-v2v conversions (RHEL-111165).

      Please provide the package NVR for which the bug is seen

      It's whatever the version is in RHEL 9.6-z. However this also happens upstream (in Fedora Rawhide), so it seems to be an unresolved upstream bug.

      How reproducible is this bug?:

      Very.

      Steps to reproduce

      I created 15 million & 30 million files and placed them under /usr/lib/modules/.

      I then ran:

      # setfiles -F -C -T 16 /etc/selinux/targeted/contexts/files/file_contexts /usr/lib/modules/big
      

      I observed the memory usage using /usr/bin/time and valgrind massif. The valgrind results show a very obvious memory leak over time (see attachment).

        1. setfiles.txt
          60 kB
          Richard Jones

              vmojzis@redhat.com Vit Mojzis
              rhn-eng-rjones Richard Jones
              Milos Malik Milos Malik
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated: