public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Hartmann <andihartmann@01019freenet.de>
To: richard -rw- weinberger <richard.weinberger@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, linux-kernel@vger.kernel.org
Subject: Re: Corrupted files after suspend to disk
Date: Wed, 07 Mar 2012 12:05:55 +0100	[thread overview]
Message-ID: <4F574113.8030906@01019freenet.de> (raw)
In-Reply-To: <CAFLxGvwazkbisZ0Ax==-Yyv2h5mYtnK-S2bOegZHX5g+rB2krQ@mail.gmail.com>

richard -rw- weinberger schrieb:
> On Wed, Mar 7, 2012 at 12:54 AM, Andreas Hartmann
> <andihartmann@01019freenet.de> wrote:
>> Andreas Hartmann schrieb:
>>> Rafael J. Wysocki schrieb:
>>>> On Friday, February 17, 2012, richard -rw- weinberger wrote:
>>>>> On Thu, Feb 16, 2012 at 11:26 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
>>>>>> On Thu, 16 Feb 2012, Rafael J. Wysocki wrote:
>>>>>>
>>>>>>>> FWIW, we've been seeing a number of hard to diagnose failures
>>>>>>>> with suspend to disk for the last few releases in Fedora.
>>>>>>>> Eric Sandeen has been chasing https://bugzilla.redhat.com/show_bug.cgi?id=744275
>>>>>>>> for a while, but there's no smoking gun that really explains what's
>>>>>>>> getting into these states. Further complicating things, is that it
>>>>>>>> doesn't seem to be 100% reproducable.
>>>>>>>
>>>>>>> I wonder if that's reproducible with the filesystems freezing patch I posted
>>>>>>> some time ago (it will need some rebasing to apply to the current mainline or
>>>>>>> 3.2.y).
>>>>>
>>>>> Where can I find this patch?
>>>>> I'll happily test it.
>>>>> But it may take some time as the bug is not easy to reproduce.
>>>>
>>>> This is the last version posted:
>>>>
>>>> http://marc.info/?l=linux-kernel&m=132775832509351&w=4
>>>>
>>>> However, it only may help if you use the kernel-based hibernation i.e.
>>>> "echo disk > /sys/power/state" (that may be worth testing without the
>>>> patch too, but Fedora is using this AFAICS, so it probably has that
>>>> problem too).
>>>
>>> I'm having the same problem. Please take a look at the following bug
>>> report at suse for more information:
>>>
>>> https://bugzilla.novell.com/show_bug.cgi?id=732908
>>>
>>> Do you know, which way of suspending openSUSE uses in 12.1?
>>
>> I changed SLEEP_MODULE="uswsusp" to "kernel" in
>> /usr/lib/pm-utils/defaults and tested your patch mentioned above with
>> linux 3.2.9.
>>
>> Unfortunately the behaviour didn't change at all - I can see the same
>> problems as before.
>>
>> I tested with and without X. I tested with the call "pm-hibernate" and
>> with "echo disk > /sys/power/state". I always could see the corrupted
>> files after 2 to 4 times of hibernating / resuming.
>>
>>
>> Kind regards,
>> Andreas
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
> 
> On my system kernel suspend *seems* to work.
> I've seen no corrupted files so far.
> 
> But sometimes the resume is failing. (One out of 5 resumes fails).
> I was unable to get any kernel output.
> 
> So I'm not sure whether this is the same issue
> or another one. :-\

I'm pretty sure that this is the same issue. What you are telling
correlates with my research here.
I even got resumes where the machine came up again, but nothing could be
done (it wasn't possible to switch of the password secured screen saver
any more - login at the shell wasn't possible, too, because the started
bash crashed), because of some relevant libraries have been broken.
Reboot with CTRL-ALT-DEL often doesn't work, too, because of the lack of
bash.
But afterwards, I could see in logfiles, that there were file
corruptions (e.g. in ~/.xsession-errors).

It's absolute easy for me to reproduce the problem, because it's just
more or less every time without doing something special. It isn't even
necessary to have a running X session. Runlevel 3 is enough to get the
problem triggered.

I'm checking the md5 sum of some directories each time after resuming
with this script:

#!/bin/sh

