Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1373083

Summary: "mmap: Invalid argument" while executing `restorecon /var/crash/` with libselinux-2.5-6.el7.x86_64
Product: Red Hat Enterprise Linux 7 Reporter: Qiao Zhao <qzhao>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: kdump-team-bugs, lvrabec, mgrepl, mmalik, panand, plautrba, pvrabec, ruyang, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
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-08 06:00:24 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:
Embargoed:

Description Qiao Zhao 2016-09-05 06:30:44 UTC
Description of problem:
I just notice this problem from kernel-3.10.0-500.el7, like:
# kdumpctl restart
kexec: unloaded kdump kernel
Stopping kdump: [OK]
mmap: Invalid argument
Detected change(s) in the following file(s):
  
  /etc/kdump.conf
Rebuilding /boot/initramfs-3.10.0-500.el7.x86_64kdump.img
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
mmap: Invalid argument
kexec: loaded kdump kernel
Starting kdump: [OK]

Can't find this message on kernel-3.10.0-495.el7, i will do some kernel bisect to make sure which fix caused this problem.

Version-Release number of selected component (if applicable):
kexec-tools-2.0.7-49.el7

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Pratyush Anand 2016-09-06 15:18:30 UTC
It is the restorecon command which is generating this error message. 
# restorecon /var/crash/
  mmap: Invalid argument

# rpm -qf `which restorecon`
policycoreutils-2.5-8.el7.x86_64

However, version of policycoreutils seems same in RHEL-7.3-20160901.1 and RHEL-7.3-20160825.1.

Comment 4 Pratyush Anand 2016-09-08 04:54:35 UTC
I did some more experiments with policycoreutils code from https://github.com/SELinuxProject/selinux.git. This error is printed when selabel_open() is called, which is part of libselinux. RHEL-7.3-20160901.1 has libselinux-2.5-6 and, RHEL-7.3-20160825.1 had libselinux-2.5-5. So, I think error was introduced in libselinux-2.5-6.

Therefore, it would be good to assign this BZ to selinux team.

Simplified reproducer:
(1) Use libselinux-2.5-6.el7.x86_64
(2) execute `restorecon /var/crash/`

You will see a message "mmap: Invalid argument".

Comment 5 Petr Lautrbach 2016-09-08 06:00:24 UTC

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