Bug 467072 - mysqld fails on shmget call for hugetlb
Summary: mysqld fails on shmget call for hugetlb
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 9
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-15 16:03 UTC by Andrig Miller
Modified: 2008-10-16 21:31 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-15 20:19:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andrig Miller 2008-10-15 16:03:01 UTC
Description of problem:

mysqld fails on the shmget system call for hugetlb when SELinux is in enforcing mode.


Version-Release number of selected component (if applicable):

selinux-policy-targeted-3.3.1-95.fc9


How reproducible:

Every time you start mysqld with the targeted policy in enforcing mode.


Steps to Reproduce:
1. Setup hugetlb in Fedora 9
2. Setup mysqld to use hugetlb (large_pages = true) in my.cnf
3. Start mysqld
  
Actual results:

081014 12:29:09  mysqld started
InnoDB: HugeTLB: Warning: Failed to allocate 2147500032 bytes. errno 12
InnoDB HugeTLB: Warning: Using conventional memory pool

Expected results:

081015 09:47:15  mysqld started
081015  9:47:17  InnoDB: Started; log sequence number 3 3625525224
081015  9:47:17 [Note] /usr/libexec/mysqld: ready for connections.

No error on attaching to the hugetlb (shared memory segment)

/proc/meminfo looks like this:

HugePages_Total:  3072
HugePages_Free:   3071
HugePages_Rsvd:   1028
HugePages_Surp:      0
Hugepagesize:     2048 kB


Additional info:

This is a re-occurrence of bug 426877 that was fixed in Fedora 8.  Somehow this bug didn't make it upstream or was dropped along the way somewhere.

Comment 1 Daniel Walsh 2008-10-15 20:19:53 UTC
sesearch -s mysqld_t --allow | grep huge
   allow mysqld_t hugetlbfs_t : file { ioctl read write getattr lock append }; 
   allow mysqld_t hugetlbfs_t : dir { getattr search }; 

rpm -q selinux-policy
selinux-policy-3.3.1-99.fc10.noarch

They seem to be there in 99?

Comment 2 Andrig Miller 2008-10-15 22:43:41 UTC
As you can see I'm not using Fedora 10, but 9.  Is this 3.3.1-99 also going to be coming out for 9?

Comment 3 Daniel Walsh 2008-10-16 17:57:46 UTC
THe same thing.  99 should be out for F9.  Originally built on F10 machine but it is f9 policy.

Comment 4 Andrig Miller 2008-10-16 21:31:53 UTC
Okay, thanks.


Note You need to log in before you can comment on or make changes to this bug.