After nfs mounts were done on a system the sunrpc module 'use counter' stays positive, preventing unloading of the module

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6.0, 6.1 and 6.2

Issue

Once an NFS share was mounted the sunrpc module used counter always stays positive, preventing unloading of the module.

Resolution

Please install the kernel package in version 2.6.32-279 (which is part of RHEL6.3) or later to solve the issue.

Root Cause

A kernel bug is preventing the used counter from properly beeing handled.

Diagnostic Steps

  • To procedure to see the issue on affected kernels, using a system with no sunrpc/nfs modules loaded:
modprobe sunrpc # increases used counter to 1 (it mounts /var/lib/nfs/rpc_pipefs)  
mount server:/mnt/export /mnt/tmp   # this increases the sunrpc used counter from 5 to 14  
umount /mnt/tmp                     # decreases 14 to 8 which is the problem
rmmod auth_rpcgss nfs_acl lockd nfs # decreases by 5
umount /var/lib/nfs/rpc_pipefs      # decreases by 1, sunrpc usage counter is at 3 and the module can not be unloaded properly

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments