Red Hat Bugzilla – Bug 519378
kvm forgets to close /proc/meminfo when hugepages are active
Last modified: 2009-09-11 19:38:11 EDT
Description of problem:
look at a running QEMU instance which has the --mem-path arg set, and it'll have an open handle to /proc/meminfo
# lsof -p `pgrep qemu-kvm` | grep proc
qemu-kvm 6667 qemu 7r REG 0,3 0 4026531986 /proc/meminfo
The flaw is obvious in vl.c
static int gethugepagesize(void)
THis method opens /proc/meminfo, but leaks the FD never bothering to close it
Version-Release number of selected component (if applicable):
Steps to Reproduce:
I backported this commit to fix it:
* Fri Sep 4 2009 Mark McLoughlin <firstname.lastname@example.org> - 2:0.10.6-3
- Use statfs to determine huge page size, fixing fd leak (#519378)
qemu-0.10.6-4.fc11 has been submitted as an update for Fedora 11.
qemu-0.10.6-4.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update qemu'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9377
qemu-0.10.6-4.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.