dir="/bin /sbin /lib /lib64 /usr/lib64 /usr/bin /usr/sbin"

for i in $dir
do
    echo "$i"
    cd $i
    md5sum -c md5sum.out | grep -v "OK"
done


The initial creation is done directly after a fresh boot with this script:

#!/bin/sh

dir="/bin /sbin /lib /lib64 /usr/lib64 /usr/bin /usr/sbin"

for i in $dir
do
    echo "$i"
    cd $i
    rm md5sum.out
    md5sum * > md5sum.out
done


What about the filesystem layout (openSUSE 12.1)? I'm using the
following layout:

- /dev/sda
- /dev/sda1 -> /boot
- /dev/sda2 -> cr_sda2 (crypted partition with cryptsetup luksOpen ...)
- cr_sda2 is a PV for LVM
- The PV is put to the VG "system"
- The following LV's are part of the VG system:
	/root
	swap
	/usr
	/var
	/home
	/opt

cr_sda2 is decrypted during initrd.


Kind regards,
Andreas

  reply	other threads:[~2012-03-07 11:08 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 16:31 Corrupted files after suspend to disk richard -rw- weinberger
2011-03-23 20:36 ` Rafael J. Wysocki
2011-03-23 21:49   ` richard -rw- weinberger
2011-03-23 22:11     ` Rafael J. Wysocki
2011-03-23 22:16       ` richard -rw- weinberger
2011-03-23 22:22         ` Rafael J. Wysocki
2011-03-23 22:30           ` richard -rw- weinberger
2011-03-23 23:00             ` Rafael J. Wysocki
2011-03-24 10:16               ` richard -rw- weinberger
2011-03-24 19:37                 ` richard -rw- weinberger
2011-03-24 22:30                   ` Rafael J. Wysocki
2012-02-16 10:52                     ` richard -rw- weinberger
2012-02-16 16:30                       ` Dave Jones
2012-02-16 21:51                         ` Rafael J. Wysocki
2012-02-16 22:26                           ` [linux-pm] " Alan Stern
2012-02-16 23:07                             ` richard -rw- weinberger
2012-02-16 23:16                               ` Rafael J. Wysocki
2012-02-16 23:22                                 ` richard -rw- weinberger
2012-03-06 20:03                                 ` Andreas Hartmann
2012-03-06 23:54                                   ` Andreas Hartmann
2012-03-07 10:27                                     ` richard -rw- weinberger
2012-03-07 11:05                                       ` Andreas Hartmann [this message]
2012-03-12 12:03                                         ` Jiri Kosina
2012-03-12 12:23                                           ` richard -rw- weinberger
2012-03-12 12:30                                             ` Jiri Kosina
2012-03-12 12:58                                               ` richard -rw- weinberger
2012-03-12 13:03                                                 ` Jiri Kosina
2012-03-12 13:24                                                   ` Andreas Hartmann
2012-03-12 21:49                                                     ` Dave Jones
2012-03-12 21:56                                                       ` richard -rw- weinberger
2012-03-13  8:59                                                       ` Andreas Hartmann
2012-03-13 21:52                                                         ` Rafael J. Wysocki
2012-03-13 22:27                                                           ` Andreas Hartmann
2012-03-14  0:06                                                             ` Rafael J. Wysocki
2012-03-14  7:05                                                               ` Andreas Hartmann
2012-03-16 15:19                                                       ` richard -rw- weinberger
2012-03-28 22:12                                                       ` Jiri Kosina
2012-03-28 22:18                                                         ` Dave Jones
2012-03-28 22:49                                                         ` Keith Packard
2012-03-29 15:23                                                           ` Jiri Kosina
2012-03-31 20:21                                                             ` Jiri Kosina
2012-03-12 21:38                                                   ` richard -rw- weinberger
2012-03-12 13:36                                           ` Andreas Hartmann
2012-02-16 23:27                         ` Eric Sandeen
2012-02-16 23:37                           ` richard -rw- weinberger
2011-03-23 22:33       ` richard -rw- weinberger

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=4F574113.8030906@01019freenet.de \
    --to=andihartmann@01019freenet.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.weinberger@gmail.com \
    --cc=rjw@sisk.pl \
    /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