netfs service kills all processes in the system after terminating

Solution Verified - Updated -

Issue

  • In certain situation, running
# service netfs stop 
  • This kills everything, including shell scripts that are supposed to bring the system down, when service netfs stop is called after switching to runlevel 6.
  • On system with psmisc older than psmisc-22.6-19.el6_5, one has buggy /sbin/fuser - it expects PIDs to be only 5-digits long, longer are concatenated, giving something like:
$ fuser -m /home/test/ 2>/dev/null; echo
  3188109050109166109167109168109169109170109171109172109173109174109175
$
  • /bin/kill doesn't check errno after calling strtol() when converting argument to integer. This kills everything.
# service netfs stop
Unmounting NFS filesystems:  umount.nfs: /nfs: device is busy
umount.nfs: /nfs: device is busy
umount.nfs: /home/test: device is busy
umount.nfs: /home/test: device is busy
                                                           [FAILED]
 Read from remote host localhost: Connection reset by peer

Environment

  • Red Hat Enterprise Linux 6.4
  • util-linux-ng-2.17.2-12.9.el6_4.3.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content