sm-notify leaves pid file on failure

Bug #697473 reported by Darin Tay
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

This bug exists in the nfs-utils package for Lucid, Maverick and Natty (didn't check earlier).

sm-notify writes a pid file on startup (/var/run/sm-notify.pid) to indicate that it has been run since the machine booted. This file is intentionally left around after exit, presumably because sm-notify should only notify once per boot.

However, if sm-notify fails, this pid file is left around, even though no hosts have been notified. On subsequent sm-notify runs, sm-notify will see the pid file and then exit immediately, mistakenly believing that it has already notified hosts this boot.

This is problematic because sm-notify is started by the init script for statd and will sometimes fail; subsequent startups (e.g. due to other statd start events) will then claim to succeed (due to the pid file), but not actually send any notifications. This results in stale nfs locks.

In particular, this exacerbates problems relating to https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/690401 / https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/581941 (relevant discussion in https://code.launchpad.net/~clint-fewbar/ubuntu/natty/nfs-utils/wait-for-local-filesystems/+merge/44417).

Tags: glucid
Steve Langasek (vorlon)
Changed in nfs-utils (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.