Red Hat Bugzilla – Bug 428612
RHEL 5.1 regression in hugepages due to pagetable sharing patch
Last modified: 2010-10-22 17:42:17 EDT
Description of problem:
We (Oracle) have had several customers upgrade to RHEL5.1 or Oracle EL 5.1
and report that hugepages on x86_64 are not properly freed after the database
SGA/instance is shutdown.
Version-Release number of selected component (if applicable):
100% everytime but you need an SGA > 4GB.
Steps to Reproduce:
1. Create an SGA > 4Gb and have hugepages allocated for it
2. Shutdown DB and all allocated hugepages will not be freed
3. Despite ipcs -a showing clean and ps -ef showing no orcl processes,
some of the SGA pages remain allocated
All allocated hugepages should be released upon DB shutdown.
Oracle had build a kernel without patch:
This was added per changelog entry:
- [mm] shared page table for hugetlb page (Larry Woodman ) 
Without this patch, hugepages are properly released on DB shutdown.
What is the implication of this issue? Are there any workarounds to this?
Example from a customer. SGA is 90G out of 128G. On first DB startup, the SGA
is allocated from hugepages, works as expected. DB is then shutdown, not all
hugepages are released, subsequent startups are force to try and allocate
regular pages, swapping results. System is non-functional.
Only workaround to release the hugepages at this time is a reboot.
Can someone try this kernel ASAP:
Machine won't boot with this kernel if I have vm.nr_hugepages set, or if I try
to set it manually after booting. Did you want me to setup kexec and capture a
dump? Thanks, John
OK, I fixed that can you re-test?
I build an oracle Enterprise Linux kernel using Adam Litke's patch (attached
and backported to OEL 5.1) and confirmed Adam's fix.
Created attachment 292038 [details]
hugetlb page leak patch
You can download this test kernel from http://people.redhat.com/dzickus/el5
verified with the -72, -75 kernels while running other hugepage verification tests.
adding to RHEl5.2 release notes under "Kernel-Related Updates":
When shutting down a database, all allocated hugepages are now released upon
please advise if any further revisions are required. thanks!
the RHEL5.2 release notes will be dropped to translation on April 15, 2008, at
which point no further additions or revisions will be entertained.
a mockup of the RHEL5.2 release notes can be viewed at the following link:
please use the aforementioned link to verify if your bugzilla is already in the
release notes (if it needs to be). each item in the release notes contains a
link to its original bug; as such, you can search through the release notes by
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.