Bug 1374451

Summary: "mmap: Invalid argument" during yum run
Product: Red Hat Enterprise Linux 7 Reporter: Andrea Bolognani <abologna>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-13 15:12:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andrea Bolognani 2016-09-08 17:22:26 UTC
Installing or removing a bunch of packages with yum is enough
to trigger several 'mmap: Invalid argument' messages, eg:

  [...]
  Transaction test succeeded
  Running transaction
  mmap: Invalid argument
    Installing : libvirt-client-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-driver-network-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-driver-nwfilter-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-driver-storage-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-driver-qemu-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-config-nwfilter-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-driver-lxc-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-config-network-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-driver-interface-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-driver-secret-2.0.0-8.el7.ppc64le
    Installing : libvirt-daemon-driver-nodedev-2.0.0-8.el7.ppc64le
    Installing : libvirt-2.0.0-8.el7.ppc64le
    Installing : 10:qemu-kvm-rhev-2.6.0-23.el7.ppc64le
  mmap: Invalid argument
    Verifying  : libvirt-daemon-driver-nwfilter-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-daemon-driver-lxc-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-daemon-config-nwfilter-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-daemon-driver-interface-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-daemon-config-network-2.0.0-8.el7.ppc64le
    Verifying  : 10:qemu-kvm-rhev-2.6.0-23.el7.ppc64le
    Verifying  : libvirt-daemon-driver-secret-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-daemon-driver-nodedev-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-daemon-driver-network-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-daemon-driver-storage-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-daemon-driver-qemu-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-daemon-2.0.0-8.el7.ppc64le
    Verifying  : libvirt-client-2.0.0-8.el7.ppc64le
  [...]

This is with SELinux in Enforcing mode. If SELinux is disabled,
none of the 'mmap: Invalid argument' messages is displayed even
after several installations / removals.

The same behavior can be observed on ppc64le and aarch64.
I didn't try to reproduce it on x86_64.

This looks related to Bug 1372200 and Bug 1374104, but it's my
understanding that at least the first one should have been
fixed as of 3.13.1-97.el7...


Installed packages:

  selinux-policy-3.13.1-97.el7.noarch
  libselinux-2.5-6.el7.ppc64le
  selinux-policy-targeted-3.13.1-97.el7.noarch
  libselinux-utils-2.5-6.el7.ppc64le

Comment 1 Petr Lautrbach 2016-09-08 17:24:25 UTC

*** This bug has been marked as a duplicate of bug 1372200 ***

Comment 2 Petr Lautrbach 2016-09-08 17:28:48 UTC
I was too fast. This is definitely a duplicate of #1372200. However, you need to remove /etc/selinux/targeted/contexts/files/file_contexts.local.bin manually to fix it.

I'm not sure if we want to provide an rpm scriptlet to do that. I'd say that it happened only during internal testing but the bug is probably in rhel-7.3 beta external available as well.

Comment 4 Lukas Vrabec 2016-09-12 09:12:20 UTC
I agree with Petr about providing rpm scriptlet to remove /etc/selinux/targeted/contexts/files/file_contexts.local.bin.