Bug 443130

Summary: System doesn't suspend if previous suspend/hibernate failed
Product: [Fedora] Fedora Reporter: Niall Sheridan <nsheridan>
Component: initscriptsAssignee: Phil Knirsch <pknirsch>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: hramrach, opensource, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-18 20:01:05 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:

Description Niall Sheridan 2008-04-18 19:18:31 UTC
Description of problem:
If, while suspended, my laptop does not properly "unsuspend" (say the battery
died) and I do a fresh power-on, the pm-utils lockfile is not removed from
/var/run/pm-utils/locks and subsequent attempts to suspend silently exit.

Version-Release number of selected component (if applicable):
pm-utils-1.1.0-6.fc9.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Put machine to sleep
2. Kill the power and boot from cold
3. Attempt to put machine to sleep again
  
Actual results:
pm-suspend exits without any warning. The lockfile never gets removed and
nothing ever warns me that the lockfile is still there

Expected results:
I should get notified that my attempt to suspend has failed (with a "stale lock
detected" warning) or something should detect and remove stale lockfiles.

Additional info:
Maybe an initscript could detect stale locks during a cold boot and delete them.
Or storing a PID or somesuch in the lockfile and doing a comparison in order to
detect a stale lock. Anything that's better than pm-suspend just exiting with a
1 no matter what you try (even "pm-suspend --help" silently exits) while the
lockfile is there.

Comment 1 Till Maas 2008-04-18 19:28:57 UTC
Which version of initscripts are you using? This should be fixed in
initscripts-8.70-1 (see bug #442178)

Comment 2 Niall Sheridan 2008-04-18 20:01:05 UTC
initscripts-8.70-1 does fix the issue.
I had been travelling and hadn't been getting updates for the past couple of
days and only just caught up with updates. Thanks!