Bug 665011 - backport various fixes for memory leaks
Summary: backport various fixes for memory leaks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.7
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Michal Novotny
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 514500
TreeView+ depends on / blocked
 
Reported: 2010-12-22 13:02 UTC by Paolo Bonzini
Modified: 2014-02-02 22:38 UTC (History)
5 users (show)

Fixed In Version: xen-3.0.3-122.el5
Doc Type: Bug Fix
Doc Text:
Memory leaks were discovered in the code following the deletion of block headers and also in the following functions: raw_aio_remove(), qemu_bh_delete() and pt_msix_init(). With this update, a set of patches has been provided to fix these bugs.
Clone Of:
Environment:
Last Closed: 2011-07-21 09:17:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Backport of 4 upstream commits mentioned in comment #0 (5.49 KB, patch)
2011-01-03 13:29 UTC, Michal Novotny
no flags Details | Diff
logs for verify this bug (37.96 KB, application/x-gzip)
2011-05-31 09:59 UTC, Pengzhen Cao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1070 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2011-07-21 09:12:56 UTC

Description Paolo Bonzini 2010-12-22 13:02:48 UTC
From git://xenbits.xensource.com/qemu-xen-unstable.git

7a11b22eab559e24540059d46c70f4feffe052d7
      fix raw_aio_remove (Stefano Stabellini)

f9ad69304fd52092c54fbf64b2937ebdb9980649
      Call qemu_bh_delete at bdrv_aio_bh_cb

a05958b6e32f1748ea70b1efca13394956c0698b
      block: Clean up after deleting BHs

200a4ece52fa37d6b884b52c47e3d56b9c1c7563
      memory/fd leak in pt_msix_init()

Comment 1 Michal Novotny 2011-01-03 13:29:12 UTC
Created attachment 471479 [details]
Backport of 4 upstream commits mentioned in comment #0

This is the backport of upstream commit mentioned in comment #0.
Tested on x86_64 RHEL-5 dom0 using the x86_64 HVM guest with PCI passthrough.

Michal

Comment 3 RHEL Program Management 2011-01-11 19:49:09 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2011-01-12 15:23:15 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 9 Pengzhen Cao 2011-05-24 05:50:12 UTC
Hi  Michal,  

Could you give more info on this bug?
I do not know how to verify the fix.

Regards,
Pengzhen

Comment 10 Michal Novotny 2011-05-24 07:26:17 UTC
(In reply to comment #9)
> Hi  Michal,  
> 
> Could you give more info on this bug?
> I do not know how to verify the fix.
> 
> Regards,
> Pengzhen

Hi Pengzhen,
this is connected mainly to PCI passthrough using MSI-X to properly free the memory and about flushing the block device using asynchronous I/O. For testing this bug you need to test memory leaks using PCI passthrough of HVM guest.

Michal

Comment 12 Pengzhen Cao 2011-05-25 10:10:17 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Hi  Michal,  
> > 
> > Could you give more info on this bug?
> > I do not know how to verify the fix.
> > 
> > Regards,
> > Pengzhen
> 
> Hi Pengzhen,
> this is connected mainly to PCI passthrough using MSI-X to properly free the
> memory and about flushing the block device using asynchronous I/O. For testing
> this bug you need to test memory leaks using PCI passthrough of HVM guest.
> 
> Michal

I tried with "valgrind" to trace xend for memory leak but without luck.
It could not trace xen's pricmd

#valgrind --tool=memcheck --leak-check=yes --trace-children=yes --log-file=/var/log/valgrind.log /etc/init.d/xend

--5647-- WARNING: Serious error when reading debug info
--5647-- When reading debug info from /proc/xen/privcmd:
--5647-- can't read file to inspect ELF header

Now I will try with a patch for valgrind to handle xen's pricmd:
http://lists.xensource.com/archives/html/xen-devel/2010-08/msg01246.html


Am I on the right track?

Comment 13 Pengzhen Cao 2011-05-30 02:13:49 UTC
Michal, 

I still can not find way to verify this. 
Could I just do some sanity test with PCI pass-through to verify this bug?


Regards,
Pengzhen

Comment 14 Pengzhen Cao 2011-05-31 09:56:49 UTC
Run PCI pass through test with USB controller , 
Host version: kernel-264, xen-3.0.3-132 , x86_64bit
Guest: rhel6.1 x86_64bit

Host pass through the onboard usb controller to the guest, and plug a usb disk on that port, guest could use the usb disk without any issue.


So I think this bug can be verified.

Comment 15 Pengzhen Cao 2011-05-31 09:59:29 UTC
Created attachment 501962 [details]
logs for verify this bug

Comment 16 Tomas Capek 2011-07-13 13:29:11 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Memory leaks were discovered in the code following the deletion of block headers and also in the following functions: raw_aio_remove(), qemu_bh_delete() and pt_msix_init(). With this update, a set of patches has been provided to fix these bugs.

Comment 17 errata-xmlrpc 2011-07-21 09:17:40 UTC
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 therefore 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.

http://rhn.redhat.com/errata/RHBA-2011-1070.html

Comment 18 errata-xmlrpc 2011-07-21 12:00:21 UTC
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 therefore 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.

http://rhn.redhat.com/errata/RHBA-2011-1070.html


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