Bug 463244

Summary: [PATCH] Removing bond interfaces causes workqueue thread leak
Product: Red Hat Enterprise Linux 5 Reporter: Sean E. Millichamp <sean>
Component: kernelAssignee: Masahiro Matsuya <mmatsuya>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: agospoda, cward, dzickus, hjia, matt, mmatsuya, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 08:51:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix for workqueue leak none

Description Sean E. Millichamp 2008-09-22 17:16:00 UTC
Created attachment 317384 [details]
Fix for workqueue leak

Description of problem:

When you remove a bond interface from the system, its workqueue thread is not cleaned up.

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

kernel-2.6.18-92.1.10.el5

How reproducible:  Every time.

Steps to Reproduce:
1. modprobe bonding
2. echo "+bond0" > /sys/class/net/bonding_masters
3. echo "-bond0" > /sys/class/net/bonding_masters
  
Actual results:

# ps ax | grep bond0
 9178 ?        S<     0:00 [bond0]

Expected results:

No output from 'ps ax | grep bond0'

Additional info:

If you repeatedly do:
# echo "+bond0" > /sys/class/net/bonding_masters
# echo "-bond0" > /sys/class/net/bonding_masters
you can accumulate hundreds of abandoned workqueue threads for bond0.

The attached patch calls destroy_workqueue() during bond_deinit().  In my testing it solves the problem for kernel-2.6.18-92.1.10.el5.  Note that this patch is against 2.6.26.5 (where the problem still exists) but the patch applies to the SRPM for kernel-2.6.18-92.1.10.el5.

I have emailed the patch to fubar.com and bonding-devel.net for feedback and inclusion upstream.

Comment 1 Matthew Kent 2008-12-02 20:07:07 UTC
Judging by the discussion here

http://sourceforge.net/mailarchive/message.php?msg_name=1222103048.15657.6.camel%40sewt

and the current code it looks fixed upstream, but the RHEL 5.3 beta looks to be using the 3.2.4 bonding release still.

Comment 2 Andy Gospodarek 2008-12-11 20:42:39 UTC
This is something we know about, but I don't think will be resolved with 5.3.  Several major bonding updates are planned for 5.4, so we will have to add it then.

Comment 3 RHEL Program Management 2009-02-16 15:31:23 UTC
Updating PM score.

Comment 7 RHEL Program Management 2009-04-03 12:59:20 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 12 Don Zickus 2009-04-20 17:10:29 UTC
in kernel-2.6.18-140.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 15 Chris Ward 2009-07-03 18:09:17 UTC
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.

Comment 19 errata-xmlrpc 2009-09-02 08:51:04 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/RHSA-2009-1243.html