From: Al Viro <viro@ZenIV.linux.org.uk>
To: Andrew Savchenko <bircoph@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
suspend-devel@lists.sourceforge.net
Subject: Re: [BUG] 3.7-rc regression bisected: s2disk fails to resume image: Processes could not be frozen, cannot continue resuming
Date: Wed, 18 Sep 2013 16:21:49 +0100 [thread overview]
Message-ID: <20130918152149.GM13318@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20130918135239.GL13318@ZenIV.linux.org.uk>
On Wed, Sep 18, 2013 at 02:52:39PM +0100, Al Viro wrote:
> On Tue, Aug 27, 2013 at 07:48:43AM +0400, Andrew Savchenko wrote:
> > > Additional (but probably useless) information on this bug may be found
> > > here: https://forums.gentoo.org/viewtopic-p-7371120.html
>
> Something's very fishy there:
>
> [quote]
> Digging into suspend-utils code shows that the following ioctl fails on
> "/dev/snapshot":
>
> Code:
> ioctl(dev, _IO(3, 1), 0);
> [end quote]
>
> but that's _not_ anything freeze-related - that's HDIO_GETGEO, and with zero
> as last argument it will fail, no matter what. With EFAULT, if nothing
> else...
>
> Which ioctl() it really is? A bit further down you write "I modified suspend
> code to see errno, so freeze on /dev/snapshot fails [with EAGAIN]", so you
> have isolated the call in question. Could you quote the actual code?
*scratches head* _IO('3', 1), perhaps? At least that would make sense in
such context... Assuming that's the case, slap
printk(KERN_INFO "freeze_process() => %d", error);
after the call of freeze_process() in kernel/power/user.c along with
printk(KERN_INFO "__usermodehelper_disable() => %d", error);
and
printk(KERN_INFO "try_to_freeze_tasks() => %d", error);
in kernel/power/process.c:freeze_process(), after the calls of
__usermodehelper_disable() and try_to_freeze_tasks() resp.
FWIW, I suspect that it's __usermodehelper_disable() - it does
retval = wait_event_timeout(running_helpers_waitq,
atomic_read(&running_helpers) == 0,
RUNNING_HELPERS_TIMEOUT);
and returns -EAGAIN on timeout. I'm not familiar with swsusp code, but
it smells like we end up waiting for linuxrc itself to finish.
Pavel, any suggestions? If SNAPSHOT_FREEZE really wants everything run
via usermodehelper gone for some reason, what makes /linuxrc different
from e.g /sbin/modprobe?
next prev parent reply other threads:[~2013-09-18 15:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 19:44 3.7-rc regression bisected: s2disk fails to resume image: Processes could not be frozen, cannot continue resuming Andrew Savchenko
2013-08-27 3:48 ` [BUG] " Andrew Savchenko
2013-09-05 12:08 ` [Suspend-devel] " Pavel Machek
2013-09-05 12:23 ` Rafael J. Wysocki
2013-09-12 8:32 ` Andrew Savchenko
2013-09-18 13:02 ` Pavel Machek
2013-09-18 13:52 ` Al Viro
2013-09-18 15:21 ` Al Viro [this message]
2013-09-18 18:40 ` Andrew Savchenko
2013-09-18 19:16 ` Al Viro
2013-09-18 22:13 ` Andrew Savchenko
2013-09-24 0:21 ` [Suspend-devel] " Pavel Machek
2013-10-17 21:35 ` Rafael J. Wysocki
2016-05-22 8:47 ` Andrew Savchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130918152149.GM13318@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=bircoph@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=suspend-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox