Bug 83821

Summary: After two successfull suspend/resume in a row the third suspend fails
Product: Power Management Reporter: Rainer Fiebig (jrf)
Component: Hibernation/SuspendAssignee: Rafael J. Wysocki (rjw)
Status: CLOSED DUPLICATE    
Severity: normal CC: lenb, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.16 Subsystem:
Regression: No Bisected commit-id:
Attachments: Screenshot during failed s2both

Description Rainer Fiebig 2014-09-03 16:28:52 UTC
Created attachment 149211 [details]
Screenshot during failed s2both

Good day!

After 2 successfull suspend/resume in a row, the also almost immediately following third suspend (save2both) aborts after a part of the image (63% to 99%) has been written to disk. s2both then seems to make a second attempt (see jpeg) but the system finally reverts to the desktop and some harddisk-activity is going on for a short while. The following suspend is OK again.

This occurs after a fresh system-start with kernels 3.16/15/14/10/7. 3.7.10 is an unmodified openSuse distribution-kernel and is the oldest I have on disk.

RAM-usage before suspend was always just 7% - 10%, swap-usage was 0%. After the failed attempt RAM-usage was 5% - 7% and swap-usage was between 2% and 7%.

I ran into this only recently because it does not occur under normal work-conditions (suspend/resume...do some work, suspend/resume... etc.). Usually suspend/resume works very well and fast on my system, except if RAM-usage is more than 40% - in that case I regularly have an encounter with Bug 47931.

The system is an openSuse 12.3/64bit with the latest updates. It has 12 GB RAM and a 10 GB swap-partition. For suspend/hibernate I use "save to both".

The kernel-logs don't offer any clues for me so far. After the failed suspend the system-logs always show this :

...
eth0      is up
2014-09-01T21:38:01.912033+02:00 linux-tez8 network[8522]: ..doneSetting up service network  .  .  .  .  .  .  .  .  .  .  .  .  ...done
2014-09-01T21:38:01.912878+02:00 linux-tez8 systemd[1]: Started LSB: Configure network interfaces and set up routing.
2014-09-01T21:38:01.980270+02:00 linux-tez8 systemd-sleep[8280]: System resumed.
2014-09-01T21:38:01.985250+02:00 linux-tez8 systemd[1]: systemd-suspend.service: main process exited, code=exited, status=1/FAILURE
2014-09-01T21:38:01.992715+02:00 linux-tez8 systemd[1]: Failed to start Suspend.
2014-09-01T21:38:01.993349+02:00 linux-tez8 systemd[1]: Dependency failed for Suspend.
2014-09-01T21:38:01.993483+02:00 linux-tez8 systemd[1]: Job suspend.target/start failed with result 'dependency'.
2014-09-01T21:38:01.993952+02:00 linux-tez8 systemd[1]: Service sleep.target is not needed anymore. Stopping.
2014-09-01T21:38:01.994374+02:00 linux-tez8 systemd[1]: Unit systemd-suspend.service entered failed state
2014-09-01T21:38:01.994887+02:00 linux-tez8 systemd[1]: Stopping Sleep.
2014-09-01T21:38:01.995383+02:00 linux-tez8 systemd[1]: Stopped target Sleep.
2014-09-01T21:38:01.995869+02:00 linux-tez8 systemd[1]: Stopping Suspend.
2014-09-01T21:38:01.996434+02:00 linux-tez8 systemd[1]: Stopped target Suspend.
...

This is virtually the same what I see when I meet Bug 47931. Maybe there is a common cause.

In my view this new bug is a minor issue:it doesn't crash the system and most users will probably never see it. 

But it may be a rare symptom of a deeper problem in powermanagement.

Jay
Comment 1 Rainer Fiebig 2014-09-17 16:58:11 UTC
The workaround detailed in Comment 25 of Bug 47931 also helps against this one.

Doesn't happen any more.

Jay
Comment 2 Rainer Fiebig 2014-09-28 22:25:32 UTC
Hi!

I think I have probably solved this. Plus Bug 47931.

Please see my comment 29 over at Bug 47931.

Kind regards.

Jay
Comment 3 Rainer Fiebig 2014-09-30 21:11:59 UTC
Proposal for a patch over at Bug 47931.

Jay
Comment 4 Zhang Rui 2014-10-24 06:45:41 UTC

*** This bug has been marked as a duplicate of bug 47931 ***
Comment 5 Rainer Fiebig 2014-12-10 18:45:17 UTC
Just for documentation:

This bug occurs only when s2both (suspend_hybrid) is used in combination with "threads = y" in /etc/suspend.conf.