Bug 211905 - Can't unload gnbd module, 128 references
Can't unload gnbd module, 128 references
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Zijlstra
Brian Brock
:
: 211908 (view as bug list)
Depends On:
Blocks: 210227
  Show dependency treegraph
 
Reported: 2006-10-23 15:46 EDT by Linda Wang
Modified: 2007-11-30 17:07 EST (History)
5 users (show)

See Also:
Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-17 15:00:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Linda Wang 2006-10-23 15:46:51 EDT
+++ This bug was initially created as a clone of Bug #210227 +++

Description of problem:

When I load gnbd on system, it automatically has a ref count of 128 and I can't
unload the module.

Version-Release number of selected component (if applicable):
gnbd-1.1.2-1.el5
kmod-gnbd-0.1.1-12.2.6.18_1.2714.el5
udev-095-13


How reproducible:
100%

Steps to Reproduce:
1. modprobe gnbd
2. lsmod
3. modprobe -r gnbd
  
Actual results:
[root@morph-05 ~]# modprobe gnbd
[root@morph-05 ~]# lsmod | grep gnbd
gnbd                   73408  128 
[root@morph-05 ~]# modprobe -r gnbd
FATAL: Module gnbd is in use.

Expected results:

After loading the gnbd module, the ref count should be 0 and I should be able to
unload the module.

Additional info:

-- Additional comment from nstraz@redhat.com on 2006-10-10 16:36 EST --
I tried this on a Beta1 install and it works fine there.

[root@tank-01 ~]# rpm -q gnbd kmod-gnbd udev
gnbd-1.1.1-1.el5
kmod-gnbd-0.1.1-5.2.6.17_1.2519.4.21.el5
udev-095-8
[root@tank-01 ~]# lsmod | grep gnbd
[root@tank-01 ~]# modprobe gnbd
[root@tank-01 ~]# lsmod | grep gnbd
gnbd                   73408  0 
[root@tank-01 ~]# modprobe -r gnbd
[root@tank-01 ~]# lsmod | grep gnbd


-- Additional comment from kanderso@redhat.com on 2006-10-10 17:37 EST --
Devel ACK - QA found defect during regression testing, needs to be fixed for beta2.

-- Additional comment from bmarzins@redhat.com on 2006-10-10 17:42 EST --
Created an attachment (id=138198)
patch to make gnbd skip Persistent block device stuff

gnbd is based on the nbd kernel module. It creates a bunch of devices when
loaded that can be used for future gnbd imports.  It needs to skip the
Persistent block device stuff, same as nbd.

-- Additional comment from pm-rhel@redhat.com on 2006-10-10 17:48 EST --
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux release.  Product Management has requested further review
of this request by Red Hat Engineering.  This request is not yet committed for
inclusion in release.

-- Additional comment from nstraz@redhat.com on 2006-10-19 12:35 EST --
Verified w/ udev-095-14 from RHEL5-Server-20061019.0 tree.

-- Additional comment from nstraz@redhat.com on 2006-10-20 15:04 EST --
After further investigation, I'm still seeing this during testing.  I'm using a
fresh install of RHEL5-Server-20061019.0 with the following packages.

udev-095-14
gnbd-1.1.4-2.el5
kmod-gnbd-0.1.1-12.2.6.18_1.2732.el5


-- Additional comment from bmarzins@redhat.com on 2006-10-20 17:03 EST --
Yes. This is actually a different bug though. This is a kernel bug.  It seems
that any time you open a gnbd device that doesn't exist, you get increment the
module count.  Sometimes I can make this happen with nbd too. It doesn't happen
at all with 2.6.17 kernels, only the 2.6.18 ones.

If you can reliably reproduce this with nbd, please let me know and file a
generic kernel bug. I have simple program that just opens a file and exits

~bmarzins/public/opener.c

Any time after you insmod the gnbd module, you can run this. If it is the first
time that you have opened that device, you will increment the module usage count.

Since this only works on the first time, you need to remove
/etc/udev/rules.d/40-multipath.rules because this will automatically try to open
the device and cause this problem.  I am currently trying to trace this through
the kernel.

-- Additional comment from lwang@redhat.com on 2006-10-23 15:45 EST --
Yeah.. this may be a side effect of the lockdep fix for bd_mutex 
BZ#201773.  So clone this bug to track the kernel issue.
Comment 1 Linda Wang 2006-10-23 15:49:10 EDT
another similiar case of module reference count issue is in bug 210030
Comment 2 Suzanne Yeghiayan 2006-10-23 15:54:06 EDT
*** Bug 211908 has been marked as a duplicate of this bug. ***
Comment 4 RHEL Product and Program Management 2006-10-23 16:26:13 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux release.  Product Management has requested further review
of this request by Red Hat Engineering.  This request is not yet committed for
inclusion in release.
Comment 5 Don Zickus 2006-10-24 13:04:56 EDT
in kernel-2.6.18-1.2734.el5
Comment 6 Jay Turner 2006-10-24 13:21:06 EDT
QE ack for RHEL5B2.

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